Author: duncan
Date: Sun Nov 11 13:01:39 2007
New Revision: 10105

Log:
[ 1829908 ] Alternate player menu
Patch from Tanja Kotthaus applied


Modified:
   branches/rel-1-7/freevo/src/audio/plugins/detach.py
   branches/rel-1-7/freevo/src/tv/plugins/recordings_manager.py
   branches/rel-1-7/freevo/src/video/configure.py
   branches/rel-1-7/freevo/src/video/plugins/mplayer.py
   branches/rel-1-7/freevo/src/video/plugins/vpodcast.py
   branches/rel-1-7/freevo/src/video/videoitem.py
   branches/rel-1/freevo/src/audio/plugins/detach.py
   branches/rel-1/freevo/src/tv/plugins/recordings_manager.py
   branches/rel-1/freevo/src/video/configure.py
   branches/rel-1/freevo/src/video/plugins/mplayer.py
   branches/rel-1/freevo/src/video/plugins/vpodcast.py
   branches/rel-1/freevo/src/video/videoitem.py

Modified: branches/rel-1-7/freevo/src/audio/plugins/detach.py
==============================================================================
--- branches/rel-1-7/freevo/src/audio/plugins/detach.py (original)
+++ branches/rel-1-7/freevo/src/audio/plugins/detach.py Sun Nov 11 13:01:39 2007
@@ -128,6 +128,9 @@
         # hide the menu and show the player
         menuw.hide()
         gui.show()
+        
+        ### TODO: is this plugin still around?
+        # maybe we can remove this lines savely
         mpav = plugin.getbyname( 'audio.mpav' )
         if mpav:
             mpav.start_mpav()

Modified: branches/rel-1-7/freevo/src/tv/plugins/recordings_manager.py
==============================================================================
--- branches/rel-1-7/freevo/src/tv/plugins/recordings_manager.py        
(original)
+++ branches/rel-1-7/freevo/src/tv/plugins/recordings_manager.py        Sun Nov 
11 13:01:39 2007
@@ -422,11 +422,11 @@
         return items
 
 
-    def play(self, arg=None, menuw=None, alternateplayer=False):
+    def play(self, arg=None, menuw=None):
         """
         Play the recorded program, and then mark it as watched.
         """
-        self.video_item.play(menuw=menuw, arg=arg, 
alternateplayer=alternateplayer)
+        self.video_item.play(menuw=menuw, arg=arg)
 
         # Mark this programme as watched.
         self.update_fxd(True, self.keep)

Modified: branches/rel-1-7/freevo/src/video/configure.py
==============================================================================
--- branches/rel-1-7/freevo/src/video/configure.py      (original)
+++ branches/rel-1-7/freevo/src/video/configure.py      Sun Nov 11 13:01:39 2007
@@ -180,6 +180,28 @@
     moviemenu = menu.Menu(_('Chapter Menu'), menu_items, 
fxd_file=item.skin_fxd)
     menuw.pushmenu(moviemenu)
 
+#
+# Player selection
+#
+
+def player_selection(menuw=None, arg=None):
+    item, player = arg
+    item.player = player[1]
+    item.player_rating= player[0]
+    menuw.delete_menu()
+    play_movie(menuw=menuw, arg=(item, None))
+
+
+def player_selection_menu(arg=None, menuw=None):
+    item  = arg
+    menu_items = []
+
+    for player in item.possible_player:
+        menu_items += [ menu.MenuItem(_('Play with "%s"') % (player[1].name),
+                                      player_selection, (arg, player))]
+   
+    moviemenu = menu.Menu(_('Player Menu'), menu_items, fxd_file=item.skin_fxd)
+    menuw.pushmenu(moviemenu)
 
 #
 # De-interlacer
@@ -252,6 +274,8 @@
     items = []
 
     if item.filename or (item.mode in ('dvd', 'vcd') and item.player_rating >= 
20):
+        if len(item.possible_player) >1:
+            items.append(menu.MenuItem(_('Play with alternate player'), 
player_selection_menu, item))
         if item.info.has_key('audio') and len(item.info['audio']) > 1:
             items.append(menu.MenuItem(_('Audio selection'), 
audio_selection_menu, item))
         if item.info.has_key('subtitles') and len(item.info['subtitles']) >= 1:

Modified: branches/rel-1-7/freevo/src/video/plugins/mplayer.py
==============================================================================
--- branches/rel-1-7/freevo/src/video/plugins/mplayer.py        (original)
+++ branches/rel-1-7/freevo/src/video/plugins/mplayer.py        Sun Nov 11 
13:01:39 2007
@@ -91,12 +91,17 @@
         except Exception, e:
             print e
         # this seems strange that it is 'possible' for dvd:// and 'good' for 
dvd
+        # possible because dvd:// should be played with xine when available!
         if item.url[:6] in ('dvd://', 'vcd://') and item.url.endswith('/'):
             _debug_('%r possible' % (item.url))
             return 1
         if item.mode in ('dvd', 'vcd'):
             _debug_('%r good' % (item.url))
             return 2
+        # moved from videoitem to here (related to "Podcast video viewer 
plugin")
+        if item.mode in ('http') and not item.filename and not item.media:
+            _debug_('%r good' % (item.url))    
+            return 2
         if item.mimetype in config.VIDEO_MPLAYER_SUFFIX:
             _debug_('%r good' % (item.url))
             return 2

Modified: branches/rel-1-7/freevo/src/video/plugins/vpodcast.py
==============================================================================
--- branches/rel-1-7/freevo/src/video/plugins/vpodcast.py       (original)
+++ branches/rel-1-7/freevo/src/video/plugins/vpodcast.py       Sun Nov 11 
13:01:39 2007
@@ -109,10 +109,8 @@
         VideoItem.__init__(self, name, parent)
 
 
-    def play(self, arg=None, menuw=None, alternateplayer=False):
-        """ execute commands if defined """
-        if config.VIDEO_PRE_PLAY:
-            os.system(config.VIDEO_PRE_PLAY)
+    def play(self, arg=None, menuw=None):
+        """ Play this Podcast"""
 
         # play the item.
         isYT = self.vp_url.find('youtube.com')  #YouTube podcast
@@ -135,125 +133,8 @@
             time.sleep(20) # 20s. buffering time
             popup.destroy()
 
-        if not self.possible_player:
-            for p in plugin.getbyname(plugin.VIDEO_PLAYER, True):
-                rating = p.rate(self) * 10
-                if config.VIDEO_PREFERED_PLAYER == p.name:
-                    rating += 1
-                if hasattr(self, 'force_player') and p.name == 
self.force_player:
-                    rating += 100
-                self.possible_player.append((rating, p))
-
-            self.possible_player.sort(lambda l, o: -cmp(l[0], o[0]))
-
-        if alternateplayer:
-            self.possible_player.reverse()
-
-        if not self.possible_player:
-            return
-
-        self.player_rating, self.player = self.possible_player[0]
-        if self.parent:
-            self.parent.current_item = self
-
-        if not self.menuw:
-            self.menuw = menuw
-
-        # if we have variants, play the first one as default
-        if self.variants:
-            self.variants[0].play(arg, menuw)
-            return
-
-        # if we have subitems (a movie with more than one file),
-        # we start playing the first that is physically available
-        if self.subitems:
-            self.error_in_subitem = 0
-            self.last_error_msg   = ''
-            self.current_subitem  = None
-
-            result = self.set_next_available_subitem()
-            if self.current_subitem: # 'result' is always 1 in this case
-                # The media is available now for playing
-                # Pass along the options, without loosing the subitem's own
-                # options
-                if self.current_subitem.mplayer_options:
-                    if 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,
-                # the playing will stop after the first subitem, since the
-                # PLAY_END/USER_END event is not forwarded to the parent
-                # videoitem.
-                # And besides, we don't need the menu between two subitems.
-                self.menuw.hide()
-                self.last_error_msg = self.current_subitem.play(arg, 
self.menuw)
-                if self.last_error_msg:
-                    self.error_in_subitem = 1
-                    # Go to the next playable subitem, using the loop in
-                    # eventhandler()
-                    self.eventhandler(PLAY_END)
-
-            elif not result:
-                # No media at all was found: error
-                ConfirmBox(text=(_('No media found for "%s".\n')+
-                                 _('Please insert the media.')) %
-                                 self.name, handler=self.play).show()
-            return
-
-        # normal plackback of one file
-        if self.url.startswith('file://'):
-            file = self.filename
-            if self.media_id:
-                mountdir, file = util.resolve_media_mountdir(self.media_id, 
file)
-                if mountdir:
-                    util.mount(mountdir)
-                else:
-                    self.menuw.show()
-                    ConfirmBox(text=(_('No media found for "%s".\n')+
-                                     _('Please insert the media.')) % file, 
handler=self.play).show()
-                    return
-
-            elif self.media:
-                util.mount(os.path.dirname(self.filename))
-
-        elif self.mode in ('dvd', 'vcd') and not self.filename and not 
self.media:
-            media = util.check_media(self.media_id)
-            if media:
-                self.media = media
-            else:
-                self.menuw.show()
-                ConfirmBox(text=(_('No media found for "%s".\n')+
-                                 _('Please insert the media.')) % self.url, 
handler=self.play).show()
-                return
-
-        if self.player_rating < 10:
-            AlertBox(text=_('No player for this item found')).show()
-            return
-
-        mplayer_options = self.mplayer_options.split(' ')
-        if not mplayer_options:
-            mplayer_options = []
-
-        if arg:
-            mplayer_options += arg.split(' ')
-
-        if self.menuw.visible:
-            self.menuw.hide()
-
-        self.plugin_eventhandler(PLAY, menuw)
-
-        error = self.player.play(mplayer_options, self)
-
-        if error:
-            # If we are a subitem we don't show any error message before
-            # having tried all the subitems
-            if hasattr(self.parent, 'subitems') and self.parent.subitems:
-                return error
-            else:
-                AlertBox(text=error, handler=self.error_handler).show()
+        # call the play funuction of VideoItem
+        VideoItem.play(self, menuw=menuw, arg=arg)
 
 
     def youtube(self, url):

Modified: branches/rel-1-7/freevo/src/video/videoitem.py
==============================================================================
--- branches/rel-1-7/freevo/src/video/videoitem.py      (original)
+++ branches/rel-1-7/freevo/src/video/videoitem.py      Sun Nov 11 13:01:39 2007
@@ -333,9 +333,8 @@
                           (self.play, _('Play default track')) ]
         else:
             items = [ (self.play, _('Play')) ]
+        
         items.append((self.show_details, _('Full description')))
-        if len(self.possible_player) > 1:
-            items.append((self.play_alternate, _('Play with alternate 
player')))
 
         if self.network_play:
             items.append((self.play_max_cache, _('Play with maximum cache')))
@@ -390,13 +389,6 @@
         self.play(menuw=menuw, arg='-cache 65536')
 
 
-    def play_alternate(self, arg=None, menuw=None):
-        """
-        play and use maximum cache with mplayer
-        """
-        self.play(menuw=menuw, arg=arg, alternateplayer=True)
-
-
     def set_next_available_subitem(self):
         """
         select the next available subitem. Loops on each subitem and checks if
@@ -452,22 +444,20 @@
         return not from_start
 
 
-    def play(self, arg=None, menuw=None, alternateplayer=False):
+    def play(self, arg=None, menuw=None):
         """
         play the item.
         """
-        if not self.possible_player:
-            return
+                 
+        if not self.player or self.player_rating < 10:
+            AlertBox(text=_('No player for this item found')).show()
+            return  
+              
 
         # execute commands if defined
         if config.VIDEO_PRE_PLAY:
             os.system(config.VIDEO_PRE_PLAY)
-
-        # FIXME: There could be more than two players available
-        if alternateplayer:
-            self.possible_player.reverse()
-
-        self.player_rating, self.player = self.possible_player[0]
+        
         if self.parent:
             self.parent.current_item = self
 
@@ -533,6 +523,7 @@
             elif self.media:
                 util.mount(os.path.dirname(self.filename))
 
+        # dvd and vcd 
         elif self.mode in ('dvd', 'vcd') and not self.filename and not 
self.media:
             media = util.check_media(self.media_id)
             if media:
@@ -542,18 +533,8 @@
                 ConfirmBox(text=(_('No media found for "%s".\nPlease insert 
the media "%s".')) % \
                     (self.media_id, self.url), handler=self.play).show()
                 return
-        elif self.mode in ('http') and not self.filename and not self.media:
-            self.player_rating, self.player = self.possible_player[0]
-            self.player_rating = 20
-            for p in plugin.getbyname(plugin.VIDEO_PLAYER, True):
-                rating = p.rate(self) * 10
-                if p.name == 'mplayer':
-                    self.player = p
-
-        if self.player_rating < 10:
-            AlertBox(text=_('No player for this item found')).show()
-            return
-
+             
+        
         mplayer_options = self.mplayer_options.split(' ')
         if not mplayer_options:
             mplayer_options = []
@@ -618,7 +599,6 @@
         # if len(self.info['tracks']) == 1:
         #     i=copy.copy(self)
         #     i.parent = self
-        #     i.possible_player = []
         #     i.set_url(self.url + '1', False)
         #     i.play(menuw = self.menuw)
         #     return
@@ -634,7 +614,6 @@
             i.info.mmdata = self.info.mmdata['tracks'][titlenum]
             i.info.set_variables(self.info.get_variables())
             i.info_type       = 'track'
-            i.possible_player = []
             i.files           = None
             i.name            = Unicode(_('Play Title %d') % (titlenum+1))
             items.append(i)

Modified: branches/rel-1/freevo/src/audio/plugins/detach.py
==============================================================================
--- branches/rel-1/freevo/src/audio/plugins/detach.py   (original)
+++ branches/rel-1/freevo/src/audio/plugins/detach.py   Sun Nov 11 13:01:39 2007
@@ -128,6 +128,9 @@
         # hide the menu and show the player
         menuw.hide()
         gui.show()
+        
+        ### TODO: is this plugin still around?
+        # maybe we can remove this lines savely
         mpav = plugin.getbyname( 'audio.mpav' )
         if mpav:
             mpav.start_mpav()

Modified: branches/rel-1/freevo/src/tv/plugins/recordings_manager.py
==============================================================================
--- branches/rel-1/freevo/src/tv/plugins/recordings_manager.py  (original)
+++ branches/rel-1/freevo/src/tv/plugins/recordings_manager.py  Sun Nov 11 
13:01:39 2007
@@ -422,11 +422,11 @@
         return items
 
 
-    def play(self, arg=None, menuw=None, alternateplayer=False):
+    def play(self, arg=None, menuw=None):
         """
         Play the recorded program, and then mark it as watched.
         """
-        self.video_item.play(menuw=menuw, arg=arg, 
alternateplayer=alternateplayer)
+        self.video_item.play(menuw=menuw, arg=arg)
 
         # Mark this programme as watched.
         self.update_fxd(True, self.keep)

Modified: branches/rel-1/freevo/src/video/configure.py
==============================================================================
--- branches/rel-1/freevo/src/video/configure.py        (original)
+++ branches/rel-1/freevo/src/video/configure.py        Sun Nov 11 13:01:39 2007
@@ -180,6 +180,28 @@
     moviemenu = menu.Menu(_('Chapter Menu'), menu_items, 
fxd_file=item.skin_fxd)
     menuw.pushmenu(moviemenu)
 
+#
+# Player selection
+#
+
+def player_selection(menuw=None, arg=None):
+    item, player = arg
+    item.player = player[1]
+    item.player_rating= player[0]
+    menuw.delete_menu()
+    play_movie(menuw=menuw, arg=(item, None))
+
+
+def player_selection_menu(arg=None, menuw=None):
+    item  = arg
+    menu_items = []
+
+    for player in item.possible_player:
+        menu_items += [ menu.MenuItem(_('Play with "%s"') % (player[1].name),
+                                      player_selection, (arg, player))]
+   
+    moviemenu = menu.Menu(_('Player Menu'), menu_items, fxd_file=item.skin_fxd)
+    menuw.pushmenu(moviemenu)
 
 #
 # De-interlacer
@@ -252,6 +274,8 @@
     items = []
 
     if item.filename or (item.mode in ('dvd', 'vcd') and item.player_rating >= 
20):
+        if len(item.possible_player) >1:
+            items.append(menu.MenuItem(_('Play with alternate player'), 
player_selection_menu, item))
         if item.info.has_key('audio') and len(item.info['audio']) > 1:
             items.append(menu.MenuItem(_('Audio selection'), 
audio_selection_menu, item))
         if item.info.has_key('subtitles') and len(item.info['subtitles']) >= 1:

Modified: branches/rel-1/freevo/src/video/plugins/mplayer.py
==============================================================================
--- branches/rel-1/freevo/src/video/plugins/mplayer.py  (original)
+++ branches/rel-1/freevo/src/video/plugins/mplayer.py  Sun Nov 11 13:01:39 2007
@@ -91,12 +91,17 @@
         except Exception, e:
             print e
         # this seems strange that it is 'possible' for dvd:// and 'good' for 
dvd
+        # possible because dvd:// should be played with xine when available!
         if item.url[:6] in ('dvd://', 'vcd://') and item.url.endswith('/'):
             _debug_('%r possible' % (item.url))
             return 1
         if item.mode in ('dvd', 'vcd'):
             _debug_('%r good' % (item.url))
             return 2
+        # moved from videoitem to here (related to "Podcast video viewer 
plugin")
+        if item.mode in ('http') and not item.filename and not item.media:
+            _debug_('%r good' % (item.url))    
+            return 2
         if item.mimetype in config.VIDEO_MPLAYER_SUFFIX:
             _debug_('%r good' % (item.url))
             return 2

Modified: branches/rel-1/freevo/src/video/plugins/vpodcast.py
==============================================================================
--- branches/rel-1/freevo/src/video/plugins/vpodcast.py (original)
+++ branches/rel-1/freevo/src/video/plugins/vpodcast.py Sun Nov 11 13:01:39 2007
@@ -109,10 +109,8 @@
         VideoItem.__init__(self, name, parent)
 
 
-    def play(self, arg=None, menuw=None, alternateplayer=False):
-        """ execute commands if defined """
-        if config.VIDEO_PRE_PLAY:
-            os.system(config.VIDEO_PRE_PLAY)
+    def play(self, arg=None, menuw=None):
+        """ Play this Podcast"""
 
         # play the item.
         isYT = self.vp_url.find('youtube.com')  #YouTube podcast
@@ -135,125 +133,8 @@
             time.sleep(20) # 20s. buffering time
             popup.destroy()
 
-        if not self.possible_player:
-            for p in plugin.getbyname(plugin.VIDEO_PLAYER, True):
-                rating = p.rate(self) * 10
-                if config.VIDEO_PREFERED_PLAYER == p.name:
-                    rating += 1
-                if hasattr(self, 'force_player') and p.name == 
self.force_player:
-                    rating += 100
-                self.possible_player.append((rating, p))
-
-            self.possible_player.sort(lambda l, o: -cmp(l[0], o[0]))
-
-        if alternateplayer:
-            self.possible_player.reverse()
-
-        if not self.possible_player:
-            return
-
-        self.player_rating, self.player = self.possible_player[0]
-        if self.parent:
-            self.parent.current_item = self
-
-        if not self.menuw:
-            self.menuw = menuw
-
-        # if we have variants, play the first one as default
-        if self.variants:
-            self.variants[0].play(arg, menuw)
-            return
-
-        # if we have subitems (a movie with more than one file),
-        # we start playing the first that is physically available
-        if self.subitems:
-            self.error_in_subitem = 0
-            self.last_error_msg   = ''
-            self.current_subitem  = None
-
-            result = self.set_next_available_subitem()
-            if self.current_subitem: # 'result' is always 1 in this case
-                # The media is available now for playing
-                # Pass along the options, without loosing the subitem's own
-                # options
-                if self.current_subitem.mplayer_options:
-                    if 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,
-                # the playing will stop after the first subitem, since the
-                # PLAY_END/USER_END event is not forwarded to the parent
-                # videoitem.
-                # And besides, we don't need the menu between two subitems.
-                self.menuw.hide()
-                self.last_error_msg = self.current_subitem.play(arg, 
self.menuw)
-                if self.last_error_msg:
-                    self.error_in_subitem = 1
-                    # Go to the next playable subitem, using the loop in
-                    # eventhandler()
-                    self.eventhandler(PLAY_END)
-
-            elif not result:
-                # No media at all was found: error
-                ConfirmBox(text=(_('No media found for "%s".\n')+
-                                 _('Please insert the media.')) %
-                                 self.name, handler=self.play).show()
-            return
-
-        # normal plackback of one file
-        if self.url.startswith('file://'):
-            file = self.filename
-            if self.media_id:
-                mountdir, file = util.resolve_media_mountdir(self.media_id, 
file)
-                if mountdir:
-                    util.mount(mountdir)
-                else:
-                    self.menuw.show()
-                    ConfirmBox(text=(_('No media found for "%s".\n')+
-                                     _('Please insert the media.')) % file, 
handler=self.play).show()
-                    return
-
-            elif self.media:
-                util.mount(os.path.dirname(self.filename))
-
-        elif self.mode in ('dvd', 'vcd') and not self.filename and not 
self.media:
-            media = util.check_media(self.media_id)
-            if media:
-                self.media = media
-            else:
-                self.menuw.show()
-                ConfirmBox(text=(_('No media found for "%s".\n')+
-                                 _('Please insert the media.')) % self.url, 
handler=self.play).show()
-                return
-
-        if self.player_rating < 10:
-            AlertBox(text=_('No player for this item found')).show()
-            return
-
-        mplayer_options = self.mplayer_options.split(' ')
-        if not mplayer_options:
-            mplayer_options = []
-
-        if arg:
-            mplayer_options += arg.split(' ')
-
-        if self.menuw.visible:
-            self.menuw.hide()
-
-        self.plugin_eventhandler(PLAY, menuw)
-
-        error = self.player.play(mplayer_options, self)
-
-        if error:
-            # If we are a subitem we don't show any error message before
-            # having tried all the subitems
-            if hasattr(self.parent, 'subitems') and self.parent.subitems:
-                return error
-            else:
-                AlertBox(text=error, handler=self.error_handler).show()
+        # call the play funuction of VideoItem
+        VideoItem.play(self, menuw=menuw, arg=arg)
 
 
     def youtube(self, url):

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        Sun Nov 11 13:01:39 2007
@@ -333,9 +333,8 @@
                           (self.play, _('Play default track')) ]
         else:
             items = [ (self.play, _('Play')) ]
+        
         items.append((self.show_details, _('Full description')))
-        if len(self.possible_player) > 1:
-            items.append((self.play_alternate, _('Play with alternate 
player')))
 
         if self.network_play:
             items.append((self.play_max_cache, _('Play with maximum cache')))
@@ -390,13 +389,6 @@
         self.play(menuw=menuw, arg='-cache 65536')
 
 
-    def play_alternate(self, arg=None, menuw=None):
-        """
-        play and use maximum cache with mplayer
-        """
-        self.play(menuw=menuw, arg=arg, alternateplayer=True)
-
-
     def set_next_available_subitem(self):
         """
         select the next available subitem. Loops on each subitem and checks if
@@ -452,22 +444,20 @@
         return not from_start
 
 
-    def play(self, arg=None, menuw=None, alternateplayer=False):
+    def play(self, arg=None, menuw=None):
         """
         play the item.
         """
-        if not self.possible_player:
-            return
+                 
+        if not self.player or self.player_rating < 10:
+            AlertBox(text=_('No player for this item found')).show()
+            return  
+              
 
         # execute commands if defined
         if config.VIDEO_PRE_PLAY:
             os.system(config.VIDEO_PRE_PLAY)
-
-        # FIXME: There could be more than two players available
-        if alternateplayer:
-            self.possible_player.reverse()
-
-        self.player_rating, self.player = self.possible_player[0]
+        
         if self.parent:
             self.parent.current_item = self
 
@@ -533,6 +523,7 @@
             elif self.media:
                 util.mount(os.path.dirname(self.filename))
 
+        # dvd and vcd 
         elif self.mode in ('dvd', 'vcd') and not self.filename and not 
self.media:
             media = util.check_media(self.media_id)
             if media:
@@ -542,18 +533,8 @@
                 ConfirmBox(text=(_('No media found for "%s".\nPlease insert 
the media "%s".')) % \
                     (self.media_id, self.url), handler=self.play).show()
                 return
-        elif self.mode in ('http') and not self.filename and not self.media:
-            self.player_rating, self.player = self.possible_player[0]
-            self.player_rating = 20
-            for p in plugin.getbyname(plugin.VIDEO_PLAYER, True):
-                rating = p.rate(self) * 10
-                if p.name == 'mplayer':
-                    self.player = p
-
-        if self.player_rating < 10:
-            AlertBox(text=_('No player for this item found')).show()
-            return
-
+             
+        
         mplayer_options = self.mplayer_options.split(' ')
         if not mplayer_options:
             mplayer_options = []
@@ -618,7 +599,6 @@
         # if len(self.info['tracks']) == 1:
         #     i=copy.copy(self)
         #     i.parent = self
-        #     i.possible_player = []
         #     i.set_url(self.url + '1', False)
         #     i.play(menuw = self.menuw)
         #     return
@@ -634,7 +614,6 @@
             i.info.mmdata = self.info.mmdata['tracks'][titlenum]
             i.info.set_variables(self.info.get_variables())
             i.info_type       = 'track'
-            i.possible_player = []
             i.files           = None
             i.name            = Unicode(_('Play Title %d') % (titlenum+1))
             items.append(i)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to