Posts: 3,660
Joined: Feb 2008
Reputation:
93
Jeroen
Team-Kodi Member
Posts: 3,660
I have a button in my OSD to switch subtitles on or off. However I would like to turn this into a togglebutton and display the currently selected state.
I tried using System.GetBool(defaultvideosettings.showsubtitles) as a condition, but that doesn't seem to work. Is there a way to do this?
Posts: 17,411
Joined: Aug 2007
Reputation:
586
Hitcher
Team-Kodi Member
Posts: 17,411
I guess that doesn't work because it's also saved per video.
Posts: 672
Joined: Aug 2010
Reputation:
13
pieh
Retired Team-Kodi Member
Posts: 672
So You need Boolean condition "VideoPlayer.SubtitlesEnabled" to check if currently played video has subtitles ?
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first
My previous forum/trac nickname: grajen3
Posts: 3,660
Joined: Feb 2008
Reputation:
93
Jeroen
Team-Kodi Member
Posts: 3,660
2011-07-30, 16:31
(This post was last modified: 2011-07-30, 16:33 by Jeroen.)
Yes, to be more precise checking whether or not subtitles are enabled for the currently playing video. It would also be useful for positioning the OSD based on whether or not subtitles are enabled.
Maybe formatting it like VideoPlayer.HasSubtitles would be more consistent with other conditions?
Posts: 672
Joined: Aug 2010
Reputation:
13
pieh
Retired Team-Kodi Member
Posts: 672
sure, that's what I meant - HasSubtitles may indicate that there are subtitles for video available (not that subtitles are actually enabled/disabled) I think, but If You will come up with better name for it, I'll use it
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first
My previous forum/trac nickname: grajen3
Posts: 17,411
Joined: Aug 2007
Reputation:
586
Hitcher
Team-Kodi Member
Posts: 17,411
Both.
HasSubtitles to hide the button
SubtitlesEnabled when they're on
Posts: 17,411
Joined: Aug 2007
Reputation:
586
Hitcher
Team-Kodi Member
Posts: 17,411
Thanks for this and all the skin features you've added pieh.
Posts: 672
Joined: Aug 2010
Reputation:
13
pieh
Retired Team-Kodi Member
Posts: 672
Thanks Big_Noid, please just mark that these aren't available in dharma so there won't be confussion and bug reports about it.
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first
My previous forum/trac nickname: grajen3