Author: duncan
Date: Fri Nov 16 14:25:09 2007
New Revision: 10136

Log:
[ 1833018 ] itv plugin : No player for this item found
Patch from senufo applied


Modified:
   branches/rel-1-7/freevo/src/video/videoitem.py
   branches/rel-1/freevo/src/video/videoitem.py

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      Fri Nov 16 14:25:09 2007
@@ -449,11 +449,10 @@
         play the item.
         """
 
-        if not self.player or self.player_rating < 10:
+        if not self.player:
             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)
@@ -534,6 +533,17 @@
                     (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:
@@ -551,7 +561,6 @@
 
         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

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        Fri Nov 16 14:25:09 2007
@@ -449,11 +449,10 @@
         play the item.
         """
 
-        if not self.player or self.player_rating < 10:
+        if not self.player:
             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)
@@ -534,6 +533,17 @@
                     (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:
@@ -551,7 +561,6 @@
 
         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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to