fix: incorrect filter condition that causes empty tags

This commit is contained in:
alikia2x (寒寒) 2025-03-22 00:58:36 +08:00
parent 559c63b434
commit e5534cda24
Signed by: alikia2x
GPG Key ID: 56209E0CCD8420C6

View File

@ -19,7 +19,7 @@ export async function insertVideoInfo(client: Client, aid: number) {
const desc = data.View.desc; const desc = data.View.desc;
const uid = data.View.owner.mid; const uid = data.View.owner.mid;
const tags = data.Tags const tags = data.Tags
.filter((tag) => tag.tag_type in ["old_channel", "topic"]) .filter((tag) => !["old_channel", "topic"].indexOf(tag.tag_type))
.map((tag) => tag.tag_name).join(","); .map((tag) => tag.tag_name).join(",");
const title = data.View.title; const title = data.View.title;
const published_at = formatTimestampToPsql(data.View.pubdate * SECOND + 8 * HOUR); const published_at = formatTimestampToPsql(data.View.pubdate * SECOND + 8 * HOUR);