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
11 changed files with 289 additions and 185 deletions
+8 -4
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 = '';