def addToLibrary(play): Addon.log('Add to library: %s' % play) folder = Addon.get_setting('library_folder') if folder == '': d = xbmcgui.Dialog() d.ok( Addon.get_string(30300), 'You have not set the library folder.\nPlease update the addon settings and try again.', '', '') Addon.addon.openSettings(sys.argv[0]) folder = Addon.get_setting('library_folder') if folder == '': return if Addon.get_setting('download_hq') == 'true': #fix for old versions hq = '720p' else: hq = Addon.get_setting('hq') title = play.rsplit('@', 1)[0] assetID = play.rsplit('@', 1)[1] stream_url = muzu.resolve_stream(assetID, hq) #try and match artist and track name artist, track = getArtistAndTrack(title) kb = xbmc.Keyboard(artist, 'Enter Artist...') kb.doModal() if not kb.isConfirmed(): return artist = clean(kb.getText()) kb = xbmc.Keyboard(track, 'Enter Track...') kb.doModal() if not kb.isConfirmed(): return track = clean(kb.getText()) if track == '' and artist == '': return path = os.path.join(folder, artist + ' - ' + track) if not os.path.exists(path): os.mkdir(path) filename = os.path.join(path, track + '.strm') strm = stream_url f = open(filename, "w") f.write(strm) f.close()
def addToLibrary(play): Addon.log('Add to library: %s' % play) folder = Addon.get_setting('library_folder') if folder == '': d = xbmcgui.Dialog() d.ok(Addon.get_string(30300),'You have not set the library folder.\nPlease update the addon settings and try again.','','') Addon.addon.openSettings(sys.argv[0]) folder = Addon.get_setting('library_folder') if folder == '': return if Addon.get_setting('download_hq') == 'true': #fix for old versions hq = '720p' else: hq = Addon.get_setting('hq') title = play.rsplit('@', 1)[0] assetID = play.rsplit('@', 1)[1] stream_url = muzu.resolve_stream(assetID, hq) #try and match artist and track name artist, track = getArtistAndTrack(title) kb = xbmc.Keyboard(artist, 'Enter Artist...' ) kb.doModal() if not kb.isConfirmed(): return artist = clean(kb.getText()) kb = xbmc.Keyboard(track, 'Enter Track...' ) kb.doModal() if not kb.isConfirmed(): return track = clean(kb.getText()) if track == '' and artist == '': return path = os.path.join(folder, artist + ' - ' + track) if not os.path.exists(path): os.mkdir(path) filename = os.path.join(path, track+'.strm') strm = stream_url f = open(filename, "w") f.write(strm) f.close()
def downloadPath(title, stream_url): if not stream_url or stream_url == '': return None downloadFolder = Addon.get_setting('download_folder') if Addon.get_setting('ask_folder') == 'true': dialog = xbmcgui.Dialog() downloadFolder = dialog.browse(3, 'Save to folder...', 'files', '', False, False, downloadFolder) if downloadFolder == '': return None if downloadFolder is '': d = xbmcgui.Dialog() d.ok( Addon.get_string(30300), 'You have not set the default download folder.\nPlease update the addon settings and try again.', '', '') Addon.addon.openSettings(sys.argv[0]) downloadFolder = Addon.get_setting('download_folder') if downloadFolder == '' and Addon.get_setting('ask_folder') == 'true': dialog = xbmcgui.Dialog() downloadFolder = dialog.browse(3, 'Save to folder...', 'files', '', False, False, downloadFolder) if downloadFolder == '': return None filename = stream_url filename = filename.rsplit('/', 1)[1] filename = filename.rsplit('?', 1)[0] ext = filename.rsplit('.', 1)[1] if isChart(title): title = title.split(': ', 1)[1] if Addon.get_setting('ask_filename') == 'true': kb = xbmc.Keyboard(title, 'Save video as...') kb.doModal() if kb.isConfirmed(): filename = kb.getText() else: filename = title filename = clean(filename) + '.' + ext return os.path.join(downloadFolder, filename)
def downloadPath(title, stream_url): if not stream_url or stream_url == '': return None downloadFolder = Addon.get_setting('download_folder') if Addon.get_setting('ask_folder') == 'true': dialog = xbmcgui.Dialog() downloadFolder = dialog.browse(3, 'Save to folder...', 'files', '', False, False, downloadFolder) if downloadFolder == '' : return None if downloadFolder is '': d = xbmcgui.Dialog() d.ok(Addon.get_string(30300),'You have not set the default download folder.\nPlease update the addon settings and try again.','','') Addon.addon.openSettings(sys.argv[0]) downloadFolder = Addon.get_setting('download_folder') if downloadFolder == '' and Addon.get_setting('ask_folder') == 'true': dialog = xbmcgui.Dialog() downloadFolder = dialog.browse(3, 'Save to folder...', 'files', '', False, False, downloadFolder) if downloadFolder == '' : return None filename = stream_url filename = filename.rsplit('/', 1)[1] filename = filename.rsplit('?', 1)[0] ext = filename.rsplit('.', 1)[1] if isChart(title): title = title.split(': ', 1)[1] if Addon.get_setting('ask_filename') == 'true': kb = xbmc.Keyboard(title, 'Save video as...' ) kb.doModal() if kb.isConfirmed(): filename = kb.getText() else: return None else: filename = title filename = clean(filename) + '.' + ext return os.path.join(downloadFolder, filename)
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ''' from resources.lib import Addon, crackle import sys import xbmcgui, xbmcplugin Addon.plugin_url = sys.argv[0] Addon.plugin_handle = int(sys.argv[1]) Addon.plugin_queries = Addon.parse_query(sys.argv[2][1:]) proxy = '' if Addon.get_setting('proxy') == 'true': proxy = Addon.get_setting('proxy_server') crack = crackle.Crackle(proxy) Addon.log('plugin url: ' + Addon.plugin_url) Addon.log('plugin queries: ' + str(Addon.plugin_queries)) Addon.log('plugin handle: ' + str(Addon.plugin_handle)) mode = Addon.plugin_queries['mode'] play = Addon.plugin_queries['play'] if play: Addon.log('play ' + play) video_url = crack.resolve_movie(play) xbmcplugin.setResolvedUrl(Addon.plugin_handle, True,
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ''' from resources.lib import Addon import sys, os import urllib import xbmc, xbmcgui, xbmcplugin, xbmcaddon Addon.plugin_url = sys.argv[0] Addon.plugin_handle = int(sys.argv[1]) Addon.plugin_queries = Addon.parse_query(sys.argv[2][1:]) email = Addon.get_setting('email') password = Addon.get_setting('password') premium = Addon.get_setting('subscription') == "true" premium_last = Addon.get_setting('subscription_last') == "true" dlg = xbmcgui.Dialog() addon = xbmcaddon.Addon(id='plugin.video.ustvnow') plugin_path = addon.getAddonInfo('path') write_path = xbmc.translatePath(Addon.get_setting('write_folder')) from resources.lib import ustvnow_new ustv = ustvnow_new.Ustvnow(email, password, premium) if premium != premium_last: ustv.clearCache() Addon.set_setting('subscription_last', Addon.get_setting('subscription'))
from resources.lib import Addon, ustvnow_plus import sys, os, urllib, urllib2 import json, random import xbmc, xbmcgui, xbmcplugin, xbmcaddon addon = xbmcaddon.Addon() addonname = addon.getAddonInfo('name') addonid = addon.getAddonInfo('id') plugin_path = xbmcaddon.Addon(id=addonid).getAddonInfo('path') Addon.plugin_url = sys.argv[0] Addon.plugin_handle = int(sys.argv[1]) Addon.plugin_queries = Addon.parse_query(sys.argv[2][1:]) setup = Addon.get_setting('setup') setup_new = Addon.get_setting('setup_new') email = Addon.get_setting('email') password = Addon.get_setting('password') ustv = ustvnow_plus.Ustvnow(email, password) dlg = xbmcgui.Dialog() Addon.log('plugin url: ' + Addon.plugin_url) Addon.log('plugin queries: ' + str(Addon.plugin_queries)) Addon.log('plugin handle: ' + str(Addon.plugin_handle)) quality_type = int(Addon.get_setting('quality')) if setup != 'true': dlg.ok(Addon.get_string(30000), Addon.get_string(20002),
Addon.log('plugin queries: ' + str(Addon.plugin_queries)) Addon.log('plugin handle: ' + str(Addon.plugin_handle)) addon_logo = xbmc.translatePath(os.path.join(plugin_path, 'tvaddons_logo.png')) mode = Addon.plugin_queries['mode'] if mode == 'main': try: playlists = source.Source().build_main() if playlists: for c in sorted(playlists): Addon.add_directory({'mode': c['title']}, c['title'], img=c['img']) if len(Addon.get_setting('notify')) > 0: Addon.set_setting('notify', str(int(Addon.get_setting('notify')) + 1)) else: Addon.set_setting('notify', "1") if int(Addon.get_setting('notify')) == 1: xbmcgui.Dialog().notification(addonname + ' is provided by:', 'www.tvaddons.co', addon_logo, 5000, False) elif int(Addon.get_setting('notify')) == 9: Addon.set_setting('notify', "0") except: dlg.ok(Addon.get_string(5000), Addon.get_string(8000)) exit()
import re, urllib CHARTS = [] CHARTS.append('') CHARTS.append(['568952', 'top-40-charts']) #Top 40 #The rest no longer available on Muzu #CHARTS.append(['695693', 'uk-rock']) #Rock Chart #CHARTS.append(['695695', '']) #Alternative #CHARTS.append(['695696', 'uk-dance']) #Dance Chart #CHARTS.append(['695701', 'uk-rnb']) #RnB Addon.plugin_url = sys.argv[0] Addon.plugin_handle = int(sys.argv[1]) Addon.plugin_queries = Addon.parse_query(sys.argv[2][1:]) email = Addon.get_setting('email') password = Addon.get_setting('password') muzu = muzutv.MuzuTv() Addon.log('plugin url: ' + Addon.plugin_url) Addon.log('plugin queries: ' + str(Addon.plugin_queries)) Addon.log('plugin handle: ' + str(Addon.plugin_handle)) mode = Addon.plugin_queries['mode'] play = Addon.plugin_queries['play'] #print mode #print play def autoPlay():
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ''' from resources.lib import Addon, ustvnow import sys import urllib import xbmc, xbmcgui, xbmcplugin Addon.plugin_url = sys.argv[0] Addon.plugin_handle = int(sys.argv[1]) Addon.plugin_queries = Addon.parse_query(sys.argv[2][1:]) email = Addon.get_setting('email') password = Addon.get_setting('password') premium = Addon.get_setting('subscription') == "true" dlg = xbmcgui.Dialog() if not email: retval = dlg.input('Enter USTVnow Account Email', type=xbmcgui.INPUT_ALPHANUM) if retval and len(retval) > 0: Addon.set_setting('email', str(retval)) email = Addon.get_setting('email') if not password: retval = dlg.input('Enter USTVnow Account Password', type=xbmcgui.INPUT_ALPHANUM) if retval and len(retval) > 0: Addon.set_setting('password', str(retval)) password = Addon.get_setting('password')
along with this program. If not, see <http://www.gnu.org/licenses/>. ''' from resources.lib import Addon, ustvnow import sys import urllib import xbmc, xbmcgui, xbmcplugin DEFAULT_EMAIL = '*****@*****.**' DEFAULT_PASSWORD = '******' Addon.plugin_url = sys.argv[0] Addon.plugin_handle = int(sys.argv[1]) Addon.plugin_queries = Addon.parse_query(sys.argv[2][1:]) email = Addon.get_setting('email') or DEFAULT_EMAIL password = Addon.get_setting('password') or DEFAULT_PASSWORD print "Logging into ustvnow with email %s and password %s" % (email, password) ustv = ustvnow.Ustvnow(email, password) Addon.log('plugin url: ' + Addon.plugin_url) Addon.log('plugin queries: ' + str(Addon.plugin_queries)) Addon.log('plugin handle: ' + str(Addon.plugin_handle)) mode = Addon.plugin_queries['mode'] if mode == 'main': mode = 'live' Addon.log(mode) stream_type = ['rtmp', 'rtsp'][int(Addon.get_setting('stream_type'))]
along with this program. If not, see <http://www.gnu.org/licenses/>. ''' from resources.lib import Addon, ustvnow from resources.lib import ustvnowPlayer from resources.lib import tvWindow import sys import urllib import xbmc, xbmcgui, xbmcplugin, xbmcaddon Addon.plugin_url = sys.argv[0] Addon.plugin_handle = int(sys.argv[1]) Addon.plugin_queries = Addon.parse_query(sys.argv[2][1:]) email = Addon.get_setting('email') password = Addon.get_setting('password') ustv = ustvnow.Ustvnow(email, password) Addon.log('plugin url: ' + Addon.plugin_url) Addon.log('plugin queries: ' + str(Addon.plugin_queries)) Addon.log('plugin handle: ' + str(Addon.plugin_handle)) mode = Addon.plugin_queries['mode'] settingMode = Addon.get_setting('settingMode') controlMode = Addon.get_setting('controlMode') addon = xbmcaddon.Addon(id='plugin.video.ustvnow-ddurdle') #added by ddurdle
along with this program. If not, see <http://www.gnu.org/licenses/>. ''' from resources.lib import Addon, ustvnow from resources.lib import ustvnowPlayer from resources.lib import tvWindow import sys import urllib import xbmc, xbmcgui, xbmcplugin, xbmcaddon Addon.plugin_url = sys.argv[0] Addon.plugin_handle = int(sys.argv[1]) Addon.plugin_queries = Addon.parse_query(sys.argv[2][1:]) email = Addon.get_setting('email') password = Addon.get_setting('password') ustv = ustvnow.Ustvnow(email, password) Addon.log('plugin url: ' + Addon.plugin_url) Addon.log('plugin queries: ' + str(Addon.plugin_queries)) Addon.log('plugin handle: ' + str(Addon.plugin_handle)) mode = Addon.plugin_queries['mode'] settingMode = Addon.get_setting('settingMode') controlMode = Addon.get_setting('controlMode') addon = xbmcaddon.Addon(id='plugin.video.ustvnow')
import json, random import xbmc, xbmcgui, xbmcplugin, xbmcaddon addon = xbmcaddon.Addon() addonname = addon.getAddonInfo('name') addonid = addon.getAddonInfo('id') plugin_path = xbmcaddon.Addon(id=addonid).getAddonInfo('path') Addon.plugin_url = sys.argv[0] Addon.plugin_handle = int(sys.argv[1]) Addon.plugin_queries = Addon.parse_query(sys.argv[2][1:]) write_path = xbmc.translatePath(os.path.join(plugin_path, 'resources', 'guide')) setup = Addon.get_setting('setup') setup_new = Addon.get_setting('setup_new') email = Addon.get_setting('email') password = Addon.get_setting('password') ustv = ustvnow.Ustvnow(email, password) dlg = xbmcgui.Dialog() Addon.log('plugin url: ' + Addon.plugin_url) Addon.log('plugin queries: ' + str(Addon.plugin_queries)) Addon.log('plugin handle: ' + str(Addon.plugin_handle)) quality_type = int(Addon.get_setting('quality')) if setup != 'true': dlg.ok(Addon.get_string(30000), Addon.get_string(20002),
import xbmc, xbmcgui Addon.plugin_url = sys.argv[0] Addon.plugin_handle = int(sys.argv[1]) Addon.plugin_queries = Addon.parse_query(sys.argv[2][1:]) Addon.log('plugin url: ' + Addon.plugin_url) Addon.log('plugin queries: ' + str(Addon.plugin_queries)) Addon.log('plugin handle: ' + str(Addon.plugin_handle)) mode = Addon.plugin_queries['mode'] play = Addon.plugin_queries['play'] next = Addon.plugin_queries.get('next', None) if mode == 'main': et = EightTracks(Addon.get_setting('username'), Addon.get_setting('password'), show_validation_error=True) else: et = EightTracks(Addon.get_setting('username'), Addon.get_setting('password'), show_validation_error=False) if play: xbmc.Player().stop() user = Addon.plugin_queries['user'] img = Addon.plugin_queries['img'] mix_name = Addon.plugin_queries['mix_name'] mix_id = play or next player = EightTracksPlayer(xbmc.PLAYER_CORE_DVDPLAYER, et=et) player.play_mix(mix_id, mix_name, user, img)
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ''' import datetime, time, os, urllib import xbmc, xbmcaddon import _strptime from resources.lib import Addon addon = xbmcaddon.Addon(id='plugin.video.ustvnow') plugin_path = addon.getAddonInfo('path') THUMB = os.path.join(plugin_path,'icon.png') while (not xbmc.abortRequested): if int(Addon.get_setting('write_type')) != 0: if int(Addon.get_setting('write_type')) in [2,3]: MSG = 'M3U' else: MSG = 'STRM' now = datetime.datetime.today() try: Update_LastRun = Addon.get_setting("Update_NextRun") if not Update_LastRun: raise exception() except: Update_LastRun = "1970-01-01 23:59:00.000000" Addon.set_setting('Update_NextRun', str(Update_LastRun)) try: SyncUpdate = datetime.datetime.strptime(Update_LastRun, "%Y-%m-%d %H:%M:%S.%f") except:
import sys, os, urllib, urllib2 import json, random import xbmc, xbmcgui, xbmcplugin, xbmcaddon addon = xbmcaddon.Addon() addonname = addon.getAddonInfo('name') addonid = addon.getAddonInfo('id') plugin_path = xbmcaddon.Addon(id=addonid).getAddonInfo('path') Addon.plugin_url = sys.argv[0] Addon.plugin_handle = int(sys.argv[1]) Addon.plugin_queries = Addon.parse_query(sys.argv[2][1:]) write_path = xbmc.translatePath(os.path.join(plugin_path, 'resources', 'guide')) setup = Addon.get_setting('setup') setup_new = Addon.get_setting('setup_new') email = Addon.get_setting('email') password = Addon.get_setting('password') ustv = ustvnow.Ustvnow(email, password) dlg = xbmcgui.Dialog() Addon.log('plugin url: ' + Addon.plugin_url) Addon.log('plugin queries: ' + str(Addon.plugin_queries)) Addon.log('plugin handle: ' + str(Addon.plugin_handle)) quality_type = int(Addon.get_setting('quality')) if setup != 'true': dlg.ok(Addon.get_string(30000),Addon.get_string(20002),Addon.get_string(20003))
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ''' from resources.lib import Addon, muzutv import os.path import random import sys import xbmc, xbmcgui, xbmcplugin Addon.plugin_url = sys.argv[0] Addon.plugin_handle = int(sys.argv[1]) Addon.plugin_queries = Addon.parse_query(sys.argv[2][1:]) email = Addon.get_setting('email') password = Addon.get_setting('password') muzu = muzutv.MuzuTv() Addon.log('plugin url: ' + Addon.plugin_url) Addon.log('plugin queries: ' + str(Addon.plugin_queries)) Addon.log('plugin handle: ' + str(Addon.plugin_handle)) mode = Addon.plugin_queries['mode'] play = Addon.plugin_queries['play'] if play: Addon.log('play: %s' % play) if Addon.get_setting('hq') == 'true': hq = True else:
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ''' from resources.lib import Addon, ustvnow import sys import urllib import xbmc, xbmcgui, xbmcplugin, xbmcaddon addon = xbmcaddon.Addon() addonname = addon.getAddonInfo('name') addonid = addon.getAddonInfo('id') if Addon.get_setting('setup') == "false": win = xbmcgui.Window(10000) win.setProperty(addonname + '.setup', "true") xbmc.executebuiltin('RunScript("' + addonid + '", "")') while True: if win.getProperty(addonname + '.setup') == "false": break xbmc.sleep(250) Addon.plugin_url = sys.argv[0] Addon.plugin_handle = int(sys.argv[1]) Addon.plugin_queries = Addon.parse_query(sys.argv[2][1:]) email = Addon.get_setting('email') password = Addon.get_setting('password') ustv = ustvnow.Ustvnow(email, password)
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ''' from resources.lib import Addon, ustvnow import sys import urllib import xbmc, xbmcgui, xbmcplugin Addon.plugin_url = sys.argv[0] Addon.plugin_handle = int(sys.argv[1]) Addon.plugin_queries = Addon.parse_query(sys.argv[2][1:]) email = Addon.get_setting('email') password = Addon.get_setting('password') ustv = ustvnow.Ustvnow(email, password) Addon.log('plugin url: ' + Addon.plugin_url) Addon.log('plugin queries: ' + str(Addon.plugin_queries)) Addon.log('plugin handle: ' + str(Addon.plugin_handle)) mode = Addon.plugin_queries['mode'] if mode == 'main': Addon.log(mode) Addon.add_directory({'mode': 'live'}, Addon.get_string(30001)) Addon.add_directory({'mode': 'recordings'}, Addon.get_string(30002)) elif mode == 'live':
'Freeform', img=xbmc.translatePath( os.path.join(plugin_path, 'resources', 'images', 'freeform_main.png'))) Addon.add_directory({'mode': 'hgtv_main'}, 'HGTV', img=xbmc.translatePath( os.path.join(plugin_path, 'resources', 'images', 'hgtv_main.png'))) Addon.add_directory({'mode': 'travel_main'}, 'Travel Channel', img=xbmc.translatePath( os.path.join(plugin_path, 'resources', 'images', 'travel_main.png'))) if len(Addon.get_setting('notify')) > 0: Addon.set_setting('notify', str(int(Addon.get_setting('notify')) + 1)) else: Addon.set_setting('notify', "1") if int(Addon.get_setting('notify')) == 1: dlg.notification(addonname + ' is provided by:', 'Mr.Blamo', brand_logo, 5000, False) elif int(Addon.get_setting('notify')) == 9: Addon.set_setting('notify', "0") #VPN Message if int(Addon.get_setting('vpn')) != 1: dlg.ok( addonname, "If you are outside the USA, you might want to consider subscribing to a VPN service in order to take full advantage of this addon.[/COLOR]" )
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ''' import datetime, time, os, urllib import xbmc, xbmcaddon import _strptime from resources.lib import Addon addon = xbmcaddon.Addon(id='plugin.video.ustvnow') plugin_path = addon.getAddonInfo('path') THUMB = os.path.join(plugin_path,'icon.png') while (not xbmc.abortRequested): if int(Addon.get_setting('write_type')) != 0: if int(Addon.get_setting('write_type')) in [2,3]: MSG = 'M3U' else: MSG = 'STRM' now = datetime.datetime.today() try: Update_LastRun = Addon.getProperty("Update_NextRun") if not Update_LastRun: raise exception() except: Update_LastRun = "1970-01-01 23:59:00.000000" Addon.setProperty('Update_NextRun', str(Update_LastRun)) try: SyncUpdate = datetime.datetime.strptime(Update_LastRun, "%Y-%m-%d %H:%M:%S.%f") except:
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ''' from resources.lib import Addon, ustvnow import sys import urllib import xbmc, xbmcgui, xbmcplugin Addon.plugin_url = sys.argv[0] Addon.plugin_handle = int(sys.argv[1]) Addon.plugin_queries = Addon.parse_query(sys.argv[2][1:]) email = Addon.get_setting('email') password = Addon.get_setting('password') premium = Addon.get_setting('subscription') == "true" dlg = xbmcgui.Dialog() if not email: dlg.ok("USTVnow", "Please visit www.ustvnow.com", "and register for your login credentials") retval = dlg.input('Enter USTVnow Account Email', type=xbmcgui.INPUT_ALPHANUM) if retval and len(retval) > 0: Addon.set_setting('email', str(retval)) email = Addon.get_setting('email') retval = dlg.input('Enter USTVnow Account Password', type=xbmcgui.INPUT_ALPHANUM) if retval and len(retval) > 0: Addon.set_setting('password', str(retval)) password = Addon.get_setting('password') if dlg.yesno("USTVnow", 'Are you a premium subscriber?'):
addonid = addon.getAddonInfo('id') plugin_path = xbmcaddon.Addon(id=addonid).getAddonInfo('path') Addon.plugin_url = sys.argv[0] Addon.plugin_handle = int(sys.argv[1]) Addon.plugin_queries = Addon.parse_query(sys.argv[2][1:]) dlg = xbmcgui.Dialog() Addon.log('plugin url: ' + Addon.plugin_url) Addon.log('plugin queries: ' + str(Addon.plugin_queries)) Addon.log('plugin handle: ' + str(Addon.plugin_handle)) mode = Addon.plugin_queries['mode'] quality = int(Addon.get_setting('quality')) if mode == 'main': channels = tvtime.TVtime().get_channels(quality) if channels: for c in channels: channel = c['channel']; rURL = "plugin://plugin.video.tvtime.tva/?channel=" + channel + "&mode=play&rand=" + Addon.random_generator() logo = xbmc.translatePath(os.path.join(plugin_path, 'resources', 'images', 'logos', c['channel']+'.png')) title = c["title"].replace("&", "&").replace('"','"'); title = title.replace("&", "&"); title = '%s - %s' % (Addon.cleanChannel(channel), title) cm_refresh = (Addon.get_string(40000), 'XBMC.RunPlugin(%s/?mode=refresh)' % (Addon.plugin_url)) cm_menu = [cm_refresh]
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. ''' import datetime, time, os, urllib import xbmc, xbmcaddon import _strptime from resources.lib import Addon addon = xbmcaddon.Addon(id='plugin.video.ustvnow') plugin_path = addon.getAddonInfo('path') THUMB = os.path.join(plugin_path, 'icon.png') while (not xbmc.abortRequested): if int(Addon.get_setting('write_type')) != 0: if int(Addon.get_setting('write_type')) in [2, 3]: MSG = 'M3U' else: MSG = 'STRM' now = datetime.datetime.today() try: Update_LastRun = Addon.getProperty("Update_NextRun") if not Update_LastRun: raise exception() except: Update_LastRun = "1970-01-01 23:59:00.000000" Addon.setProperty('Update_NextRun', str(Update_LastRun)) try: SyncUpdate = datetime.datetime.strptime(Update_LastRun, "%Y-%m-%d %H:%M:%S.%f")
import sys, os, urllib, urllib2 import json import xbmc, xbmcgui, xbmcplugin, xbmcaddon addon = xbmcaddon.Addon() addonname = addon.getAddonInfo('name') addonid = addon.getAddonInfo('id') plugin_path = xbmcaddon.Addon(id=addonid).getAddonInfo('path') Addon.plugin_url = sys.argv[0] Addon.plugin_handle = int(sys.argv[1]) Addon.plugin_queries = Addon.parse_query(sys.argv[2][1:]) write_path = xbmc.translatePath(os.path.join(plugin_path, 'resources', 'guide')) setup = Addon.get_setting('setup') setup_new = Addon.get_setting('setup_new') email = Addon.get_setting('email') password = Addon.get_setting('password') ustv = ustvnow_plus.Ustvnow(email, password) dlg = xbmcgui.Dialog() Addon.log('plugin url: ' + Addon.plugin_url) Addon.log('plugin queries: ' + str(Addon.plugin_queries)) Addon.log('plugin handle: ' + str(Addon.plugin_handle)) if int(Addon.get_setting('quality')) < 0: Addon.set_setting('quality', '0') elif int(Addon.get_setting('quality')) > 3: Addon.set_setting('quality', '3')
import xbmc, xbmcgui Addon.plugin_url = sys.argv[0] Addon.plugin_handle = int(sys.argv[1]) Addon.plugin_queries = Addon.parse_query(sys.argv[2][1:]) Addon.log('plugin url: ' + Addon.plugin_url) Addon.log('plugin queries: ' + str(Addon.plugin_queries)) Addon.log('plugin handle: ' + str(Addon.plugin_handle)) mode = Addon.plugin_queries['mode'] play = Addon.plugin_queries['play'] next = Addon.plugin_queries.get('next', None) if mode == 'main': et = EightTracks(Addon.get_setting('username'), Addon.get_setting('password'), show_validation_error=True) else: et = EightTracks(Addon.get_setting('username'), Addon.get_setting('password'), show_validation_error=False) if play: xbmc.Player().stop() user = Addon.plugin_queries['user'] img = Addon.plugin_queries['img'] mix_name = Addon.plugin_queries['mix_name'] mix_id = play or next
CHARTS = [] CHARTS.append('') CHARTS.append(['568952', 'top-40-charts']) #Top 40 #The rest no longer available on Muzu #CHARTS.append(['695693', 'uk-rock']) #Rock Chart #CHARTS.append(['695695', '']) #Alternative #CHARTS.append(['695696', 'uk-dance']) #Dance Chart #CHARTS.append(['695701', 'uk-rnb']) #RnB Addon.plugin_url = sys.argv[0] Addon.plugin_handle = int(sys.argv[1]) Addon.plugin_queries = Addon.parse_query(sys.argv[2][1:]) email = Addon.get_setting('email') password = Addon.get_setting('password') muzu = muzutv.MuzuTv() Addon.log('plugin url: ' + Addon.plugin_url) Addon.log('plugin queries: ' + str(Addon.plugin_queries)) Addon.log('plugin handle: ' + str(Addon.plugin_handle)) mode = Addon.plugin_queries['mode'] play = Addon.plugin_queries['play'] #print mode #print play def autoPlay():