From 4a9e2894ef17c44a607b163533313c1b4aa1e652 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 12 Aug 2013 20:12:49 -0700 Subject: [PATCH] Fixed XBMC notification image --- Logo/64.png | Bin 0 -> 1494 bytes .../Notifications/Xbmc/HttpApiProvider.cs | 2 +- .../Notifications/Xbmc/JsonApiProvider.cs | 2 +- .../Notifications/Xbmc/ResourceManager.cs | 58 ------------------ NzbDrone.Core/NzbDrone.Core.csproj | 1 - 5 files changed, 2 insertions(+), 61 deletions(-) create mode 100644 Logo/64.png delete mode 100644 NzbDrone.Core/Notifications/Xbmc/ResourceManager.cs diff --git a/Logo/64.png b/Logo/64.png new file mode 100644 index 0000000000000000000000000000000000000000..8ef72896e811d3436fb8a7021cb1deec6ccfc31f GIT binary patch literal 1494 zcmd5+`BPJ86#eoD$&)|>MIp$PL=&(rQ6W*8I%q=>iEh^}Y#g_3AK!^jC;8Ibs3J3~{0f7R6*;1D7TjIy%u15m^oJ!!*gD=kVFMP~p&`}hM$_nzf0SexX;fUp1n8jc^Ck34Oy zSu#;n7yvn*0N{B5%t0%U0C3O;fKdqm>ni|oO)HMO9Rz@FXh>kdw(KYI^6?_e!jN~X zf!yTZ2S{!2ErS=0&oTQ*`oi42D+?EkD=I(pdo5s?^G<3UDeQ2iu)aK5Wnosh%iRM>A)yO0?5VS z!-YxL*EuJTK?pnbv((zR^ao0DUn_cj31ifSfJjePP(cQ_>uGQFejeX9?}7*cq`(pr zA)z+FL<8mbn0H3O1p?ygmws%vs8G@G%4Sd0fE9{J9h%uNW+Y4){ABl@zwWlbuTq~n zQ*sHQtQL=1ot`yoBqpw6E|_Jnd9HIBLMA0hi{0Y$qP%Bp*or}j5!IL+F6?U8WggF0 z=O+n(RRNuWXEysybudc_$O?JwzP7JuZ871?(=W`&O^vltoW?lAv}|$n(1!ZOIo*knM~#qZEJ9FLp?@>#9itEbuDP$NymXF2 zL)m4eZYgUgnXw|h<@U~VB(eb<2F0{3NGC|} zs(b9jSX78v5cVkZqcK2QGwuO~Em@%&I_}Y2R)|mIeFSWR2V6e-cP1g1nlx7{@O{Z| ze?oh`2TUifZ?r|ViW$&EQ`}d=fHTxs4}fX|`bk>$M&8i@g$8k8;gozTgP~6wMaTxp z1b7TsctH~tAW8be|LYXpBIgf?&+9}J#T(-7IY~6DSqyiRqP8L)G2>#gqmVoM%z>Qp zI6AAr+)*{OJ3*5DhhG18wOyyGmtl#MN#FG&m#J-X8^h6=P)(zY5+OTE>9Mi|Q-{ja zo^{>8eSqc;L;LOu29w7hv`gO6*O_5Gm3-9;skSwKrG9f5&-#QN=AzL56jP0KKPNUl unih80kR6Y)1kCM!Vs!MyP(KCr0Y;5-?>EkzZ>>KVgnShqc;!pU(SHCcJdV5o literal 0 HcmV?d00001 diff --git a/NzbDrone.Core/Notifications/Xbmc/HttpApiProvider.cs b/NzbDrone.Core/Notifications/Xbmc/HttpApiProvider.cs index 7f3755f9c..d03f88473 100644 --- a/NzbDrone.Core/Notifications/Xbmc/HttpApiProvider.cs +++ b/NzbDrone.Core/Notifications/Xbmc/HttpApiProvider.cs @@ -23,7 +23,7 @@ namespace NzbDrone.Core.Notifications.Xbmc 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); diff --git a/NzbDrone.Core/Notifications/Xbmc/JsonApiProvider.cs b/NzbDrone.Core/Notifications/Xbmc/JsonApiProvider.cs index 520c1c3a2..af5fe2366 100644 --- a/NzbDrone.Core/Notifications/Xbmc/JsonApiProvider.cs +++ b/NzbDrone.Core/Notifications/Xbmc/JsonApiProvider.cs @@ -26,7 +26,7 @@ namespace NzbDrone.Core.Notifications.Xbmc 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); diff --git a/NzbDrone.Core/Notifications/Xbmc/ResourceManager.cs b/NzbDrone.Core/Notifications/Xbmc/ResourceManager.cs deleted file mode 100644 index 2eed6b1f9..000000000 --- a/NzbDrone.Core/Notifications/Xbmc/ResourceManager.cs +++ /dev/null @@ -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; - } - } -} diff --git a/NzbDrone.Core/NzbDrone.Core.csproj b/NzbDrone.Core/NzbDrone.Core.csproj index 7cf532b23..0c9133304 100644 --- a/NzbDrone.Core/NzbDrone.Core.csproj +++ b/NzbDrone.Core/NzbDrone.Core.csproj @@ -541,7 +541,6 @@ Always -