Skip to content

Commit

Permalink
fix discordrpc plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
twnlink committed Jan 12, 2024
1 parent 5559b88 commit 04906be
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions plugins/DiscordRPC/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { store, intercept } from "@neptune";
import { store, intercept, currentMediaItem } from "@neptune";
import { getMediaURLFromID } from "@neptune/utils";
import { AutoClient } from "discord-auto-rpc";

Expand All @@ -15,10 +15,7 @@ client.then(() => {
intercept("playbackControls/TIME_UPDATE", ([current]) => {
const state = store.getState();

const { item: currentlyPlaying, type: mediaType } =
state.content.mediaItems.get(
state.playbackControls.mediaProduct.productId
);
const { item: currentlyPlaying, type: mediaType } = currentMediaItem;

// TODO: add video support
if (mediaType != "track") return;
Expand Down

0 comments on commit 04906be

Please sign in to comment.