1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge branch 'master' into patch-2

This commit is contained in:
Freako 2023-10-18 20:37:05 +00:00 committed by GitHub
commit 84d14c31aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 614 additions and 369 deletions

View file

@ -125,7 +125,8 @@ function renderSection(item, element, type) {
ArtistIds: '',
AlbumArtistIds: '',
Limit: 10,
SortBy: 'SortName'
SortOrder: 'Descending,Desending,Ascending',
SortBy: 'PremiereDate,ProductionYear,SortName'
}, {
shape: 'overflowPortrait',
showTitle: true,
@ -194,7 +195,7 @@ function renderSection(item, element, type) {
PersonTypes: '',
ArtistIds: '',
AlbumArtistIds: '',
SortOrder: 'Descending',
SortOrder: 'Descending,Desending,Ascending',
SortBy: 'PremiereDate,ProductionYear,Sortname'
}, {
shape: 'overflowSquare',

View file

@ -622,6 +622,21 @@ export class UserSettings {
getFilter(key) {
return this.get(key, true);
}
/**
* Gets the current sort values (Legacy - Non-JSON)
* (old views such as list.js [Photos] will
* use this one)
* @param {string} key - Filter key.
* @param {string} defaultSortBy - Default SortBy value.
* @return {Object} sortOptions object
*/
getSortValuesLegacy(key, defaultSortBy) {
return {
sortBy: this.getFilter(key + '-sortby') || defaultSortBy,
sortOrder: this.getFilter(key + '-sortorder') === 'Descending' ? 'Descending' : 'Ascending'
};
}
}
export const currentSettings = new UserSettings;
@ -672,3 +687,4 @@ export const customCss = currentSettings.customCss.bind(currentSettings);
export const disableCustomCss = currentSettings.disableCustomCss.bind(currentSettings);
export const getSavedView = currentSettings.getSavedView.bind(currentSettings);
export const saveViewSetting = currentSettings.saveViewSetting.bind(currentSettings);
export const getSortValuesLegacy = currentSettings.getSortValuesLegacy.bind(currentSettings);