diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js index 47caa8ad60..ee545bc980 100644 --- a/dashboard-ui/scripts/mediaplayer.js +++ b/dashboard-ui/scripts/mediaplayer.js @@ -71,11 +71,13 @@ var imageTags = item.ImageTags || {}; var html = ''; + var url = ""; + if (item.BackdropImageTags && item.BackdropImageTags.length) { url = ApiClient.getImageUrl(item.Id, { type: "Backdrop", - height: 30, + height: 36, tag: item.BackdropImageTags[0] }); } @@ -83,7 +85,7 @@ url = ApiClient.getImageUrl(item.Id, { type: "Thumb", - height: 30, + height: 36, tag: item.ImageTags.Thumb }); } @@ -91,7 +93,7 @@ url = ApiClient.getImageUrl(item.Id, { type: "Primary", - height: 30, + height: 36, tag: item.ImageTags.Primary }); }else { @@ -111,7 +113,7 @@ series_name = item.SeriesName || item.Album || item.ProductionYear; } - html += "
"; + html += "
"; html += '
'+name+'
'+series_name+'
'; $('#mediaInfo', nowPlayingBar).html(html); diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 743f52e22e..e86d969b4c 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -897,8 +897,10 @@ var Dashboard = { $(ApiClient).on("websocketmessage", Dashboard.onWebSocketMessageReceived); }, - onWebSocketMessageReceived: function (msg) { + onWebSocketMessageReceived: function (e, data) { + var msg = data; + if (msg.MessageType === "LibraryChanged") { Dashboard.processLibraryUpdateNotification(msg.Data); } @@ -908,7 +910,7 @@ var Dashboard = { else if (msg.MessageType === "SystemInfo") { Dashboard.updateSystemInfo(msg.Data); } - else if (msg.MessageType === "HasPendingRestartChanged") { + else if (msg.MessageType === "RestartRequired") { Dashboard.updateSystemInfo(msg.Data); } else if (msg.MessageType === "UserUpdated") { @@ -937,7 +939,7 @@ var Dashboard = { Dashboard.showPackageInstallNotification(msg.Data, "progress"); Dashboard.refreshSystemInfoFromServer(); } - else if (msg.MessageType === "ScheduledTaskEndExecute") { + else if (msg.MessageType === "ScheduledTaskEnded") { Dashboard.showTaskCompletionNotification(msg.Data); } @@ -1092,7 +1094,7 @@ var Dashboard = { type: "Primary" }); - if (!item.Id || data.icon.indexOf("undefined") != -1) { + if (!item.Id || !data.icon) { alert("bad image url: " + JSON.stringify(item)); console.log("bad image url: " + JSON.stringify(item));