Skip to content

Commit

Permalink
🐛 [miyou][nico] 同じ番組を開き直したときにコメントが取得されないのを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
ci7lus committed Aug 25, 2022
1 parent 73f6c6d commit f38f6a9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/miraktest-miyou/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const meta = {
id: _id,
name: "Miyou",
author: "ci7lus",
version: "0.2.4",
version: "0.2.5",
description:
"Miyouからコメントを取得するプラグインです。対応するコメントレンダラープラグインが必要です。",
authorUrl: "https://github.com/ci7lus",
Expand Down Expand Up @@ -208,8 +208,10 @@ const main: InitPlugin = {
const endAt = program.startAt + program.duration
const end = Math.min(start + 600_000, endAt)
if (lastStartAt !== program.startAt) {
// 番組が変わった
setLastStartAt(program.startAt)
setComments([])
setLog([])
}
setPeriod([start, end])
}, [program, time])
Expand Down
2 changes: 1 addition & 1 deletion src/miraktest-nico/NicoRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const meta = {
id: _id,
name: "ニコニコ実況",
author: "ci7lus",
version: "0.3.6",
version: "0.3.7",
description:
"ニコニコ実況からコメントを取得するプラグインです。対応するコメントレンダラープラグインが必要です。",
authorUrl: "https://github.com/ci7lus",
Expand Down
2 changes: 2 additions & 0 deletions src/miraktest-nico/streams/Kakolog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ export const KakologStream = ({
const endAt = program.startAt + program.duration
const end = Math.min(start + 600_000, endAt)
if (lastStartAt !== program.startAt) {
// 番組が変わった
setLastStartAt(program.startAt)
setComments([])
setLog([])
}
setPeriod([start, end])
}, [program, time])
Expand Down

0 comments on commit f38f6a9

Please sign in to comment.