emilsvennesson / kodi-viaplay

Viaplay for Kodi
GNU General Public License v3.0
30 stars 19 forks source link

Subtitle not always downloaded #40

Closed filigranen closed 3 years ago

filigranen commented 3 years ago

For some videos subtitles are not working when they exist and are working using a browser on viaplay.se.

This has happened only a few times, but I thought I'd report it now when I have a fresh case and the movie still exists on viaplay.

Cannot remember now what others didn't work, but IIRC they were all swedish movies. Perhaps something to do with the language and the subtitle language matching? Just a guess. It does work for some though, so not consistent.

This case is the movie "Sune på bilsemester", which works on viaplay.se but not in the addon. Cannot enable subtitles in videoplayer settings, and nothing is saved in tmp dir, so not fetched from site.

Log file here: https://paste.kodi.tv/ugijisavuf.kodi I see in the log it finds the url in the metadata (line 638), but not sure where it goes wrong after that.

Let me know if you need more information.

emilsvennesson commented 3 years ago

Good job timing in my lunch break with this bug report! :-)

I fixed this and simplified the logic to just download all subtitles. The old code was a workaround to an old bug where it wasn't possible to load more than one subtitle externally. Make sure to set your default subtitle language in Kodi to load your preferred language by default.

filigranen commented 3 years ago

Good to know when to file reports. ;)

Tested it on the above, "Sune på bilsemester", and it seems to work like it should.

Thanks for the quick fix!