From 03c5c81bf36d8d4a479535dc644071c5fd47defb Mon Sep 17 00:00:00 2001 From: Jimmy Reichley Date: Wed, 30 Dec 2015 14:31:32 -0500 Subject: [PATCH 1/5] Fix issue where shows without icons would use the last icon that was displayed This was due to JS hoisting our var declaration, so I also made this hoist more clear/explicit. --- dashboard-ui/scripts/livetvcomponents.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboard-ui/scripts/livetvcomponents.js b/dashboard-ui/scripts/livetvcomponents.js index 15f5d2872b..b6d5e9e1ba 100644 --- a/dashboard-ui/scripts/livetvcomponents.js +++ b/dashboard-ui/scripts/livetvcomponents.js @@ -6,8 +6,8 @@ require(['paper-fab', 'paper-item-body', 'paper-icon-item'], function () { var html = ''; - var index = ''; + var imgUrl; for (var i = 0, length = timers.length; i < length; i++) { @@ -31,8 +31,8 @@ html += ''; var program = timer.ProgramInfo || {}; - var imgUrl; + imgUrl = null; if (program.ImageTags && program.ImageTags.Primary) { imgUrl = ApiClient.getScaledImageUrl(program.Id, { From 56b97cc5ef33cb5f4ce3c49029be1146ea211aaf Mon Sep 17 00:00:00 2001 From: Shaun Date: Thu, 7 Jan 2016 17:21:13 +1100 Subject: [PATCH 2/5] add Not Favorite to filters --- dashboard-ui/reports.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dashboard-ui/reports.html b/dashboard-ui/reports.html index 23324352e1..1c5eb320cc 100644 --- a/dashboard-ui/reports.html +++ b/dashboard-ui/reports.html @@ -66,7 +66,7 @@ - +
@@ -106,6 +106,9 @@ + + + From 93f483f0ae3d247bdb321e200104884e501ff377 Mon Sep 17 00:00:00 2001 From: Shaun Date: Fri, 8 Jan 2016 19:11:29 +1100 Subject: [PATCH 3/5] add IMDB, TMDB and TVDB missing filters --- dashboard-ui/reports.html | 9 +++++++++ dashboard-ui/scripts/reports.js | 28 +++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/dashboard-ui/reports.html b/dashboard-ui/reports.html index 1c5eb320cc..3d223544e8 100644 --- a/dashboard-ui/reports.html +++ b/dashboard-ui/reports.html @@ -131,6 +131,15 @@ + + + + + + + + +
diff --git a/dashboard-ui/scripts/reports.js b/dashboard-ui/scripts/reports.js index d570dabf7f..da3ce301a4 100644 --- a/dashboard-ui/scripts/reports.js +++ b/dashboard-ui/scripts/reports.js @@ -502,8 +502,10 @@ $('#chkMissingRating', page).checked(query.HasOfficialRating == false).checkboxradio('refresh'); $('#chkMissingOverview', page).checked(query.HasOverview == false).checkboxradio('refresh'); $('#chkYearMismatch', page).checked(query.IsYearMismatched == true).checkboxradio('refresh'); - $('#chkIsLocked', page).checked(query.IsLocked == true).checkboxradio('refresh'); + $('#chkMissingImdbId', page).checked(query.HasImdbId == false).checkboxradio('refresh'); + $('#chkMissingTmdbId', page).checked(query.HasTmdbId == false).checkboxradio('refresh'); + $('#chkMissingTvdbId', page).checked(query.HasTvdbId == false).checkboxradio('refresh'); //Episodes $('#chkSpecialEpisode', page).checked(query.ParentIndexNumber == 0).checkboxradio('refresh'); @@ -758,6 +760,30 @@ reloadItems(page); }); + $('#chkMissingImdbId', page).on('change', function () { + + query.StartIndex = 0; + query.HasImdbId = this.checked ? false : null; + + reloadItems(page); + }); + + $('#chkMissingTmdbId', page).on('change', function () { + + query.StartIndex = 0; + query.HasTmdbId = this.checked ? false : null; + + reloadItems(page); + }); + + $('#chkMissingTvdbId', page).on('change', function () { + + query.StartIndex = 0; + query.HasTvdbId = this.checked ? false : null; + + reloadItems(page); + }); + $('#chkYearMismatch', page).on('change', function () { query.StartIndex = 0; From 9f4888682905e9f613f3a2b3f4f347381a3dc0a9 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 8 Jan 2016 23:28:09 -0500 Subject: [PATCH 4/5] update chromecast loading --- dashboard-ui/scripts/chromecast.js | 18 ++++++++++++++---- dashboard-ui/scripts/site.js | 6 ++++-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/dashboard-ui/scripts/chromecast.js b/dashboard-ui/scripts/chromecast.js index 04e81a81a5..2374731633 100644 --- a/dashboard-ui/scripts/chromecast.js +++ b/dashboard-ui/scripts/chromecast.js @@ -1,4 +1,4 @@ -(function (window, chrome, console) { +define(['https://www.gstatic.com/cv/js/sender/v1/cast_sender.js'], function () { // Based on https://github.com/googlecast/CastVideos-chrome/blob/master/CastVideos.js var currentResolve; @@ -90,6 +90,8 @@ */ CastPlayer.prototype.initializeCastPlayer = function () { + var chrome = window.chrome; + if (!chrome) { return; } @@ -861,9 +863,17 @@ castPlayer = new CastPlayer(); - MediaController.registerPlayer(new chromecastPlayer()); + var registeredPlayer = new chromecastPlayer(); + MediaController.registerPlayer(registeredPlayer); + + // To allow the native android app to override + document.dispatchEvent(new CustomEvent("chromecastloaded", { + detail: { + player: registeredPlayer + } + })); } - requirejs(["https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"], initializeChromecast); + initializeChromecast(); -})(window, window.chrome, console); \ No newline at end of file +}); \ No newline at end of file diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index f919c61b7c..6a3d21641c 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -2276,16 +2276,18 @@ var AppInfo = {}; if (Dashboard.isRunningInCordova()) { - postInitDependencies.push('cordova/connectsdk'); - if (browserInfo.android) { postInitDependencies.push('cordova/android/mediasession'); + postInitDependencies.push('cordova/android/chromecast'); + } else { postInitDependencies.push('cordova/volume'); } if (browserInfo.safari) { + postInitDependencies.push('cordova/connectsdk/connectsdk'); + postInitDependencies.push('cordova/ios/orientation'); if (Dashboard.capabilities().SupportsSync) { From 4040c6d8d0334c75d43c18cf46f66ad1d409165e Mon Sep 17 00:00:00 2001 From: Shaun Date: Tue, 12 Jan 2016 13:22:52 +1100 Subject: [PATCH 5/5] add a new endpoint param IsFavorite and use it for reports --- dashboard-ui/reports.html | 16 ++++++++++------ dashboard-ui/scripts/reports.js | 28 ++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/dashboard-ui/reports.html b/dashboard-ui/reports.html index 3d223544e8..f413932344 100644 --- a/dashboard-ui/reports.html +++ b/dashboard-ui/reports.html @@ -103,17 +103,21 @@ - - - - - - + +
+ + +
+

diff --git a/dashboard-ui/scripts/reports.js b/dashboard-ui/scripts/reports.js index da3ce301a4..a7bd561539 100644 --- a/dashboard-ui/scripts/reports.js +++ b/dashboard-ui/scripts/reports.js @@ -513,6 +513,19 @@ $('#chkFutureEpisode', page).checked(query.IsUnaired == true).checkboxradio('refresh'); $('#selectIncludeItemTypes').val(query.IncludeItemTypes); + + // isfavorite + if (query.IsFavorite == true) { + $('#isFavorite').val("true"); + } + else if (query.IsFavorite == false) { + $('#isFavorite').val("false"); + } + else { + $('#isFavorite').val("-"); + } + + } var filtersLoaded; @@ -601,6 +614,21 @@ reloadItems(page); }); + $('#isFavorite', page).on('change', function () { + + if (this.value == "true") { + query.IsFavorite = true; + } + else if (this.value == "false") { + query.IsFavorite = false; + } + else { + query.IsFavorite = null; + } + query.StartIndex = 0; + reloadItems(page); + }); + $('.chkStandardFilter', this).on('change', function () { var filterName = this.getAttribute('data-filter');