Readded Growl logo via embedded binary blob.

pull/100/merge
Taloth Saldono 10 years ago committed by Mark McDowall
parent a62cd042de
commit d1a8cd2a84

@ -138,6 +138,7 @@
<Compile Include="Properties\SharedAssemblyInfo.cs" />
<Compile Include="RateGate.cs" />
<Compile Include="Reflection\ReflectionExtensions.cs" />
<Compile Include="ResourceExtensions.cs" />
<Compile Include="Security\IgnoreCertErrorPolicy.cs" />
<Compile Include="Serializer\IntConverter.cs" />
<Compile Include="Serializer\Json.cs" />

@ -0,0 +1,28 @@
using NzbDrone.Common.EnsureThat;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
namespace NzbDrone.Common
{
public static class ResourceExtensions
{
public static Byte[] GetManifestResourceBytes(this Assembly assembly, String name)
{
var stream = assembly.GetManifestResourceStream(name);
var result = new Byte[stream.Length];
var read = stream.Read(result, 0, result.Length);
if (read != result.Length)
{
throw new EndOfStreamException("Reached end of stream before reading enough bytes.");
}
return result;
}
}
}

@ -1,13 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using FluentValidation.Results;
using Growl.CoreLibrary;
using FluentValidation.Results;
using Growl.Connector;
using NLog;
using Growl.CoreLibrary;
using GrowlNotification = Growl.Connector.Notification;
using NLog;
using NzbDrone.Common;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
namespace NzbDrone.Core.Notifications.Growl
{
@ -72,9 +73,9 @@ namespace NzbDrone.Core.Notifications.Growl
_logger = logger;
_notificationTypes = GetNotificationTypes();
// var bytes = File.ReadAllBytes("64.png");
//
// _growlApplication.Icon = new BinaryData(bytes);
var logo = typeof(GrowlService).Assembly.GetManifestResourceBytes("NzbDrone.Core.Resources.Logo.64.png");
_growlApplication.Icon = new BinaryData(logo);
}
private GrowlConnector GetGrowlConnector(string hostname, int port, string password)

@ -794,10 +794,9 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="..\..\Logo\64.png">
<Link>64.png</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<EmbeddedResource Include="..\..\Logo\64.png">
<Link>Resources\Logo\64.png</Link>
</EmbeddedResource>
<Content Include="MediaInfo.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

Loading…
Cancel
Save