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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user