fix(backend): remove title keyword filter for Japanese tracks
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
d5b088a658
commit
38d21cf2e0
1 file changed
+4
-8
@@ -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'];
|
||||
|
||||
Reference in new issue
Block a user