Update of /cvsroot/freevo/freevo/src/video
In directory sc8-pr-cvs1:/tmp/cvs-serv21325
Modified Files:
fxdhandler.py videoitem.py
Log Message:
remove unneeded copy function, small bugfix
Index: fxdhandler.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/video/fxdhandler.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** fxdhandler.py 29 Dec 2003 22:29:25 -0000 1.9
--- fxdhandler.py 30 Dec 2003 15:36:01 -0000 1.10
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.10 2003/12/30 15:36:01 dischi
+ # remove unneeded copy function, small bugfix
+ #
# Revision 1.9 2003/12/29 22:29:25 dischi
# small bugfix
***************
*** 144,148 ****
# a variant with one file
ref = fxd.getattr(parts[0] ,'ref')
! v = VideoItem(id[ref][1], parent=item, parse=False)
v.files = None
v.media_id, v.mplayer_options, player, is_playlist = id[ref][2:]
--- 147,151 ----
# a variant with one file
ref = fxd.getattr(parts[0] ,'ref')
! v = VideoItem(id[ref][1], parent=item, info=item.info, parse=False)
v.files = None
v.media_id, v.mplayer_options, player, is_playlist = id[ref][2:]
***************
*** 177,181 ****
else:
# a variant with a list of files
! v = VideoItem('', parent=item, parse=False)
for p in parts:
ref = fxd.getattr(p ,'ref')
--- 180,184 ----
else:
# a variant with a list of files
! v = VideoItem('', parent=item, info=item.info, parse=False)
for p in parts:
ref = fxd.getattr(p ,'ref')
***************
*** 199,203 ****
subtitle = {}
! sub = VideoItem(id[ref][1], parent=v, parse=False)
sub.files = None
sub.media_id, sub.mplayer_options, player, is_playlist =
id[ref][2:]
--- 202,206 ----
subtitle = {}
! sub = VideoItem(id[ref][1], parent=v, info=item.info,
parse=False)
sub.files = None
sub.media_id, sub.mplayer_options, player, is_playlist =
id[ref][2:]
***************
*** 216,220 ****
--- 219,227 ----
id, url, item.media_id, item.mplayer_options, player, is_playlist = \
parse_video_child(fxd, video[0], dirname)
+ mminfo = item.info
item.set_url(url)
+ for key in mminfo:
+ item.info[key] = mminfo[key]
+
if player:
item.force_player = player
***************
*** 224,233 ****
if mplayer_options:
item.mplayer_options += mplayer_options
-
else:
# a list of files
for s in video:
info = parse_video_child(fxd, s, dirname)
! v = VideoItem(info[1], parent=item, parse=False)
v.files = None
v.media_id, v.mplayer_options, player, is_playlist = info[2:]
--- 231,239 ----
if mplayer_options:
item.mplayer_options += mplayer_options
else:
# a list of files
for s in video:
info = parse_video_child(fxd, s, dirname)
! v = VideoItem(info[1], parent=item, info=item.info, parse=False)
v.files = None
v.media_id, v.mplayer_options, player, is_playlist = info[2:]
***************
*** 276,280 ****
item.image = os.path.join(dirname, item.image)
! fxd.parse_info(fxd.get_children(node, 'info', 1), item, {'runtime': 'length'})
item.__fxd_rom_info__ = True
item.__fxd_rom_label__ = []
--- 282,286 ----
item.image = os.path.join(dirname, item.image)
! fxd.parse_info(node, item, {'runtime': 'length'})
item.__fxd_rom_info__ = True
item.__fxd_rom_label__ = []
Index: videoitem.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/video/videoitem.py,v
retrieving revision 1.103
retrieving revision 1.104
diff -C2 -d -r1.103 -r1.104
*** videoitem.py 29 Dec 2003 22:08:54 -0000 1.103
--- videoitem.py 30 Dec 2003 15:36:01 -0000 1.104
***************
*** 11,14 ****
--- 11,17 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.104 2003/12/30 15:36:01 dischi
+ # remove unneeded copy function, small bugfix
+ #
# Revision 1.103 2003/12/29 22:08:54 dischi
# move to new Item attributes
***************
*** 72,86 ****
Item.__init__(self, parent)
! self.type = 'video'
self.set_url(url, info=parse)
if info:
! self.info = info
! self.handle_type = 'video'
! self.variants = [] # if this item has variants
! self.subitems = [] # if this item has more than one file/track
to play
! self.current_subitem = None
self.subtitle_file = {} # text subtitles
--- 75,90 ----
Item.__init__(self, parent)
! self.type = 'video'
self.set_url(url, info=parse)
if info:
! for key in info:
! self.info[key] = info[key]
! self.handle_type = 'video'
! self.variants = [] # if this item has variants
! self.subitems = [] # more than one file/track to play
! self.current_subitem = None
self.subtitle_file = {} # text subtitles
***************
*** 123,127 ****
self.mplayer_options = tvinfo[2]
! self.tv_show = True
self.show_name = show_name
--- 127,131 ----
self.mplayer_options = tvinfo[2]
! self.tv_show = True
self.show_name = show_name
***************
*** 137,140 ****
--- 141,149 ----
def set_url(self, url, info=True):
+ """
+ Sets a new url to the item. Always use this function and not set 'url'
+ directly because this functions also changes other attributes, like
+ filename, mode and network_play
+ """
Item.set_url(self, url, info)
if url.startswith('dvd://') or url.startswith('vcd://'):
***************
*** 144,165 ****
! def copy(self, obj):
"""
! Special copy value VideoItems
"""
! Item.copy(self, obj)
! if obj.type == 'video':
! self.selected_subtitle = obj.selected_subtitle
! self.selected_audio = obj.selected_audio
! self.num_titles = obj.num_titles
! self.label = obj.label
! self.tv_show = obj.tv_show
!
! self.variants = obj.variants
! self.subitems = obj.subitems
! self.current_subitem = obj.current_subitem
! self.subtitle_file = obj.subtitle_file
! self.audio_file = obj.audio_file
!
--- 153,169 ----
! def id(self):
"""
! Return a unique id of the item. This id should be the same when the
! item is rebuild later with the same informations
"""
! ret = self.url
! if self.subitems:
! for s in self.subitems:
! ret += s.id()
! if self.variants:
! for v in self.variants:
! ret += v.id()
! return ret
***************
*** 200,203 ****
--- 204,208 ----
except:
pass
+
return Item.__getitem__(self, key)
***************
*** 207,211 ****
Returns the string how to sort this item
"""
! if mode == 'date' and os.path.isfile(self.filename):
return '%s%s' % (os.stat(self.filename).st_ctime, self.filename)
--- 212,216 ----
Returns the string how to sort this item
"""
! if mode == 'date' and self.mode == 'file' and os.path.isfile(self.filename):
return '%s%s' % (os.stat(self.filename).st_ctime, self.filename)
***************
*** 273,276 ****
--- 278,284 ----
def show_variants(self, arg=None, menuw=None):
+ """
+ show a list of variants in a menu
+ """
if not self.menuw:
self.menuw = menuw
***************
*** 281,284 ****
--- 289,295 ----
def play_max_cache(self, arg=None, menuw=None):
+ """
+ play and use maximum cache with mplayer
+ """
self.play(menuw=menuw, arg='-cache 65536')
***************
*** 418,422 ****
if arg:
! mplayer_options += arg.split[' ']
if self.menuw.visible:
--- 429,433 ----
if arg:
! mplayer_options += arg.split(' ')
if self.menuw.visible:
***************
*** 477,480 ****
--- 488,494 ----
def settings(self, arg=None, menuw=None):
+ """
+ create a menu with 'settings'
+ """
if not self.menuw:
self.menuw = menuw
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog