diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index f46540d589..2186041406 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -325,7 +325,7 @@ return '
' + item.RecentlyAddedItemCount + ' New
'; } - if (!item.IsFolder) { + if (!item.IsFolder && item.Type !== "Genre" && item.Type !== "Studio" && item.Type !== "Person") { var date = item.DateCreated; diff --git a/dashboard-ui/scripts/moviestudios.js b/dashboard-ui/scripts/moviestudios.js index 5f282702bb..59a006c053 100644 --- a/dashboard-ui/scripts/moviestudios.js +++ b/dashboard-ui/scripts/moviestudios.js @@ -1 +1,60 @@ - \ No newline at end of file +(function ($, document) { + + // The base query options + var query = { + + SortBy: "SortName", + SortOrder: "Ascending", + IncludeItemTypes: "Movie", + Recursive: true, + Fields: "PrimaryImageAspectRatio,ItemCounts,DateCreated,UserData", + Limit: LibraryBrowser.getDetaultPageSize(), + StartIndex: 0 + }; + + function reloadItems(page) { + + Dashboard.showLoadingMsg(); + + ApiClient.getStudios(Dashboard.getCurrentUserId(), query).done(function (result) { + + var html = ''; + + var showPaging = result.TotalRecordCount > query.Limit; + + if (showPaging) { + html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true); + } + + html += LibraryBrowser.getPosterDetailViewHtml({ + items: result.Items, + useAverageAspectRatio: true, + countNameSingular: "Movie", + countNamePlural: "Movies" + }); + + if (showPaging) { + html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount); + } + + var elem = $('#items', page).html(html).trigger('create'); + + $('select', elem).on('change', function () { + query.StartIndex = (parseInt(this.value) - 1) * query.Limit; + reloadItems(page); + }); + + Dashboard.hideLoadingMsg(); + }); + } + + $(document).on('pagebeforeshow', "#movieStudiosPage", function () { + + reloadItems(this); + + }).on('pageshow', "#movieStudiosPage", function () { + + + }); + +})(jQuery, document); \ No newline at end of file diff --git a/dashboard-ui/scripts/tvstudios.js b/dashboard-ui/scripts/tvstudios.js index 5f282702bb..3cee6262b5 100644 --- a/dashboard-ui/scripts/tvstudios.js +++ b/dashboard-ui/scripts/tvstudios.js @@ -1 +1,60 @@ - \ No newline at end of file +(function ($, document) { + + // The base query options + var query = { + + SortBy: "SortName", + SortOrder: "Ascending", + IncludeItemTypes: "Series", + Recursive: true, + Fields: "PrimaryImageAspectRatio,ItemCounts,DateCreated,UserData", + Limit: LibraryBrowser.getDetaultPageSize(), + StartIndex: 0 + }; + + function reloadItems(page) { + + Dashboard.showLoadingMsg(); + + ApiClient.getStudios(Dashboard.getCurrentUserId(), query).done(function (result) { + + var html = ''; + + var showPaging = result.TotalRecordCount > query.Limit; + + if (showPaging) { + html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true); + } + + html += LibraryBrowser.getPosterDetailViewHtml({ + items: result.Items, + useAverageAspectRatio: true, + countNameSingular: "Show", + countNamePlural: "Shows" + }); + + if (showPaging) { + html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount); + } + + var elem = $('#items', page).html(html).trigger('create'); + + $('select', elem).on('change', function () { + query.StartIndex = (parseInt(this.value) - 1) * query.Limit; + reloadItems(page); + }); + + Dashboard.hideLoadingMsg(); + }); + } + + $(document).on('pagebeforeshow', "#tvStudiosPage", function () { + + reloadItems(this); + + }).on('pageshow', "#tvStudiosPage", function () { + + + }); + +})(jQuery, document); \ No newline at end of file diff --git a/dashboard-ui/tvgenres.html b/dashboard-ui/tvgenres.html index 767aa3a28f..08e36adab0 100644 --- a/dashboard-ui/tvgenres.html +++ b/dashboard-ui/tvgenres.html @@ -13,6 +13,7 @@ Shows Genres Actors + Networks
diff --git a/dashboard-ui/tvrecommended.html b/dashboard-ui/tvrecommended.html index 9cab28f804..8b2a8ce8a6 100644 --- a/dashboard-ui/tvrecommended.html +++ b/dashboard-ui/tvrecommended.html @@ -13,6 +13,7 @@ Shows Genres Actors + Networks

Latest Unwatched Episodes

diff --git a/dashboard-ui/tvseries.html b/dashboard-ui/tvseries.html index 3842bf8287..955ab1ffb5 100644 --- a/dashboard-ui/tvseries.html +++ b/dashboard-ui/tvseries.html @@ -15,6 +15,7 @@ Shows Genres Actors + Networks
diff --git a/dashboard-ui/tvshows.html b/dashboard-ui/tvshows.html index 7258c81b83..724fe998e4 100644 --- a/dashboard-ui/tvshows.html +++ b/dashboard-ui/tvshows.html @@ -13,6 +13,7 @@ Shows Genres Actors + Networks
diff --git a/dashboard-ui/tvstudios.html b/dashboard-ui/tvstudios.html index 755f822eac..b6eb18c4a0 100644 --- a/dashboard-ui/tvstudios.html +++ b/dashboard-ui/tvstudios.html @@ -1,11 +1,24 @@  - - + - - + Media Browser - +
+

+ TV Shows

+
+ +
+
+
+
+
- \ No newline at end of file +