Author: duncan
Date: Mon Feb 25 14:36:52 2008
New Revision: 10436
Log:
Added an alert box when the tv player plug-in has not been loaded
Modified:
branches/rel-1-7/freevo/src/tv/tvmenu.py
branches/rel-1/freevo/src/tv/tvmenu.py
Modified: branches/rel-1-7/freevo/src/tv/tvmenu.py
==============================================================================
--- branches/rel-1-7/freevo/src/tv/tvmenu.py (original)
+++ branches/rel-1-7/freevo/src/tv/tvmenu.py Mon Feb 25 14:36:52 2008
@@ -62,23 +62,24 @@
tv_channel_id, tv_display_name, tv_tuner_id = vals[:3]
if tv_channel_id == channel_id:
return tv_tuner_id
-
AlertBox(text=_('Could not find TV channel %s') % channel_id).show()
return None
def get_friendly_channel(channel_id):
channel_name = tv_util.get_chan_displayname(channel_id)
-
if not channel_name:
AlertBox(text=_('Could not find TV channel %s') % channel_id).show()
-
return channel_name
def start_tv(mode=None, channel_id=None):
tuner_id = get_tunerid(channel_id)
- plugin.getbyname(plugin.TV).Play(mode, tuner_id)
+ p = plugin.getbyname(plugin.TV)
+ if p is None:
+ AlertBox(text=_('Cannot get TV plug-in')).show()
+ return
+ p.Play(mode, tuner_id)
Modified: branches/rel-1/freevo/src/tv/tvmenu.py
==============================================================================
--- branches/rel-1/freevo/src/tv/tvmenu.py (original)
+++ branches/rel-1/freevo/src/tv/tvmenu.py Mon Feb 25 14:36:52 2008
@@ -62,23 +62,24 @@
tv_channel_id, tv_display_name, tv_tuner_id = vals[:3]
if tv_channel_id == channel_id:
return tv_tuner_id
-
AlertBox(text=_('Could not find TV channel %s') % channel_id).show()
return None
def get_friendly_channel(channel_id):
channel_name = tv_util.get_chan_displayname(channel_id)
-
if not channel_name:
AlertBox(text=_('Could not find TV channel %s') % channel_id).show()
-
return channel_name
def start_tv(mode=None, channel_id=None):
tuner_id = get_tunerid(channel_id)
- plugin.getbyname(plugin.TV).Play(mode, tuner_id)
+ p = plugin.getbyname(plugin.TV)
+ if p is None:
+ AlertBox(text=_('Cannot get TV plug-in')).show()
+ return
+ p.Play(mode, tuner_id)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog