Closed Summon528 closed 3 years ago
I'm running 19.1 on Arch and can't replicate this. I just started and stopped 3 different movies that have external srt subtitles and they all displayed fine and showed no errors in the logs.
Hmm weird. Do your subtitle work if you play the second movie without stopping/pausing the first one?
An confirm, have the same issue with libreelec 10 beta with kodi 19.1.
Works for one episode and won't for the next. Only after a reboot.
Still can't replicate. I played episode 1 of a series that has external srt subs, it played fine. Once that played all the way through, I started episode 2 and it also played with no issues, including subtitles. I'm not sure what the issue is here, but posting full logs will probably be helpful.
Can you try doing this?
Seems that step 2 is the key to producing this bug
For me it happens if I play the next episode via upnext. Once I've done that it's broken until a restart...
Here's a log of yesterday's test:
Also I'm a bit confused about the certificate errors from urllib. My server serves valid LE certificates for the domain.
Alright, I can replicate it now. It seems if item B starts playing before item A finishes or officially "stops", we run into issues.
@Kidswiss for your urllib question, maybe check in your settings and see if you have "Verify Connection" turned on. You may have accidentally toggled it to be off, so none of your api calls are being verified.
Great news! Thanks for looking into this.
About the urllib issue: the "Verify Connection" setting is enabled. So that should work. But I guess I'll open a separate issue if it bothers me too much.
So it's a race condition. What's happening is that when you hit play, the external subs are immediately downloaded here and stored at KODI_HOME/.userdata/addons/plugin.video.jellyfin/temp/Stream.eng.srt
(assuming english), but when the monitor is picking up that a new playback session has started, it clears the cache. There's just enough of a delay that it's clearing the cached file that's being used at that moment.
As a temporary workaround until someone has time to work through a better solution, if you comment out these two lines it mostly solves the problem. The caveat is that if you play something that doesn't have external subs, it might try to play that cached sub file anyway.
https://github.com/jellyfin/jellyfin-kodi/blob/master/jellyfin_kodi/player.py#L428-L429
What might be the best option for dealing with this would be to name that file with the item ID instead of just a generic Stream.eng.srt
, and then having the cache clearing later only remove what isn't currently playing. I don't have enough time to dig into that today, but if anybody wants to do some experimenting this will hopefully give you a good starting point.
Describe the bug
External SRT subtitles are only shown on the first playback of a session. When viewing the second video, external subtitles are detected, but selecting them does not make them visible. After restarting Kodi, the subtitle works again (for the first playback)
To Reproduce
Expected behavior
The subtitle should be visible in the second video
Logs
I see multiple
ERROR <general>: CVideoPlayerSubtitle::OpenStream - Unable to create subtitle parser
but no further detailSystem (please complete the following information):