jellyfin-android
jellyfin-android copied to clipboard
Prevent destruction of session, so that an app restart can reconnect (chromecast).
This is my first commit but I'd like to keep things small-ish/have targeted improvement.
There is an issue where the controls have repeatedly disappeared for various users: https://github.com/jellyfin/jellyfin-android/issues/459
This change set at least allows the user to forcibly close the app and re-open it, allowing for a reconnection to the session.
The downside is that the session will continue until the user intentionally stops it. Which means that it could potentially continue playing in the background indefinitely unless the server is somehow configured with an "Are you still here?" style of message & session booting based on no user input.
I still think this is better for the time being, because the alternative is that every time I lose control of the chromecast controls, I have to restart the app, which actually stops my TV from chromecasting, and I lose all my progress. This is exceedingly annoying as is.
By comparison, when YouTube is closed while chromecasting, it continues to operate (eventually displaying that "are you still here?" message).
Further notes:
- I do not think this should be the final state. I am having trouble trying to figure out how to get the app (on opening) to automatically reconnect to any still-alive session, and re-display the controls automatically. Today the user has to manually navigate the controls again to reconnect, and hit "remote control" again. At least it's better than the entire casting session stopping.
Changes
- Do not destroy the session when app is closed.
- Use of implicit this
- Some build debug changes (can remove these if we want, it just sped up some of my builds).
Issues https://github.com/jellyfin/jellyfin-android/issues/459