jellyfin / jellyfin-androidtv

Android TV Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
2.92k stars 495 forks source link

Jellyfin registered as Chromecast app after exiting #3747

Open Sidelity opened 4 months ago

Sidelity commented 4 months ago

Describe the bug

In Home Assistant I can see what's being played on my Nvidia Shield through the Google Cast integration. All other apps I've tested (Plex, YouTube, SmartTube, SVT Play, mpv) registers as the current Chromecast app when starting playing, then unregisters when you stop playing.

Jellyfin however seems to stay registered as the current Chromecast app after the playback has stopped, and even as you exit the app. This is what the Chromecast reports as being active even after exiting the app:

Screenshot of Home Assistant

You need to manually kill Jellyfin from running in the background for it to unregister. If you don't, Chromecast will continue to report Jellyfin as the active app (even when you start playing videos in another app). In my case, this prevents Home Assistant from seeing what's being played and breaks my automations.

Steps to reproduce:

  1. Start playing media in Jellyfin on a device with built-in Chromecast (such as Nvidia Shield)
  2. Stop playing media, and exit the app
  3. Read out what's being played on Chromecast. (I use the Google Cast integration in Home Assistant, but I'm sure you can use other tools as well)

Logs

No response

Application version

0.16.11

Where did you install the app from?

Google Play

Device information

Nvidia Shield TV 2017

Android version

Android 11

Jellyfin server version

10.9.7

nielsvanvelzen commented 4 months ago

The Android TV app is not a cast receiver and does not implement/use the proprietary cast SDK so I don't see how this is an issue on the app side.

Sidelity commented 4 months ago

Gotcha. Even though Jellyfin doesn't use the cast SDK, is it possible that Chromcast picks up on any playing media? And in that case, is Jellyfin doing something in the background that the other media apps aren't? Seeing as manually killing the Jellyfin app solves the issue.

nielsvanvelzen commented 4 months ago

The app does implement media sessions for music (video will come later) but that has nothing to do with casting, and as far as I know that is only picked up by the Android TV integration in Home Assistant.

jellyfin-bot commented 2 weeks ago

This issue has gone 120 days without comment. To avoid abandoned issues, it will be closed in 21 days if there are no new comments.

If you're the original submitter of this issue, please comment confirming if this issue still affects you in the latest release or master branch, or close the issue if it has been fixed. If you're another user also affected by this bug, please comment confirming so. Either action will remove the stale label.

This bot exists to prevent issues from becoming stale and forgotten. Jellyfin is always moving forward, and bugs are often fixed as side effects of other changes. We therefore ask that bug report authors remain vigilant about their issues to ensure they are closed if fixed, or re-confirmed - perhaps with fresh logs or reproduction examples - regularly. If you have any questions you can reach us on Matrix or Social Media.