jellyfin / jellyfin-androidtv

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

Vlc player resume does not work #4027

Open hellez opened 1 day ago

hellez commented 1 day ago

Describe the bug

Since the new playback code it is no longer possible to resume while using an external player (e.g., VLC).

This might be a dupe of https://github.com/jellyfin/jellyfin-androidtv/issues/1208, but this issue is already closed without any reaction to questions.

Logs

No response

Application version

0.17.5

Where did you install the app from?

None

Device information

Sony XH90

Android version

Android TV

Jellyfin server version

10.9.11

nielsvanvelzen commented 1 day ago

There is only code that sends the resume position for MX Player and Vimu:

https://github.com/jellyfin/jellyfin-androidtv/blob/30fcb192da47df63550c7e1cef9b2b6095188fd2/app/src/main/java/org/jellyfin/androidtv/ui/playback/ExternalPlayerActivity.java#L347-L350

So this is not a bug, someone will need to add additional code to support VLC.

tobiasgiese commented 14 hours ago

I tried to debug it locally. Unfortunately, data is null when VLC returns to onActivityResult(). Or is this maybe an issue with Android Studio? I never developed anything on Android before, but I have the same issue on my TV

nielsvanvelzen commented 14 hours ago

This issue is about starting VLC, not returning from VLC.

tobiasgiese commented 14 hours ago

This issue is about starting VLC, not returning from VLC.

Are you sure? The following does work w/o any changes:

AFAIIU the issue is only that the position will not be persisted after stopping VLC -- also the popup Mark watched pops up every time.

nielsvanvelzen commented 14 hours ago

From the issue description I assumed they meant starting playback will not resume from a specific position and the constants indicated we don't set anything specifically for VLC. Although they may overlap with extras VLC also supports.

hellez commented 14 hours ago

AFAIIU the issue is only that the position will not be persisted after stopping VLC

It is exactly like this, there is no resume button in the UI

nielsvanvelzen commented 14 hours ago

There not being a resume button is an entirely different thing so I misinterpreted the original issue report. In this case it likely did not save the position properly like @tobiasgiese mentioned.