kuba160 / ddb_discord_presence

Discord Rich Presence plugin for DeaDBeeF
37 stars 6 forks source link

Account for looping #7

Closed KorewaWatchful closed 3 years ago

KorewaWatchful commented 3 years ago

Great plugin :), just a small issue I found while using it, after the same song is played again, the time elapsed/left wouldn't be reset, it would get stuck at 00:00. I just added some code that resets the counter if the song is repeated. Doesn't affect any of the songchange events.

kuba160 commented 3 years ago

Hi, I tried to investigate the issue but I couldn't reproduce it. Could you send me what system and version of deadbeef you are using (and where downloaded from)? Your code might work, but there might be a better fix to that issue. :smiley:

KorewaWatchful commented 3 years ago

Ah, looks like I was using an older version 1.8.4 from AUR, just got deadbeef-git and the issue is gone lol. Pardon me then, I'll close this.

kuba160 commented 3 years ago

No problem, but next time you can just open new issue. I'm gonna do a quick code review and just give you some comments for the future :)

kuba160 commented 3 years ago

Didn't know that this problem existed in 1.8.4 to be honest.

KorewaWatchful commented 3 years ago

Sorry if I made mistakes, the deadbeef api is really weird... One thing I should've tested is to see if songchange event is called on a looped song, then I could've just made a comparison inside of that case, whoops. I also wouldn't have the pointer issue then.

KorewaWatchful commented 3 years ago

Thank you, these are some useful tips :)