diff --git a/src/controllers/dashboardpage.js b/src/controllers/dashboardpage.js index 699c80c80..63c6f3226 100644 --- a/src/controllers/dashboardpage.js +++ b/src/controllers/dashboardpage.js @@ -623,7 +623,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa } }, getClientImage: function (connection) { - var iconUrl = imageHelper.getDeviceIcon(connection.DeviceName); + var iconUrl = imageHelper.getDeviceIcon(connection); return ""; }, getNowPlayingImageUrl: function (item) { diff --git a/src/controllers/devices.js b/src/controllers/devices.js index 897282a0e..4c8c37eed 100644 --- a/src/controllers/devices.js +++ b/src/controllers/devices.js @@ -74,7 +74,7 @@ define(["loading", "dom", "libraryMenu", "globalize", "scripts/imagehelper", "hu deviceHtml += '
'; deviceHtml += '
'; deviceHtml += ''; - var iconUrl = imageHelper.getDeviceIcon(device.Name); + var iconUrl = imageHelper.getDeviceIcon(device); if (iconUrl) { deviceHtml += '
"; diff --git a/src/img/devices/kodi.svg b/src/img/devices/kodi.svg new file mode 100644 index 000000000..20a10194f --- /dev/null +++ b/src/img/devices/kodi.svg @@ -0,0 +1,83 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + diff --git a/src/scripts/imagehelper.js b/src/scripts/imagehelper.js index 486a030a5..fc16994bb 100644 --- a/src/scripts/imagehelper.js +++ b/src/scripts/imagehelper.js @@ -3,26 +3,31 @@ define(["browser"], function (browser) { function getDeviceIcon(device) { var baseUrl = "img/devices/"; - switch (device) { - case "Opera": - case "Opera TV": - return baseUrl + "opera.svg"; + switch (device.AppName) { case "Samsung Smart TV": return baseUrl + "samsung.svg"; case "Xbox One": return baseUrl + "xbox.svg"; case "Sony PS4": return baseUrl + "playstation.svg"; - case "Chrome": - return baseUrl + "chrome.svg"; - case "Firefox": - return baseUrl + "firefox.svg"; - case "Edge": - return baseUrl + "edge.svg"; - case "Internet Explorer": - return baseUrl + "msie.svg"; - case "Web Browser": - return baseUrl + "html5.svg"; + case "Kodi": + return baseUrl + "kodi.svg"; + case "Jellyfin Web": + switch (device.Name) { + case "Opera": + case "Opera TV": + return baseUrl + "opera.svg"; + case "Chrome": + return baseUrl + "chrome.svg"; + case "Firefox": + return baseUrl + "firefox.svg"; + case "Edge": + return baseUrl + "edge.svg"; + case "Internet Explorer": + return baseUrl + "msie.svg"; + default: + return baseUrl + "html5.svg"; + } default: return baseUrl + "other.svg"; } @@ -61,4 +66,4 @@ define(["browser"], function (browser) { getDeviceIcon: getDeviceIcon, getLibraryIcon: getLibraryIcon }; -}); \ No newline at end of file +});