xbmcplugin.setContent(Addon.plugin_handle, 'episodes') elif mode == 'delete': dialog = xbmcgui.Dialog() ret = dialog.yesno(Addon.get_string(30000), Addon.get_string(30004), Addon.get_string(30005)) if ret == 1: ustv.delete_recording(Addon.plugin_queries['del']) elif mode == 'favorites': favorites = ustv.get_favorites(quality_type, stream_type) elif mode == 'guidedata': # ex. xbmc.executebuiltin("XBMC.RunPlugin(plugin://plugin.video.ustvnow/?file=%s&mode=guidedata)" %urllib.quote(fpath)) fpath = Addon.plugin_queries['file'] Addon.makeXMLTV(ustv.get_guidedata(quality_type, stream_type), urllib.unquote(fpath)) elif mode == 'playlist': ustv.get_channels(quality_type, stream_type) elif mode == 'tvguide': fpath = os.path.join(write_path, 'xmltv.xml') try: name = Addon.plugin_queries['name'] listings = ustv.get_tvguide(fpath, 'programs', name) if listings: for l in range(len(listings)): rURL = "plugin://plugin.video.ustvnow/?name=" + listings[l][ 0] + "&mode=play" if listings[l][3] == 'No description available': title = '%s - %s' % (listings[l][1],
xbmcplugin.setContent(Addon.plugin_handle, 'episodes') elif mode == 'delete': dialog = xbmcgui.Dialog() ret = dialog.yesno(Addon.get_string(30000), Addon.get_string(30004), Addon.get_string(30005)) if ret == 1: ustv.delete_recording(Addon.plugin_queries['del']) elif mode == 'favorites': favorites = ustv.get_favorites(quality_type, stream_type) elif mode == 'guidedata': # ex. xbmc.executebuiltin("XBMC.RunPlugin(plugin://plugin.video.ustvnow/?file=%s&mode=guidedata)" %urllib.quote(fpath)) fpath = Addon.plugin_queries['file'] Addon.makeXMLTV(ustv.get_guidedata(quality_type, stream_type),urllib.unquote(fpath)) elif mode == 'playlist': ustv.get_channels(quality_type, stream_type) elif mode == 'tvguide': fpath = os.path.join(write_path, 'xmltv.xml') try: name = Addon.plugin_queries['name'] listings = ustv.get_tvguide(fpath, 'programs', name) if listings: for l in range(len(listings)): rURL = "plugin://plugin.video.ustvnow/?name="+listings[l][0]+"&mode=play" if listings[l][3] == 'No description available': title = '%s - %s' % (listings[l][1], (listings[l][2]).replace('&','&')) else:
img=r['icon'], cm=[cm_del], cm_replace=True, HD=quality_name, playable=False) xbmcplugin.setContent(Addon.plugin_handle, 'episodes') elif mode == 'delete': dialog = xbmcgui.Dialog() ret = dialog.yesno(Addon.get_string(30000), Addon.get_string(30004), Addon.get_string(30005)) if ret == 1: ustv.delete_recording(Addon.plugin_queries['del']) elif mode == 'favorites': favorites = ustv.get_favorites(quality_type, stream_type) elif mode == 'guidedata': # ex. xbmc.executebuiltin("XBMC.RunPlugin(plugin://plugin.video.ustvnow/?file=%s&mode=guidedata)" %urllib.quote(fpath)) fpath = Addon.plugin_queries['file'] Addon.makeXMLTV(ustv.get_guidedata(),urllib.unquote(fpath)) elif mode == 'playlist': ustv.get_channels(quality_type, stream_type, True) elif mode == 'tvguide': fpath = os.path.join(write_path, 'xmltv.xml') try: name = Addon.plugin_queries['name'] listings = ustv.get_tvguide(fpath, 'programs', name) if listings: for l in range(len(listings)): #print listings[l] rURL = "plugin://plugin.video.ustvnow/?name="+listings[l][0]+"&mode=play" if listings[l][3] == 'No description available': title = '%s - %s' % (listings[l][1], (listings[l][2]).replace('&','&'))