fix(charts): отсев заглушек Online-Radio и джинглов FX-NN
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user