From d8e45bf2fc92992027ef188ab4d64c15e556171d Mon Sep 17 00:00:00 2001 From: tsukumi Date: Tue, 19 Sep 2023 18:23:23 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20[Client][Services/LiveDataBroadcastingMa?= =?UTF-8?q?nager]=20=E6=94=BE=E9=80=81=E6=99=82=E9=96=93=E6=9C=AA=E5=AE=9A?= =?UTF-8?q?=E6=99=82=E3=81=AB=E7=95=AA=E7=B5=84=E9=95=B7=E3=81=8C=2010067.?= =?UTF-8?q?75=20=E5=88=86=E3=81=AB=E3=81=AA=E3=82=8B=E4=B8=8D=E5=85=B7?= =?UTF-8?q?=E5=90=88=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../player/managers/LiveDataBroadcastingManager.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client/src/services/player/managers/LiveDataBroadcastingManager.ts b/client/src/services/player/managers/LiveDataBroadcastingManager.ts index 9f9fac68..6cbf2ba9 100644 --- a/client/src/services/player/managers/LiveDataBroadcastingManager.ts +++ b/client/src/services/player/managers/LiveDataBroadcastingManager.ts @@ -353,15 +353,15 @@ class LiveDataBroadcastingManager implements PlayerManager { if (message.startTimeUnixMillis) { const start_time = ProgramUtils.convertTimestampToISO8601(message.startTimeUnixMillis); channels_store.channel.current.program_present.start_time = start_time; - if (message.durationSeconds) { - channels_store.channel.current.program_present.end_time = - dayjs(start_time).add(message.durationSeconds, 'seconds').toISOString(); - channels_store.channel.current.program_present.duration = message.durationSeconds; - } else { - // 開始時刻はあるが番組長がない場合、放送時間未定として扱う + if (message.durationSeconds === null || message.indefiniteDuration === true) { + // 放送時間未定扱い // duration が -1 の場合、ProgramUtils.getProgramTime() は「放送時間未定」と表示する channels_store.channel.current.program_present.end_time = start_time; channels_store.channel.current.program_present.duration = -1; // -1 を設定する + } else { + channels_store.channel.current.program_present.end_time = + dayjs(start_time).add(message.durationSeconds, 'seconds').toISOString(); + channels_store.channel.current.program_present.duration = message.durationSeconds; } } }