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:
lrnselfreliance 2026-11-11 19:21:06 -07:00 • committed by GitHub
parent a0f30a0a60
commit 2800112f3e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 189 additions and 30 deletions

View file

@ -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);