diff --git a/dashboard-ui/css/images/editor/missing.png b/dashboard-ui/css/images/editor/missing.png new file mode 100644 index 0000000000..f4a7ff98a3 Binary files /dev/null and b/dashboard-ui/css/images/editor/missing.png differ diff --git a/dashboard-ui/itemdetails.html b/dashboard-ui/itemdetails.html index 2cc7a7b739..fe3e036ed0 100644 --- a/dashboard-ui/itemdetails.html +++ b/dashboard-ui/itemdetails.html @@ -127,6 +127,9 @@ Next →
+ diff --git a/dashboard-ui/scripts/Itemdetailpage.js b/dashboard-ui/scripts/Itemdetailpage.js index 6ddb8167e2..3cb4a605a9 100644 --- a/dashboard-ui/scripts/Itemdetailpage.js +++ b/dashboard-ui/scripts/Itemdetailpage.js @@ -25,11 +25,33 @@ LibraryBrowser.renderDetailPageBackdrop(page, item); if (item.LocationType == "Offline") { + $('#offlineIndicator', page).show(); - } else { + } + else { $('#offlineIndicator', page).hide(); } + var isMissingEpisode = false; + + if (item.LocationType == "Virtual" && item.Type == "Episode") { + try { + if (item.PremiereDate && (new Date().getTime() >= parseISO8601Date(item.PremiereDate).getTime())) { + isMissingEpisode = true; + } + } catch (err) { + + } + } + + if (isMissingEpisode) { + + $('#missingIndicator', page).show(); + } + else { + $('#missingIndicator', page).hide(); + } + if (MediaPlayer.canPlay(item) && item.LocationType !== "Offline" && item.LocationType !== "Virtual") { $('#playButtonContainer', page).show(); } else { diff --git a/dashboard-ui/scripts/boxsets.js b/dashboard-ui/scripts/boxsets.js index 244d367de5..caedcf102f 100644 --- a/dashboard-ui/scripts/boxsets.js +++ b/dashboard-ui/scripts/boxsets.js @@ -10,8 +10,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('boxsets', query); function reloadItems(page) { @@ -148,6 +146,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('boxsets', query); + reloadItems(this); }).on('pageshow', "#boxsetsPage", function () { @@ -155,13 +155,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/edititemmetadata.js b/dashboard-ui/scripts/edititemmetadata.js index 38edf7b369..81a991e616 100644 --- a/dashboard-ui/scripts/edititemmetadata.js +++ b/dashboard-ui/scripts/edititemmetadata.js @@ -44,6 +44,18 @@ } } + if (item.Type == "Episode" && item.LocationType == "Virtual") { + + try { + if (item.PremiereDate && (new Date().getTime() >= parseISO8601Date(item.PremiereDate).getTime())) { + htmlName += ''; + } + } catch (err) { + + } + + } + htmlName += "
"; var rel = item.IsFolder ? 'folder' : 'default'; diff --git a/dashboard-ui/scripts/episodes.js b/dashboard-ui/scripts/episodes.js index 46a2a1b896..619ba81175 100644 --- a/dashboard-ui/scripts/episodes.js +++ b/dashboard-ui/scripts/episodes.js @@ -255,13 +255,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = (query.SortBy || '').toLowerCase() == (this.getAttribute('data-sortby') || '').toLowerCase(); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = (query.SortOrder || '').toLowerCase() == (this.getAttribute('data-sortorder') || '').toLowerCase(); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/gamegenrepage.js b/dashboard-ui/scripts/gamegenrepage.js index aa032c9dab..7f92d489c5 100644 --- a/dashboard-ui/scripts/gamegenrepage.js +++ b/dashboard-ui/scripts/gamegenrepage.js @@ -9,8 +9,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('gamegenres', query); function reloadItems(page) { @@ -111,6 +109,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('gamegenres', query); + reloadItems(this); }).on('pageshow', "#gameGenresPage", function () { @@ -118,13 +118,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); }); diff --git a/dashboard-ui/scripts/gamespage.js b/dashboard-ui/scripts/gamespage.js index bacfa7b569..1991714194 100644 --- a/dashboard-ui/scripts/gamespage.js +++ b/dashboard-ui/scripts/gamespage.js @@ -13,8 +13,6 @@ Fields: "Genres,Studios,PrimaryImageAspectRatio", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('games', query); function reloadItems(page) { @@ -201,6 +199,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('games', query); + reloadItems(this); }).on('pageshow', "#gamesPage", function () { @@ -209,13 +209,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/gamestudiospage.js b/dashboard-ui/scripts/gamestudiospage.js index ce2a5c9c23..0beeba2d1f 100644 --- a/dashboard-ui/scripts/gamestudiospage.js +++ b/dashboard-ui/scripts/gamestudiospage.js @@ -10,8 +10,6 @@ Fields: "UserData", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('gamestudios', query); function reloadItems(page) { @@ -112,6 +110,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('gamestudios', query); + reloadItems(this); }).on('pageshow', "#gameStudiosPage", function () { @@ -119,13 +119,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/gamesystemspage.js b/dashboard-ui/scripts/gamesystemspage.js index 5b964543a6..c3ada8a30e 100644 --- a/dashboard-ui/scripts/gamesystemspage.js +++ b/dashboard-ui/scripts/gamesystemspage.js @@ -11,8 +11,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('gamesystems', query); function reloadItems(page) { @@ -112,6 +110,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('gamesystems', query); + reloadItems(this); }).on('pageshow', "#gamesystemsPage", function () { @@ -119,13 +119,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/itemlistpage.js b/dashboard-ui/scripts/itemlistpage.js index aa519506b9..7c800ccaa8 100644 --- a/dashboard-ui/scripts/itemlistpage.js +++ b/dashboard-ui/scripts/itemlistpage.js @@ -189,13 +189,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index a62fec4fe3..fcdab652a7 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -861,12 +861,6 @@ return ''; } - if (item.Type == "Season") { - if (item.RecursiveUnplayedItemCount) { - return '
' + item.RecursiveUnplayedItemCount + ' New
'; - } - } - if (item.Type == "Series") { if (item.RecursiveUnplayedItemCount && item.PlayedPercentage) { return '
' + item.RecursiveUnplayedItemCount + ' New
'; diff --git a/dashboard-ui/scripts/moviegenres.js b/dashboard-ui/scripts/moviegenres.js index 640ad4c40e..bc2fe973c5 100644 --- a/dashboard-ui/scripts/moviegenres.js +++ b/dashboard-ui/scripts/moviegenres.js @@ -10,8 +10,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('moviegenres', query); function reloadItems(page) { @@ -112,6 +110,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('moviegenres', query); + reloadItems(this); }).on('pageshow', "#movieGenresPage", function () { @@ -119,13 +119,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); }); diff --git a/dashboard-ui/scripts/moviepeople.js b/dashboard-ui/scripts/moviepeople.js index 0bf39b83b4..16396ddd7d 100644 --- a/dashboard-ui/scripts/moviepeople.js +++ b/dashboard-ui/scripts/moviepeople.js @@ -11,8 +11,6 @@ PersonTypes: "", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('moviepeople', query); function reloadItems(page) { @@ -144,6 +142,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('moviepeople', query); + reloadItems(this); }).on('pageshow', "#moviePeoplePage", function () { @@ -151,13 +151,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/movies.js b/dashboard-ui/scripts/movies.js index 53ebcaaa28..175233db66 100644 --- a/dashboard-ui/scripts/movies.js +++ b/dashboard-ui/scripts/movies.js @@ -13,8 +13,6 @@ StartIndex: 0 }; - LibraryBrowser.loadSavedQueryValues('movies', query); - function reloadItems(page) { Dashboard.showLoadingMsg(); @@ -232,6 +230,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('movies', query); + reloadItems(this); }).on('pageshow', "#moviesPage", function () { @@ -239,13 +239,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/moviestudios.js b/dashboard-ui/scripts/moviestudios.js index 8ecef03130..fc85e18539 100644 --- a/dashboard-ui/scripts/moviestudios.js +++ b/dashboard-ui/scripts/moviestudios.js @@ -10,8 +10,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('moviestudios', query); function reloadItems(page) { @@ -112,6 +110,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('moviestudios', query); + reloadItems(this); }).on('pageshow', "#movieStudiosPage", function () { @@ -119,13 +119,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/movietrailers.js b/dashboard-ui/scripts/movietrailers.js index 9a0570ad5b..0ce488c40a 100644 --- a/dashboard-ui/scripts/movietrailers.js +++ b/dashboard-ui/scripts/movietrailers.js @@ -12,8 +12,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('movietrailers', query); function reloadItems(page) { @@ -144,6 +142,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('movietrailers', query); + reloadItems(this); }).on('pageshow', "#movieTrailersPage", function () { @@ -152,13 +152,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/musicalbums.js b/dashboard-ui/scripts/musicalbums.js index 3221476295..31bbf3dbea 100644 --- a/dashboard-ui/scripts/musicalbums.js +++ b/dashboard-ui/scripts/musicalbums.js @@ -12,8 +12,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('musicalbums', query); function reloadItems(page) { @@ -176,6 +174,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('musicalbums', query); + reloadItems(this); }).on('pageshow', "#musicAlbumsPage", function () { @@ -185,13 +185,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/musicartists.js b/dashboard-ui/scripts/musicartists.js index 85ec1af94b..ee80c9b531 100644 --- a/dashboard-ui/scripts/musicartists.js +++ b/dashboard-ui/scripts/musicartists.js @@ -9,8 +9,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('musicartists', query); function reloadItems(page) { @@ -127,6 +125,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('musicartists', query); + reloadItems(this); }).on('pageshow', "#musicArtistsPage", function () { @@ -134,13 +134,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/musicgenres.js b/dashboard-ui/scripts/musicgenres.js index 2cef3cb51a..3985244dfd 100644 --- a/dashboard-ui/scripts/musicgenres.js +++ b/dashboard-ui/scripts/musicgenres.js @@ -10,8 +10,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('musicgenres', query); function reloadItems(page) { @@ -112,6 +110,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('musicgenres', query); + reloadItems(this); }).on('pageshow', "#musicGenresPage", function () { @@ -119,13 +119,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); }); diff --git a/dashboard-ui/scripts/musicvideos.js b/dashboard-ui/scripts/musicvideos.js index 83478ead2e..cfe24bd664 100644 --- a/dashboard-ui/scripts/musicvideos.js +++ b/dashboard-ui/scripts/musicvideos.js @@ -12,8 +12,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('musicvideos', query); function reloadItems(page) { @@ -224,6 +222,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('musicvideos', query); + reloadItems(this); }).on('pageshow', "#musicVideosPage", function () { @@ -231,13 +231,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/songs.js b/dashboard-ui/scripts/songs.js index 5506ca7a16..b363d5e10f 100644 --- a/dashboard-ui/scripts/songs.js +++ b/dashboard-ui/scripts/songs.js @@ -21,13 +21,13 @@ // Reset form values using the last used query $('.radioSortBy', page).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); - $('.radioSortOrder', page).each(function () { + $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); } diff --git a/dashboard-ui/scripts/tvgenres.js b/dashboard-ui/scripts/tvgenres.js index 0af8b451b8..39f94e9c05 100644 --- a/dashboard-ui/scripts/tvgenres.js +++ b/dashboard-ui/scripts/tvgenres.js @@ -10,8 +10,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('tvgenres', query); function reloadItems(page) { @@ -112,6 +110,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('tvgenres', query); + reloadItems(this); }).on('pageshow', "#tvGenresPage", function () { @@ -119,13 +119,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/tvpeople.js b/dashboard-ui/scripts/tvpeople.js index 31d7f7a00e..72b0235226 100644 --- a/dashboard-ui/scripts/tvpeople.js +++ b/dashboard-ui/scripts/tvpeople.js @@ -11,8 +11,6 @@ PersonTypes: "", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('tvpeople', query); function reloadItems(page) { @@ -144,6 +142,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('tvpeople', query); + reloadItems(this); }).on('pageshow', "#tvPeoplePage", function () { @@ -151,13 +151,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/tvshows.js b/dashboard-ui/scripts/tvshows.js index 467b2059c7..ac43039f60 100644 --- a/dashboard-ui/scripts/tvshows.js +++ b/dashboard-ui/scripts/tvshows.js @@ -12,8 +12,6 @@ Fields: "SeriesInfo,DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('tvshows', query); function reloadItems(page) { @@ -225,6 +223,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('tvshows', query); + reloadItems(this); }).on('pageshow', "#tvShowsPage", function () { @@ -232,7 +232,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); + + }).checkboxradio('refresh'); + + $('.radioSortOrder', this).each(function () { + + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); @@ -245,12 +251,6 @@ }).checkboxradio('refresh'); - $('.radioSortOrder', this).each(function () { - - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); - - }).checkboxradio('refresh'); - $('.chkStandardFilter', this).each(function () { var filters = "," + (query.Filters || ""); diff --git a/dashboard-ui/scripts/tvstudios.js b/dashboard-ui/scripts/tvstudios.js index ed516eb9d5..bb5f9e5806 100644 --- a/dashboard-ui/scripts/tvstudios.js +++ b/dashboard-ui/scripts/tvstudios.js @@ -10,8 +10,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('tvstudios', query); function reloadItems(page) { @@ -112,6 +110,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('tvstudios', query); + reloadItems(this); }).on('pageshow', "#tvStudiosPage", function () { @@ -119,13 +119,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh');