kkevinm / iTunes-Discord-RP

iTunes Rich Presence for Discord made in Java (for MacOS and Windows)
MIT License
198 stars 37 forks source link

[BUG] Please Fix : The Song stayed the same when already at another song (macOS) #38

Closed Kentakoong closed 4 years ago

Kentakoong commented 4 years ago

I'm so tired to connect/disconnect it like every 10 mins because it like freezes so much. @kkevinm can you do something, It's been bugging me alot thanks. If you can fix it

Kentakoong commented 4 years ago

The version I'm using is the latest version

helenwen8 commented 4 years ago

I have the same issue, but I am having trouble trying to reproduce it. I think one way to reproduce it is by leaving the Rich Presence running and then letting the computer go to sleep. When I wake up the computer and playing music again, it usually freezes.

I will update here if I can find a more reliable way of reproducing it

kkevinm commented 4 years ago

I'm also having related issues, but they seem to happen inconsistently so I can't pin down the problem. Also it only seems to happen when running the .app (but not the .jar file, for example)? Honestly, I have no clue, but something's up for sure.

helenwen8 commented 4 years ago

Tried to do some testing, and it seems that whenever I pause the music for more than 2 mins, unpausing the music would not update the rich presence. I wonder if it might be something like Mac OS automatically disconnects the app for saving resources?

Kentakoong commented 4 years ago

Tried to do some testing, and it seems that whenever I pause the music for more than 2 mins, unpausing the music would not update the rich presence. I wonder if it might be something like Mac OS automatically disconnects the app for saving resources?

Yeah yeah me too

Kentakoong commented 4 years ago

But mine's not sleeping and it just frozed. Hmmn

Kentakoong commented 4 years ago

@kkevinm welp. I just opened up the app and I played the first song, It frozed at the first song that I played

kkevinm commented 4 years ago

Yeah, it seems to be random when it happens. For now try using version 1.5.4, that one shouldn't have issues.

kkevinm commented 4 years ago

I have the suspect that the culprit could be App Nap: when an application is hidden or behind others, this feature will put it to sleep preventing it from updating the rich presence (I checked in the Activity Monitor and indeed App Nap kicks in shortly after the app is put in the background). I'll see if it's possible to prevent this.

Kentakoong commented 4 years ago

ok thanks

Kentakoong commented 4 years ago

yeah I'm thinking of reverting too

EthanG45 commented 4 years ago

Downgraded to 1.5.4 and can confirm it does not fix the issue.

Kentakoong commented 4 years ago

Downgraded to 1.5.4 and can confirm it does not fix the issue.

Oh really. I didn't do it yet cuz trying to test it out and report bugs

Kentakoong commented 4 years ago

This is my summary of v1.5.6

Bugs EVERY TIME that I used it

edit : literally every time and like the first or second songs

I need to disconnect and connect to make it work again

but it will break after an few minutes

Kentakoong commented 4 years ago

imma try the .jar for a few days and report back

Kentakoong commented 4 years ago

@kkevinm you're right

I use .jar and it just runs smooth as you told me. Perfect.

but let me see for a bit first and will confirm asap

Kentakoong commented 4 years ago

welp. still bugging

hmmm

ahhh

kkevinm commented 4 years ago

I can suggest trying to disable App Nap and see if that solves the issue. How you do it is open the Terminal.app and paste this line: defaults write NSGlobalDomain NSAppSleepDisabled -bool YES, then hit Enter (you may have to restart the computer for the change to take effect). If you want to re-enable it, paste the same line but using NO instead of YES. If this doesn't work, then I really don't know.

Kentakoong commented 4 years ago

I've used the jar version in windows+mac

just a few errors sometimes.

the jar is the best to use for now @kkevinm as you told us

Kentakoong commented 4 years ago

rarely bugged as I say

kkevinm commented 4 years ago

Have you tried disabling App Nap?

Kentakoong commented 4 years ago

yeah

ill try the app later this night

Kentakoong commented 4 years ago

@kkevinm as i tried it for 2 days, i have not found any freezes I disabled the app nap and it works

kkevinm commented 4 years ago

Ah all right, that's what I thought. I'll see if it can be fixed without having to do that, but meanwhile I'll add that to the FAQ.

kkevinm commented 4 years ago

Okay so I've tested it quite extensively and it seems like disabling App Nap does indeed make the app work as intended. For now I'll close this, since it's technically solved, but I'll see if there's a way to prevent it without having to disable App Nap.