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

Merge pull request #5203 from thornbill/search-query-param

Add support for searching via a url parameter
This commit is contained in:
Bill Thornton 2024-02-21 12:00:22 -05:00 committed by GitHub
commit fbd9a46033
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 289 additions and 185 deletions

View file

@ -1257,12 +1257,16 @@ function renderTags(page, item) {
tags = [];
}
for (let i = 0, length = tags.length; i < length; i++) {
tagElements.push(tags[i]);
}
tags.forEach(tag => {
tagElements.push(
`<a href="#/search.html?query=${encodeURIComponent(tag)}" class="button-link emby-button" is="emby-linkbutton">`
+ escapeHtml(tag)
+ '</a>'
);
});
if (tagElements.length) {
itemTags.innerText = globalize.translate('TagsValue', tagElements.join(', '));
itemTags.innerHTML = globalize.translate('TagsValue', tagElements.join(', '));
itemTags.classList.remove('hide');
} else {
itemTags.innerHTML = '';