Skip to content

Commit

Permalink
πŸ› If song is on repeat, set currentSong again.
Browse files Browse the repository at this point in the history
  • Loading branch information
rxri committed Apr 21, 2021
1 parent 1faaba5 commit 15a1ab4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/managers/tidal.manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@ export default class TidalManager {
{
const data = tidalStatus.windowTitle?.split(" - ");
if (!data) return new Error("Can't get current song.");
if (compareTitle(data, this.currentSong)) {
if (
compareTitle(data, this.currentSong) &&
this.currentSong.startTime +
this.currentSong.duration +
this.currentSong.pausedTime -
Math.round(new Date().getTime() / 1000) >
0
) {
if (this.currentSong.paused) {
this.currentSong.paused = false;
return setActivity(this.currentSong);
Expand Down

0 comments on commit 15a1ab4

Please sign in to comment.