diff --git a/src/now-playing/emg-now-playing.service.ts b/src/now-playing/emg-now-playing.service.ts index 0caaefb..740cf24 100644 --- a/src/now-playing/emg-now-playing.service.ts +++ b/src/now-playing/emg-now-playing.service.ts @@ -34,8 +34,9 @@ export class EmgNowPlayingService { @Interval(30000) async pollEmgNowPlaying() { + // Не фильтруем по isOnline: health-check ошибочно метит HLS-потоки offline. const stations = await this.prisma.station.findMany({ - where: { isOnline: true, streamUrl: { contains: 'emgsound.ru' } }, + where: { streamUrl: { contains: 'emgsound.ru' } }, }); if (stations.length === 0) return; @@ -64,6 +65,13 @@ export class EmgNowPlayingService { song: cur.title.trim(), coverUrl: cur.coverImageWebpUrl600 ?? cur.coverImageUrl600 ?? null, }); + // Станция явно в эфире — поправим ошибочный offline-флаг + if (!station.isOnline) { + await this.prisma.station.update({ + where: { id: station.id }, + data: { isOnline: true }, + }); + } updated++; }), );