From 38d21cf2e008b7fba34d6ee0e321c12047dd6e23 Mon Sep 17 00:00:00 2001 From: Honey Date: Sun, 21 Jun 2026 14:10:08 +0200 Subject: [PATCH] fix(backend): remove title keyword filter for Japanese tracks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Japanese Art Tracks on YTM/YouTube are often romanized ("Souiunatsu" for "そういう夏") — the Japanese keyword filter in --match-filter always rejected the correct video. Channel + duration are sufficient quality gates for JP tracks. Co-Authored-By: Claude Sonnet 4.6 --- backend/lib/ytdlp.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/backend/lib/ytdlp.js b/backend/lib/ytdlp.js index a81f2f0..ecffb5e 100644 --- a/backend/lib/ytdlp.js +++ b/backend/lib/ytdlp.js @@ -13,14 +13,10 @@ const { romajiForStorage, isTokenizerReady } = require('./romaji'); const JP_RE = /[ぁ-んァ-ン一-龯]/; function buildTitleKeywords(title) { - // For Japanese titles: \w strips all kana/kanji, leaving nothing useful. - // Instead use the first whitespace-delimited segment as a literal keyword so - // the YTM --match-filter requires the video title to contain it. - if (JP_RE.test(title)) { - const firstWord = (title.split(/[\s ]/)[0] || '').slice(0, 12); - const escaped = firstWord.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); - return escaped ? [escaped] : []; - } + // For Japanese titles: Art Tracks on YTM/YouTube are often romanized + // ("Souiunatsu" for "そういう夏") — a Japanese keyword filter would always + // reject the correct video. Channel + duration are the quality gates instead. + if (JP_RE.test(title)) return []; const VARIANT_WORDS = new Set(['sped','speedup','slowed','reverb','nightcore','karaoke','parody','remix','cover','acoustic','instrumental']); const STOPWORDS = new Set(['the','a','an','and','or','of','in','on','at','to','for','feat','ft','with','single','ep','album','remaster','remastered','deluxe','edition','version','live','bonus']); const MIX_QUALIFIERS = ['radio', 'extended', 'club', 'vip', 'original', 'edit'];