subtitles: get current state
#1
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?
Reply
#2
I guess that doesn't work because it's also saved per video.
Reply
#3
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
Reply
#4
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?
Reply
#5
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
Reply
#6
Both.

HasSubtitles to hide the button

SubtitlesEnabled when they're on
Reply
#7
added to master - see commit description https://github.com/xbmc/xbmc/commit/79a6...9e18fc6fef
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
Reply
#8
Thanks for this and all the skin features you've added pieh.
Reply
#9
Great Smile Thanks a lot pieh, it's appreciated
Reply
#10
Wiki is updated.
Reply
#11
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
Reply

Logout Mark Read Team Forum Stats Members Help
subtitles: get current state0