mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-15 18:08:17 -07:00
Merge pull request #6020 from thornbill/tag-list-view
This commit is contained in:
commit
ee29a98aef
@ -673,6 +673,16 @@ class AppRouter {
|
||||
return url;
|
||||
}
|
||||
|
||||
if (item === 'tag') {
|
||||
url = `#/list.html?type=tag&tag=${encodeURIComponent(options.tag)}&serverId=${serverId}`;
|
||||
|
||||
if (options.parentId) {
|
||||
url += '&parentId=' + options.parentId;
|
||||
}
|
||||
|
||||
return url;
|
||||
}
|
||||
|
||||
if (context !== 'folders' && !itemHelper.isLocalItem(item)) {
|
||||
if (item.CollectionType == CollectionType.Movies) {
|
||||
url = `#/movies.html?topParentId=${item.Id}&collectionType=${item.CollectionType}`;
|
||||
|
@ -1313,8 +1313,12 @@ function renderTags(page, item) {
|
||||
}
|
||||
|
||||
tags.forEach(tag => {
|
||||
const href = appRouter.getRouteUrl('tag', {
|
||||
tag,
|
||||
serverId: item.ServerId
|
||||
});
|
||||
tagElements.push(
|
||||
`<a href="#/search.html?query=${encodeURIComponent(tag)}" class="button-link emby-button" is="emby-linkbutton">`
|
||||
`<a href="${href}" class="button-link emby-button" is="emby-linkbutton">`
|
||||
+ escapeHtml(tag)
|
||||
+ '</a>'
|
||||
);
|
||||
|
@ -284,7 +284,8 @@ function getItems(instance, params, item, sortBy, startIndex, limit) {
|
||||
Recursive: true,
|
||||
IsFavorite: params.IsFavorite === 'true' || null,
|
||||
ArtistIds: params.artistId || null,
|
||||
SortBy: sortBy
|
||||
SortBy: sortBy,
|
||||
Tags: params.tag || null
|
||||
}));
|
||||
}
|
||||
|
||||
@ -333,7 +334,7 @@ function getItems(instance, params, item, sortBy, startIndex, limit) {
|
||||
}
|
||||
|
||||
function getItem(params) {
|
||||
if (params.type === 'Recordings' || params.type === 'Programs' || params.type === 'nextup') {
|
||||
if ([ 'Recordings', 'Programs', 'nextup', 'tag' ].includes(params.type)) {
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
@ -726,6 +727,10 @@ class ItemsView {
|
||||
if (params.type === 'Video') {
|
||||
return globalize.translate('Videos');
|
||||
}
|
||||
|
||||
if (params.tag) {
|
||||
return params.tag;
|
||||
}
|
||||
}
|
||||
|
||||
function play() {
|
||||
@ -1207,7 +1212,7 @@ class ItemsView {
|
||||
showTitle = true;
|
||||
} else if (showTitle === 'false') {
|
||||
showTitle = false;
|
||||
} else if (params.type === 'Programs' || params.type === 'Recordings' || params.type === 'Person' || params.type === 'nextup' || params.type === 'Audio' || params.type === 'MusicAlbum' || params.type === 'MusicArtist') {
|
||||
} else if ([ 'Audio', 'MusicAlbum', 'MusicArtist', 'Person', 'Programs', 'Recordings', 'nextup', 'tag' ].includes(params.type)) {
|
||||
showTitle = true;
|
||||
} else if (item && item.Type !== 'PhotoAlbum') {
|
||||
showTitle = true;
|
||||
@ -1224,7 +1229,7 @@ class ItemsView {
|
||||
}
|
||||
|
||||
return {
|
||||
showTitle: showTitle,
|
||||
showTitle,
|
||||
showYear: userSettings.get(basekey + '-showYear') !== 'false',
|
||||
imageType: imageType || 'primary',
|
||||
viewType: userSettings.get(basekey + '-viewType') || 'images'
|
||||
|
Loading…
Reference in New Issue
Block a user