Skip to content

Commit

Permalink
removed superfluous calls, print subs/audio track list on file open
Browse files Browse the repository at this point in the history
  • Loading branch information
opcode81 committed Jun 17, 2015
1 parent a63aceb commit 6474539
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wxvlc.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ def open(self, path):
for audio_track in self.audio_menu_items.values():
self.audio_menu.RemoveItem(audio_track["menu_item"])
self.audio_menu_items = {}
self.player.video_get_track_description()
tracks = self.player.audio_get_track_description()
print "audio tracks: %s" % str(tracks)
if len(tracks) == 0: tracks = [(-1, "None"), (1, "1"), (2, "2")] # fallback (should no longer be required)
for (track_no, name) in tracks:
menu_item = self.audio_menu.Append(wx.ID_ANY, name)
Expand All @@ -211,8 +211,8 @@ def open(self, path):
for subs_track in self.subs_menu_items.values():
self.subs_menu.RemoveItem(audio_track["menu_item"])
self.subs_menu_items = {}
self.player.video_get_track_description()
tracks = self.player.video_get_spu_description()
print "subs tracks: %s" % str(tracks)
for i, (track_no, name) in enumerate(tracks):
menu_item = self.subs_menu.Append(wx.ID_ANY, name)
id = menu_item.GetId()
Expand Down

0 comments on commit 6474539

Please sign in to comment.