jaseg / python-mpv

Python interface to the awesome mpv media player
https://git.jaseg.de/python-mpv.git
Other
547 stars 68 forks source link

Cycle Through tracks and Subs #74

Closed tuxfoo closed 6 years ago

tuxfoo commented 6 years ago

I do not like to post non issues here but I am stuck.

How do I change subtitles and audio tracks? I tried this but it appears to be the property to toggle subs on and off. Which property to I use to set which sub and which audio track I want to use. Also is there a function for simply cycling through them?

if sub == tube.totalsubs + 1:
    sub = 0
tube.dvdplayer._set_property("sub", sub + 1)

Regards, Jake.

nvm found it tube.dvdplayer.cycle("sub", "up") tube.dvdplayer.cycle("audio", "down")

Would still like to know how to set the property

McSinyx commented 6 years ago

Properties are accessed via __setattr__ and __getattr__, e.g. mp.property_foo = 'bar'.