mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
save sort order for movies
This commit is contained in:
parent
4ed4238b7c
commit
8020a68640
2 changed files with 40 additions and 4 deletions
|
@ -18,6 +18,34 @@
|
||||||
return 20;
|
return 20;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
loadSavedQueryValues: function (key, query) {
|
||||||
|
|
||||||
|
var values = localStorage.getItem(key + '_' + Dashboard.getCurrentUserId());
|
||||||
|
|
||||||
|
if (values) {
|
||||||
|
|
||||||
|
values = JSON.parse(values);
|
||||||
|
|
||||||
|
return $.extend(query, values);
|
||||||
|
}
|
||||||
|
|
||||||
|
return query;
|
||||||
|
},
|
||||||
|
|
||||||
|
saveQueryValues: function (key, query) {
|
||||||
|
|
||||||
|
var values = {};
|
||||||
|
|
||||||
|
if (query.SortBy) {
|
||||||
|
values.SortBy = query.SortBy;
|
||||||
|
}
|
||||||
|
if (query.SortOrder) {
|
||||||
|
values.SortOrder = query.SortOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
localStorage.setItem(key + '_' + Dashboard.getCurrentUserId(), JSON.stringify(values));
|
||||||
|
},
|
||||||
|
|
||||||
getPosterDetailViewHtml: function (options) {
|
getPosterDetailViewHtml: function (options) {
|
||||||
|
|
||||||
var items = options.items;
|
var items = options.items;
|
||||||
|
@ -1008,8 +1036,12 @@
|
||||||
else if (item.Type == "Person")
|
else if (item.Type == "Person")
|
||||||
links.push('<a class="textlink" href="http://www.themoviedb.org/person/' + providerIds.Tmdb + '" target="_blank">TheMovieDB</a>');
|
links.push('<a class="textlink" href="http://www.themoviedb.org/person/' + providerIds.Tmdb + '" target="_blank">TheMovieDB</a>');
|
||||||
}
|
}
|
||||||
if (providerIds.Tvdb)
|
if (providerIds.Tvdb) {
|
||||||
|
|
||||||
|
if (item.Type == "Series") {
|
||||||
links.push('<a class="textlink" href="http://thetvdb.com/index.php?tab=series&id=' + providerIds.Tvdb + '" target="_blank">TheTVDB</a>');
|
links.push('<a class="textlink" href="http://thetvdb.com/index.php?tab=series&id=' + providerIds.Tvdb + '" target="_blank">TheTVDB</a>');
|
||||||
|
}
|
||||||
|
}
|
||||||
if (providerIds.Tvcom) {
|
if (providerIds.Tvcom) {
|
||||||
if (item.Type == "Episode")
|
if (item.Type == "Episode")
|
||||||
links.push('<a class="textlink" href="http://www.tv.com/shows/' + providerIds.Tvcom + '" target="_blank">TV.com</a>');
|
links.push('<a class="textlink" href="http://www.tv.com/shows/' + providerIds.Tvcom + '" target="_blank">TV.com</a>');
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
StartIndex: 0
|
StartIndex: 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
LibraryBrowser.loadSavedQueryValues('movies', query);
|
||||||
|
|
||||||
function reloadItems(page) {
|
function reloadItems(page) {
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
@ -78,6 +80,8 @@
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
LibraryBrowser.saveQueryValues('movies', query);
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue