fix(charts): отсев заглушек Online-Radio и джинглов FX-NN

This commit is contained in:
nk
2026-06-06 15:52:41 +03:00
parent 0084177d15
commit 924a4a0ab1

View File

@@ -144,6 +144,9 @@ export class ChartsService {
const a = artist.trim(); const a = artist.trim();
const s = song.trim(); const s = song.trim();
if (a.toLowerCase() === s.toLowerCase()) return true; if (a.toLowerCase() === s.toLowerCase()) return true;
// Известные заглушки эфира / джинглы-свиперы.
if (a.toLowerCase() === 'online' && s.toLowerCase() === 'radio') return true;
if (/^fx$/i.test(a) && /^fx-?\d+$/i.test(s)) return true;
const hex = (v: string) => /^[0-9a-f]{6,}$/i.test(v) && /[0-9]/.test(v); const hex = (v: string) => /^[0-9a-f]{6,}$/i.test(v) && /[0-9]/.test(v);
const code = (v: string) => /^[0-9]+-[0-9]+/.test(v); const code = (v: string) => /^[0-9]+-[0-9]+/.test(v);
const url = (v: string) => /\.(ru|fm|by|com|ua)$/i.test(v) || /^https?:/i.test(v); const url = (v: string) => /\.(ru|fm|by|com|ua)$/i.test(v) || /^https?:/i.test(v);