Author: duncan
Date: Sat Apr 28 14:30:20 2007
New Revision: 9512
Modified:
branches/rel-1/freevo/src/video/__init__.py
branches/rel-1/freevo/src/video/fxdhandler.py
branches/rel-1/freevo/src/video/videoitem.py
Log:
[ 1696110 ] Video FXD with 2 files and mplayer-options error
Fix applied
Modified: branches/rel-1/freevo/src/video/__init__.py
==============================================================================
--- branches/rel-1/freevo/src/video/__init__.py (original)
+++ branches/rel-1/freevo/src/video/__init__.py Sat Apr 28 14:30:20 2007
@@ -140,6 +140,7 @@
file[len(os.path.join(parent.media.mountdir,"")):]
try:
x.mplayer_options = discset_information[file_id]
+ _debug_('x.mplayer_options=%r' % x.mplayer_options)
except KeyError:
pass
items.append(x)
Modified: branches/rel-1/freevo/src/video/fxdhandler.py
==============================================================================
--- branches/rel-1/freevo/src/video/fxdhandler.py (original)
+++ branches/rel-1/freevo/src/video/fxdhandler.py Sat Apr 28 14:30:20 2007
@@ -39,11 +39,11 @@
<movie title>
<cover-img>file</cover-img>
- <video>
- <dvd|vcd|file id name media_id mplayer_options>file</>+
+ <video mplayer-options>
+ <dvd|vcd|file id name media_id mplayer-options>file</>+
<variants>
<variant>
- <part ref mplayer_options>
+ <part ref mplayer-options>
<subtitle media_id>file</subtitle>
<audio media_id>file</audio>
</part>+
@@ -95,7 +95,7 @@
video = fxd.get_children(node, 'video')
if video:
- mplayer_options = fxd.getattr(video[0], 'mplayer_options')
+ mplayer_options = fxd.getattr(video[0], 'mplayer-options')
video = fxd.get_children(video[0], 'file') + \
fxd.get_children(video[0], 'vcd') + \
fxd.get_children(video[0], 'dvd') + \
@@ -208,25 +208,27 @@
item.force_player = player
if is_playlist:
item.is_playlist = True
- # global <video> mplayer_options
- if mplayer_options:
- item.mplayer_options += mplayer_options
+ if len(video) == 1:
+ # global <video> mplayer_options
+ if mplayer_options:
+ item.mplayer_options += mplayer_options
# if there is more than one item add them to subitems
if len(video) > 1:
# a list of files
for s in video:
+ #id, url, item.media_id, mplayer_options, player, is_playlist
= parse_video_child(fxd, s, dirname)
video_child = parse_video_child(fxd, s, dirname)
v = VideoItem(video_child[1], parent=item, info=item.info,
parse=False)
v.files = None
v.media_id, v.mplayer_options, player, is_playlist =
video_child[2:]
- if video_child[-2]:
- v.force_player = video_child[-2]
- if video_child[-1]:
+ if player:
+ v.force_player = player
+ if is_playlist:
item.is_playlist = True
# global <video> mplayer_options
if mplayer_options:
- v.mplayer_options += mplayer_options
+ v.mplayer_options += ' ' + mplayer_options
item.subitems.append(v)
if not item.files:
@@ -284,7 +286,7 @@
# mplayer_options apply. <file-opt> is not such a good
# name, though.
# So I ignore that we are in a disc right now and use the 'item'
- item.mplayer_options = fxd.getattr(disc, 'mplayer-options')
+ item.mplayer_options = fxd.getattr(disc, 'mplayer_options')
there_are_file_opts = 0
for f in fxd.get_children(disc, 'file-opt'):
there_are_file_opts = 1
@@ -293,7 +295,7 @@
file_media_id = id
mpl_opts = item.mplayer_options + ' ' + fxd.getattr(f,
'mplayer-options')
opt = { 'file-id' : file_media_id + fxd.gettext(f),
- 'mplayer-options': mpl_opts }
+ 'mplayer_options': mpl_opts }
item.__fxd_files_options__.append(opt)
if there_are_file_opts:
# in this case, the disc/@mplayer_options is retricted to the set
Modified: branches/rel-1/freevo/src/video/videoitem.py
==============================================================================
--- branches/rel-1/freevo/src/video/videoitem.py (original)
+++ branches/rel-1/freevo/src/video/videoitem.py Sat Apr 28 14:30:20 2007
@@ -480,7 +480,9 @@
# options
if self.current_subitem.mplayer_options:
if self.mplayer_options:
- self.current_subitem.mplayer_options += ' ' +
self.mplayer_options
+ # With this set the player options are incorrect when
there is more than 1 item
+ #self.current_subitem.mplayer_options += ' ' +
self.mplayer_options
+ pass
else:
self.current_subitem.mplayer_options = self.mplayer_options
# When playing a subitem, the menu must be hidden. If it is
not,
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog