diff --git a/dashboard-ui/scripts/tvnextup.js b/dashboard-ui/scripts/tvnextup.js new file mode 100644 index 0000000000..6a65e8b712 --- /dev/null +++ b/dashboard-ui/scripts/tvnextup.js @@ -0,0 +1,44 @@ +(function ($, document) { + + $(document).on('pagebeforeshow', "#tvNextUpPage", function () { + + var page = this; + + var options = { + + Limit: 24, + Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated", + UserId: Dashboard.getCurrentUserId() + }; + + $.getJSON(ApiClient.getUrl("Shows/NextUp", options)).done(function (result) { + + if (result.Items.length) { + $('#resumableSection', page).show(); + } else { + $('#resumableSection', page).hide(); + } + + if (result.Items.length) { + + $('#nextUpItems', page).html(LibraryBrowser.getPosterViewHtml({ + items: result.Items, + useAverageAspectRatio: true, + shape: "backdrop", + showTitle: true, + showParentTitle: true + + })); + + } else { + + $('#nextUpItems', page).html('

None found. Start watching your shows!

'); + + } + + }); + + }); + + +})(jQuery, document); \ No newline at end of file diff --git a/dashboard-ui/tvnextup.html b/dashboard-ui/tvnextup.html new file mode 100644 index 0000000000..09b80bf80c --- /dev/null +++ b/dashboard-ui/tvnextup.html @@ -0,0 +1,27 @@ + + + + Media Browser + + +
+

+ TV Shows

+
+ +
+

Next Episodes to Watch

+
+
+
+
+
+ +