Skip to content

Commit

Permalink
fix: reuse lyrics only when ids are same
Browse files Browse the repository at this point in the history
  • Loading branch information
HelloWorld017 committed Dec 2, 2024
1 parent 10c8ade commit 3d8482c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/provider/source/tuna-obs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,9 @@ export class TunaObsProvider extends BaseSourceProvider {
};

if (data.data.status === 'playing' || data.data.status === 'paused') {
const lastLyric = this.lastUpdateData?.data.type !== 'idle'
? this.lastUpdateData?.data.playerLyrics
const id = `${data.data.title}:${data.data.cover_url}`;
const lastLyric = this.lastUpdateData?.data.type !== 'idle' && this.lastUpdateData?.data.id === id
? this.lastUpdateData.data.playerLyrics
: undefined;

result.data = {
Expand Down

0 comments on commit 3d8482c

Please sign in to comment.