wako-app / wako

A Movie & TV Show Tracking App powered by trakt.tv and simkl.com. Available on iOS and Android
https://wako.app
27 stars 3 forks source link

[BUG] Kodi stops playing if app crashes #42

Open cojoMan opened 2 years ago

cojoMan commented 2 years ago

Happened a few times that Kodi just stopped playing, and the last few times, I tried to "unpause" it from the android remote just to notice that disappeared so I assumed Wako crashed. Is there a reason why Kodi would pause / can we avoid this behaviour ? Or is this an unfortunate circumstance of syncing progress, and keeping the two connected ?

I cannot reproduce the behaviour as closing wako from the android process manager doesn't seem to produce this. It could also be something else, but I saw a connection here.

JumBay commented 2 years ago

On android, when you send an app in background, sometimes after a certain amount of time, android kills it. You can change this settings on your phone but it's not perfect, cause it's also handled by the software running android if you don't run a stock android version. wako tries to keep the app running on background. For the "pause" issue, to be sure it's related to wako, you should try to kill the app while playing, if it stills pause then it's not related to wako. This is a complicated thing to debug as no pause signal is sent unlike you do so. You may also to try this test by disabling the music controls notification inside the app.

cojoMan commented 2 years ago

trying to test this at the moment, will report back.

cojoMan commented 2 years ago

tests I did :

1 - killed wako from the manager on android, playback continues on kodi. Killed en-masse with all the apps, killed just it, exited wako by repeatedly pressing back. 2 - after waiting for too long for the app to crash/be killed and reproduce the bug, I looked at the phone a couple of times when the video stopped on kodi, and the app was confirmed not running (know this by the music notification panel that was not present). Not sure if crashed/killed by OS.

3 - CURRENT : went into app details, battery, and toggled off battery optimization for this specific app. Hoping this will fix the issue.

4 - if the above won't work, and kodi keeps pausing, I will toggle off the music controls, though I like having that notification/quick use there - to check if this is it.

cojoMan commented 2 years ago

after a while of testing- a few weeks as I had the "music controls" disabled - the pausing didn't happen and I forgot about it. I was messing with the settings and re-enabled them, and pausing started happening again as the music controls dissapear - so I assume app being killed or crashing.

je19921 commented 1 year ago

I can confirm that music controls is the culprit. On my IOS devices, it was OK and never paused, so worked as intended, but on android and y samsung on android 12, when the music control is closed, it interfere with the actual stream. And closing the wako app will close the music control, hence impacting the stream.

Best solution for now is leaving music control off on android at least.

AJolly commented 1 year ago

I had wako stop playing if I restarted my phone. Turning off media controls fixed it. Also before when I used voice to text, it would pause wako.