mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
Merge branch 'develop' of github.com:NzbDrone/NzbDrone into develop
This commit is contained in:
commit
12d3700544
BIN
Logo/64.png
Normal file
BIN
Logo/64.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
@ -23,7 +23,7 @@ public HttpApiProvider(IHttpProvider httpProvider, Logger logger)
|
||||
|
||||
public void Notify(XbmcSettings settings, string title, string message)
|
||||
{
|
||||
var notification = String.Format("Notification({0},{1},{2},{3})", title, message, settings.DisplayTime * 1000, "https://raw.github.com/NzbDrone/NzbDrone/vnext/NzbDrone.Core/NzbDrone.jpg");
|
||||
var notification = String.Format("Notification({0},{1},{2},{3})", title, message, settings.DisplayTime * 1000, "https://raw.github.com/NzbDrone/NzbDrone/develop/Logo/64.png");
|
||||
var command = BuildExecBuiltInCommand(notification);
|
||||
|
||||
SendCommand(settings, command);
|
||||
|
@ -26,7 +26,7 @@ public void Notify(XbmcSettings settings, string title, string message)
|
||||
var parameters = new JObject(
|
||||
new JProperty("title", title),
|
||||
new JProperty("message", message),
|
||||
new JProperty("image", "https://raw.github.com/NzbDrone/NzbDrone/vnext/NzbDrone.Core/NzbDrone.jpg"),
|
||||
new JProperty("image", "https://raw.github.com/NzbDrone/NzbDrone/develop/Logo/64.png"),
|
||||
new JProperty("displaytime", settings.DisplayTime * 1000));
|
||||
|
||||
var postJson = BuildJsonRequest("GUI.ShowNotification", parameters);
|
||||
|
@ -1,58 +0,0 @@
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
|
||||
namespace NzbDrone.Core.Notifications.Xbmc
|
||||
{
|
||||
public class ResourceManager
|
||||
{
|
||||
public static Icon GetIcon(string Name)
|
||||
{
|
||||
Stream stm = typeof(ResourceManager).Assembly.GetManifestResourceStream(string.Format("NzbDrone.Core.{0}.ico", Name));
|
||||
if (stm == null) return null;
|
||||
return new Icon(stm);
|
||||
}
|
||||
|
||||
public static byte[] GetRawData(string Name)
|
||||
{
|
||||
byte[] data;
|
||||
using (Stream stm = typeof(ResourceManager).Assembly.GetManifestResourceStream(string.Format("NzbDrone.Core.{0}.ico", Name)))
|
||||
{
|
||||
if (stm == null) return null;
|
||||
data = new byte[stm.Length];
|
||||
stm.Read(data, 0, data.Length);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
public static byte[] GetRawLogo(string Name)
|
||||
{
|
||||
byte[] data;
|
||||
using (Stream stm = typeof(ResourceManager).Assembly.GetManifestResourceStream(string.Format("NzbDrone.Core.{0}", Name)))
|
||||
{
|
||||
if (stm == null) return null;
|
||||
data = new byte[stm.Length];
|
||||
stm.Read(data, 0, data.Length);
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
public static Bitmap GetIconAsImage(string Name)
|
||||
{
|
||||
Stream stm = typeof(ResourceManager).Assembly.GetManifestResourceStream(string.Format("NzbDrone.Core.{0}.ico", Name));
|
||||
if (stm == null) return null;
|
||||
Bitmap bmp;
|
||||
using (Icon ico = new Icon(stm))
|
||||
{
|
||||
bmp = new Bitmap(ico.Width, ico.Height);
|
||||
using (Graphics g = Graphics.FromImage(bmp))
|
||||
{
|
||||
g.DrawIcon(ico, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
return bmp;
|
||||
}
|
||||
}
|
||||
}
|
@ -472,9 +472,6 @@
|
||||
<Compile Include="Notifications\Xbmc\XbmcService.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Notifications\Xbmc\ResourceManager.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Notifications\NotificationDefinition.cs" />
|
||||
<Compile Include="Download\Clients\Sabnzbd\SabPriorityType.cs" />
|
||||
<Compile Include="MediaFiles\EpisodeFile.cs" />
|
||||
@ -541,7 +538,6 @@
|
||||
<Content Include="MediaInfo.dll">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="NzbDrone.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Download\Clients\Sabnzbd\Api\" />
|
||||
|
Loading…
Reference in New Issue
Block a user