Kodi Community Forum

Full Version: Enable/Disable subtitles using xbmcgui.ListItem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
in my video addon I want to provide subtitles if it exists for target stream. I am able to set subtitles url with ListItem.setSubtitles(), when playback starts subtitles are enabled and showing correctly. They are enabled by default because I enabled it and "Set as default for all videos" in Audio Settings dialog.

I want to have separate subtitles configuration for content provided by my video addon (subtitles force enable/force disable/don't touch). Just assign subtitles url with video stream in ListItem so subtitles will be available in OSD menu.

Is there any way how to temporarily enable/disable subtitles from video addon using ListItem properties (or any other similar way)? xbmcgui.ListItem because addon is not active/running any more when video actually starts to play, so it is not possible to use Player.showSubtitles()...

Thank You for any advice.