Update of /cvsroot/freevo/freevo/src/audio/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv23782/audio/plugins
Modified Files:
coversearch.py mplayer.py playlist.py xine.py
Log Message:
move to new Item attributes
Index: coversearch.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/plugins/coversearch.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** coversearch.py 28 Oct 2003 18:16:26 -0000 1.22
--- coversearch.py 29 Dec 2003 22:09:19 -0000 1.23
***************
*** 14,17 ****
--- 14,20 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.23 2003/12/29 22:09:19 dischi
+ # move to new Item attributes
+ #
# Revision 1.22 2003/10/28 18:16:26 dischi
# move amazon.py to util
***************
*** 174,194 ****
else:
if config.DEBUG:
! print _( "WARNING" ) + ": "+ _( "Plugin 'coversearch' was
disabled for this item! " \
! "'coversearch' needs an item
with " \
! "Artist and Album (if it's a
mp3 or ogg) or " \
! "Title (if it's a cd track)
to be able to search. " \
! "So you need a file with a
ID3 tag (mp3) or an Ogg Info. " \
! "Maybe you must fix this
file (%s) tag?" ) % item.filename
except KeyError:
if config.DEBUG:
! print _( "WARNING" ) + ": " + _( "Plugin 'coversearch' was
disabled for this item! " \
! "'coversearch' needs an item
with " \
! "Artist and Album (if it's a
mp3 or ogg) or " \
! "Title (if it's a cd track) to
be able to search. " \
! "So you need a file with a ID3
tag (mp3) or an Ogg Info. " \
! "Maybe you must fix this file
(%s) tag?" ) % item.filename
except AttributeError:
if config.DEBUG:
! print _( "WARNING" ) + ": " + _( "Unknown CD, cover searching is
disabled" )
return []
--- 177,200 ----
else:
if config.DEBUG:
! print _( "WARNING" ) + ": "+\
! _( "Plugin 'coversearch' was disabled for this item! "
\
! "'coversearch' needs an item with " \
! "Artist and Album (if it's a mp3 or ogg) or " \
! "Title (if it's a cd track) to be able to search. "
\
! "So you need a file with a ID3 tag (mp3) or an Ogg
Info. " \
! "Maybe you must fix this file (%s) tag?" ) %
item.filename
except KeyError:
if config.DEBUG:
! print _( "WARNING" ) + ": " +\
! _( "Plugin 'coversearch' was disabled for this item! " \
! "'coversearch' needs an item with " \
! "Artist and Album (if it's a mp3 or ogg) or " \
! "Title (if it's a cd track) to be able to search. " \
! "So you need a file with a ID3 tag (mp3) or an Ogg
Info. " \
! "Maybe you must fix this file (%s) tag?" ) %
item.filename
except AttributeError:
if config.DEBUG:
! print _( "WARNING" ) + ": " +\
! _( "Unknown CD, cover searching is disabled" )
return []
Index: mplayer.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/plugins/mplayer.py,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** mplayer.py 13 Dec 2003 14:27:19 -0000 1.30
--- mplayer.py 29 Dec 2003 22:09:19 -0000 1.31
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.31 2003/12/29 22:09:19 dischi
+ # move to new Item attributes
+ #
# Revision 1.30 2003/12/13 14:27:19 outlyer
# Since ChildApp2 defaults to stopping the OSD, stop_osd=0 needs to be defined
***************
*** 104,108 ****
0 = unplayable
"""
! if item.filename.startswith('cdda://'):
return 1
return 2
--- 107,111 ----
0 = unplayable
"""
! if item.url.startswith('cdda://'):
return 1
return 2
***************
*** 125,145 ****
play a audioitem with mplayer
"""
- if item.url:
- filename = item.url
- else:
- filename = item.filename
-
self.playerGUI = playerGUI
!
! # Is the file streamed over the network?
! if filename.find('http://') == 0 or filename.find('https://') == 0 or \
! filename.find('mms://') == 0 or filename.find('rtsp://') == 0:
! # Yes, trust the given mode
! network_play = 1
! else:
! network_play = 0
! if not os.path.isfile(filename) and filename.find('://') == -1:
! return _('%s\nnot found!') % filename
# Build the MPlayer command
--- 128,139 ----
play a audioitem with mplayer
"""
self.playerGUI = playerGUI
! filename = vfs.url2filename(item.url)
! if filename and not os.path.isfile(filename):
! return _('%s\nnot found!') % item.url
!
! if not filename:
! filename = item.url
# Build the MPlayer command
***************
*** 148,152 ****
config.MPLAYER_ARGS_DEF)
! if not network_play:
demux = ' %s ' % self.get_demuxer(filename)
else:
--- 142,146 ----
config.MPLAYER_ARGS_DEF)
! if not item.network_play:
demux = ' %s ' % self.get_demuxer(filename)
else:
***************
*** 160,167 ****
is_playlist = True
! if network_play and filename.endswith('m3u'):
is_playlist = True
! if network_play:
extra_opts += ' -cache 100'
--- 154,161 ----
is_playlist = True
! if item.network_play and filename.endswith('m3u'):
is_playlist = True
! if item.network_play:
extra_opts += ' -cache 100'
Index: playlist.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/plugins/playlist.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** playlist.py 16 Dec 2003 20:26:16 -0000 1.4
--- playlist.py 29 Dec 2003 22:09:19 -0000 1.5
***************
*** 97,102 ****
def queue_file(self,arg=None, menuw=None):
if not self.playlist_handle:
! self.playlist_handle = open(('%s/%s.m3u' % (self.playlist_folder,
time.strftime(self.naming))),'w+')
! self.playlist_handle.write('%s\n' % self.item.filename)
self.playlist_handle.flush()
rc.post_event(Event(OSD_MESSAGE, arg='Queued Track'))
--- 97,104 ----
def queue_file(self,arg=None, menuw=None):
if not self.playlist_handle:
! self.playlist_handle = open(('%s/%s.m3u' % (self.playlist_folder,
!
time.strftime(self.naming))),'w+')
! for f in self.item.files.get():
! self.playlist_handle.write('%s\n' % f)
self.playlist_handle.flush()
rc.post_event(Event(OSD_MESSAGE, arg='Queued Track'))
Index: xine.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/plugins/xine.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** xine.py 13 Dec 2003 14:27:19 -0000 1.12
--- xine.py 29 Dec 2003 22:09:19 -0000 1.13
***************
*** 13,16 ****
--- 13,19 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.13 2003/12/29 22:09:19 dischi
+ # move to new Item attributes
+ #
# Revision 1.12 2003/12/13 14:27:19 outlyer
# Since ChildApp2 defaults to stopping the OSD, stop_osd=0 needs to be defined
***************
*** 137,157 ****
self.item = item
self.playerGUI = playerGUI
! add_args = ''
- if item.url:
- filename = item.url
- else:
- filename = item.filename
-
if plugin.getbyname('MIXER'):
plugin.getbyname('MIXER').reset()
! if filename.startswith('cdda://'):
! filename = filename.replace('//', '/')
! add_args += ' cfg:/input.cdda_device:%s' % item.media.devicename
! command = '%s %s "%s"' % (self.command, add_args, filename)
! _debug_('Xine.play(): Starting cmd=%s' % command)
!
self.app = XineApp(command, self)
--- 140,154 ----
self.item = item
self.playerGUI = playerGUI
! add_args = []
if plugin.getbyname('MIXER'):
plugin.getbyname('MIXER').reset()
! url = item.url
! if url.startswith('cdda://'):
! url = url.replace('//', '/')
! add_args.append('cfg:/input.cdda_device:%s' % item.media.devicename)
! command = self.command.split(' ') + add_args + [ url ]
self.app = XineApp(command, self)
-------------------------------------------------------
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