From 0d6257140f1e1aa8f9658f35f180e52e7b3af4bb Mon Sep 17 00:00:00 2001 From: ci7lus <7887955+ci7lus@users.noreply.github.com> Date: Thu, 25 Aug 2022 16:01:28 +0900 Subject: [PATCH] =?UTF-8?q?:art:=20[nico]=20date=5Fusec=E3=81=8C=E3=81=AA?= =?UTF-8?q?=E3=81=84=E6=97=A7=E5=AE=9F=E6=B3=81=E9=81=8E=E5=8E=BB=E3=83=AD?= =?UTF-8?q?=E3=82=B0=E3=82=92=E5=8F=82=E7=85=A7=E3=81=97=E3=81=9F=E6=99=82?= =?UTF-8?q?=E3=81=AE=E6=8C=99=E5=8B=95=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/miraktest-nico/streams/Kakolog.tsx | 5 +++-- src/miraktest-nico/types.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/miraktest-nico/streams/Kakolog.tsx b/src/miraktest-nico/streams/Kakolog.tsx index e6a117f..013e049 100644 --- a/src/miraktest-nico/streams/Kakolog.tsx +++ b/src/miraktest-nico/streams/Kakolog.tsx @@ -111,14 +111,15 @@ export const KakologStream = ({ ...data.packet.map((packet) => { const { chat } = packet const date = parseInt(chat.date) - const date_usec = parseInt(chat.date_usec) + const date_usec = parseInt(chat.date_usec || "NaN") return { ...packet.chat, no: parseInt(chat.no), date, date_usec, vpos: parseInt(chat.vpos), - time: date * 1000 + date_usec / 1000, + // TODO: vpos合わせ 朝4時リセット + time: date * 1000 + (date_usec ? date_usec / 1000 : 0), } }), ].sort((a, b) => a.time - b.time) diff --git a/src/miraktest-nico/types.ts b/src/miraktest-nico/types.ts index 2c56038..0c86104 100644 --- a/src/miraktest-nico/types.ts +++ b/src/miraktest-nico/types.ts @@ -10,7 +10,7 @@ export type NicoLogComment = { no: string vpos: string date: string - date_usec: string + date_usec?: string mail: string user_id: string anonymity: string