Skip to content

Commit bce6a69

Browse files
committed
✨ [drpc] 終了時間未定の番組に対応
1 parent c9b5295 commit bce6a69

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/miraktest-drpc/DrpcRenderer.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ export const DrpcRenderer: InitPlugin["renderer"] = ({
9999
startTimestamp = Math.ceil((new Date().getTime() - time) / 1000)
100100
} else {
101101
startTimestamp = program.startAt / 1000
102-
endTimestamp = (program.startAt + program.duration) / 1000
102+
if (program.duration !== 1) {
103+
endTimestamp = (program.startAt + program.duration) / 1000
104+
}
103105
}
104106
const activity: Presence = {
105107
largeImageKey,

src/miraktest-drpc/constants.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const DRPC_META = {
44
id: DRPC_ID,
55
name: "Discord RPC",
66
author: "ci7lus",
7-
version: "0.1.2",
7+
version: "0.1.3",
88
description: "表示中の番組を Discord に共有します",
99
authorUrl: "https://github.com/ci7lus",
1010
url: "https://github.com/ci7lus/miraktest-plugins/tree/master/src/miraktest-drpc",

0 commit comments

Comments
 (0)