feat(now-playing): MAXIMUM через тот же Крутой-API (dfm.ru/api/n/current)

MAXIMUM — сеть Крутой Медиа, её каналы в том же /api/n/current. Поллер расширен
на genre IN (DFM, MAXIMUM) + алиасы (maxbritpop, max80, maximum90, rockhits и т.д.).
ICY исключает MAXIMUM.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
nk
2026-06-03 20:36:48 +03:00
parent d46020bd37
commit 588857a73e
2 changed files with 18 additions and 3 deletions

View File

@@ -39,6 +39,20 @@ export class DfmNowPlayingService {
игромания: '61-igromaniq',
'vocal-trance': 'trance',
'disco-90th': 'diskach-90h',
// MAXIMUM (тот же Крутой Медиа, тот же /api/n/current)
britpop: '130-maxbritpop',
covers: '129-maxcover',
'heavy-80-s': '131-max80',
'heavy-monday': '141-heavymonday',
'maximum-90th': '145-maximum90',
millenium: '140-millenium',
'new-russians': '125-maxnewrussians',
punk: '132-maxpunk',
rhcp: '123-maxrhcp',
'rock-hits': '144-rockhits',
rugby: '139-rugby',
'russian-rock': '90-russkijrok',
soft: '127-maxsoft',
};
constructor(
@@ -48,8 +62,9 @@ export class DfmNowPlayingService {
@Interval(30000)
async pollDfmNowPlaying() {
// DFM и MAXIMUM — обе сети Крутой Медиа, общий API dfm.ru/api/n/current
const stations = await this.prisma.station.findMany({
where: { genre: 'DFM' },
where: { genre: { in: ['DFM', 'MAXIMUM'] } },
});
if (stations.length === 0) return;
@@ -109,7 +124,7 @@ export class DfmNowPlayingService {
updated++;
}
this.logger.log(`DFM poll: ${updated}/${stations.length} обновлено`);
this.logger.log(`Krutoy poll: ${updated}/${stations.length} обновлено`);
}
private norm(s: string): string {