Closed Long-Man closed 4 years ago
I've looked into this and if we can make a small addition to the IPlayer
interface in Kodi core to be able to specify the name and language of a subtitle file when adding it everything would become much easier. I'll have to check with the people maintaining VideoPlayer
if this is acceptable.
Hoping that it's acceptable I've already implemented adding external subtitles whenever an item imported from Emby is being played using Direct Stream (no sense in doing anything for Direct Play).
I'll have to check with the people maintaining VideoPlayer if this is acceptable.
I hope that it's acceptable too.
See https://github.com/xbmc/xbmc/pull/17218 for the potential changes to Kodi core.
from @Angelblue05.
I grab them from Emby, download them locally, name them accordingly with the correct language tag, append them to the stream using the Kodi listitem api. It would be easier if Kodi had a way of labelling the external subtitles in the api because Emby provides no language tag in the direct url for the subtitles, they get detected as unknown by Kodi if added directly. hence the need for the workaround.
Looks like the downloading occurs here. https://github.com/MediaBrowser/plugin.video.emby/blob/4f9d2d54315a52e8764b43dd97576876e7c89113/resources/lib/helper/playutils.py#L493
And here https://github.com/MediaBrowser/plugin.video.emby/blob/4f9d2d54315a52e8764b43dd97576876e7c89113/resources/lib/helper/playutils.py#L679