mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-04 13:49:57 -05:00
The Any Tag filter works on the Videos, Archives and Docs searches (#958)
The filter modal on these pages offered "Any Tag", but only the Files search sent it; the module searches had no `any_tag` field. Docs also matched any of the listed tag_names, while every other search requires all of them. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a0f30a0a60
commit
2800112f3e
16 changed files with 189 additions and 30 deletions
|
|
@ -196,7 +196,7 @@ export async function tagChannelInfo(channelId, tagName) {
|
|||
});
|
||||
}
|
||||
|
||||
export async function searchVideos(offset, limit, channelId, searchStr, order_by, tagNames, headline, censored, deep) {
|
||||
export async function searchVideos(offset, limit, channelId, searchStr, order_by, tagNames, headline, censored, deep, anyTag) {
|
||||
// Build a search query to retrieve a list of videos from the API
|
||||
offset = parseInt(offset || 0);
|
||||
limit = parseInt(limit || DEFAULT_LIMIT);
|
||||
|
|
@ -220,6 +220,9 @@ export async function searchVideos(offset, limit, channelId, searchStr, order_by
|
|||
if (deep) {
|
||||
body['deep'] = true;
|
||||
}
|
||||
if (anyTag) {
|
||||
body['any_tag'] = true;
|
||||
}
|
||||
|
||||
console.debug('searching videos', body);
|
||||
|
||||
|
|
@ -852,7 +855,7 @@ export async function saveCatalog(items) {
|
|||
}
|
||||
|
||||
|
||||
export async function searchArchives(offset, limit, domain, searchStr, order, tagNames, headline, deep) {
|
||||
export async function searchArchives(offset, limit, domain, searchStr, order, tagNames, headline, deep, anyTag) {
|
||||
// Build a search query to retrieve a list of videos from the API
|
||||
offset = parseInt(offset || 0);
|
||||
limit = parseInt(limit || DEFAULT_LIMIT);
|
||||
|
|
@ -875,6 +878,9 @@ export async function searchArchives(offset, limit, domain, searchStr, order, ta
|
|||
if (deep) {
|
||||
body['deep'] = true;
|
||||
}
|
||||
if (anyTag) {
|
||||
body['any_tag'] = true;
|
||||
}
|
||||
|
||||
console.debug('searching archives', body);
|
||||
const response = await apiPost(`${ARCHIVES_API}/search`, body);
|
||||
|
|
@ -2438,7 +2444,7 @@ export async function getDoc(fileGroupId) {
|
|||
}
|
||||
|
||||
|
||||
export async function searchDocs(offset, limit, searchStr, order, tagNames, author, subject, mimetype, deep) {
|
||||
export async function searchDocs(offset, limit, searchStr, order, tagNames, author, subject, mimetype, deep, anyTag) {
|
||||
offset = parseInt(offset || 0);
|
||||
limit = parseInt(limit || DEFAULT_LIMIT);
|
||||
let body = {offset, limit};
|
||||
|
|
@ -2463,6 +2469,9 @@ export async function searchDocs(offset, limit, searchStr, order, tagNames, auth
|
|||
if (deep) {
|
||||
body['deep'] = true;
|
||||
}
|
||||
if (anyTag) {
|
||||
body['any_tag'] = true;
|
||||
}
|
||||
|
||||
console.debug('searching docs', body);
|
||||
const response = await apiPost(`${DOCS_API}/search`, body);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue