You've already forked Sonarr
							
							
				mirror of
				https://github.com/Sonarr/Sonarr.git
				synced 2025-10-31 00:07:55 +02:00 
			
		
		
		
	Fixed XBMC notification image
This commit is contained in:
		
							
								
								
									
										
											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 @@ 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); | ||||
|   | ||||
| @@ -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); | ||||
|   | ||||
| @@ -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; | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @@ -541,7 +541,6 @@ | ||||
|     <Content Include="MediaInfo.dll"> | ||||
|       <CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||||
|     </Content> | ||||
|     <Content Include="NzbDrone.ico" /> | ||||
|   </ItemGroup> | ||||
|   <ItemGroup> | ||||
|     <Folder Include="Download\Clients\Sabnzbd\Api\" /> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user