Author: dmeyer
Date: Sat Dec  9 14:38:21 2006
New Revision: 8705

Modified:
   trunk/ui/src/video/configure.py
   trunk/ui/src/video/videoitem.py

Log:
fix dvd handling

Modified: trunk/ui/src/video/configure.py
==============================================================================
--- trunk/ui/src/video/configure.py     (original)
+++ trunk/ui/src/video/configure.py     Sat Dec  9 14:38:21 2006
@@ -104,9 +104,12 @@
     action = ActionItem(_('no subtitles'), item, set_variable)
     action.parameter('selected_subtitle', -1)
     menu_items = [ action ]
-    for s in range(len(item.info['subtitles'])):
-        action = ActionItem(item.info['subtitles'][s], item, set_variable)
-        action.parameter('selected_subtitle', s)
+    for pos, s in enumerate(item.info['subtitles']):
+        name = s.get('language')
+        if s.get('title'):
+            name = '%s (%s)' % (s.get('name'), s.get('language'))
+        action = ActionItem(name, item, set_variable)
+        action.parameter('selected_subtitle', pos)
         menu_items.append(action)
     item.pushmenu(Menu(_('Subtitle Menu'), menu_items))
 
@@ -123,7 +126,9 @@
             menu_items.append(a)
     elif item.info['chapters']:
         for c in item.info['chapters']:
-            a = ActionItem(c.name, item, start_chapter)
+            pos = '%01d:%02d:%02d' % (int(c.pos) / 3600, (int(c.pos) / 60) % 
60,
+                                      int(c.pos) % 60)
+            a = ActionItem(pos, item, start_chapter)
             a.parameter('-ss %s' % c.pos)
             menu_items.append(a)
     item.pushmenu(Menu(_('Chapter Menu'), menu_items))

Modified: trunk/ui/src/video/videoitem.py
==============================================================================
--- trunk/ui/src/video/videoitem.py     (original)
+++ trunk/ui/src/video/videoitem.py     Sat Dec  9 14:38:21 2006
@@ -383,6 +383,9 @@
         # build a menu
         items = []
         for track in self.info.list().get():
+            if not track.get('length') or not track.get('audio'):
+                # bad track, skip it
+                continue
             track = VideoItem(track, self)
             track.name = _('Play Title %s') % track.info.get('name')
             items.append(track)

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to