def runProgram(self): self.last_run = 0 while not xbmc.abortRequested: if settings.enable_subscriptions(): try: next_run = datetime.datetime.fromtimestamp( time.mktime( time.strptime( ADDON.getSetting("service_time").encode("utf-8", "replace"), "%Y-%m-%d %H:%M:%S" ) ) ) now = datetime.datetime.now() if now > next_run: if xbmc.Player().isPlaying() == False: if xbmc.getCondVisibility("Library.IsScanningVideo") == False: xbmc.log("[TV4ME] Refreshing subscriptions") time.sleep(1) xbmc.executebuiltin( "RunPlugin(plugin://plugin.video.tv4me/?name=service&url=service&mode=17&list=service)" ) time.sleep(1) self.last_run = now ADDON.setSetting( "service_time", str(datetime.datetime.now() + timedelta(hours=12)).split(".")[0] ) xbmc.log( "[TV4ME] Subscriptions and Library updated. Next run at " + ADDON.getSetting("service_time") ) else: xbmc.log("[TV4ME] Player is running, waiting until finished") except: pass xbmc.sleep(1000)
def runProgram(self): self.last_run = 0 while not xbmc.abortRequested: if settings.enable_subscriptions(): try: next_run = datetime.datetime.fromtimestamp(time.mktime(time.strptime(ADDON.getSetting('service_time').encode('utf-8', 'replace'), "%Y-%m-%d %H:%M:%S"))) now = datetime.datetime.now() if now > next_run: xbmc.executebuiltin('RunPlugin(plugin://plugin.video.movies4me/?name=service&url=service&mode=155&list=service)') except: pass xbmc.sleep(1000)
def runProgram(self): self.last_run = 0 while not xbmc.abortRequested: if settings.enable_subscriptions(): try: next_run = datetime.datetime.fromtimestamp(time.mktime(time.strptime(ADDON.getSetting('service_time').encode('utf-8', 'replace'), "%Y-%m-%d %H:%M:%S"))) now = datetime.datetime.now() if now > next_run: if xbmc.Player().isPlaying() == False: xbmc.executebuiltin('RunPlugin(plugin://plugin.video.smoothschedule/?name=service&url=service&mode=50)') self.last_run = now ADDON.setSetting('service_time', str(datetime.datetime.now() + timedelta(hours=2)).split('.')[0]) except: pass xbmc.sleep(1000)
def runProgram(self): self.last_run = 0 while not xbmc.abortRequested: if settings.enable_subscriptions(): try: next_run = datetime.datetime.fromtimestamp( time.mktime( time.strptime( ADDON.getSetting('service_time').encode( 'utf-8', 'replace'), "%Y-%m-%d %H:%M:%S"))) now = datetime.datetime.now() if now > next_run: xbmc.executebuiltin( 'RunPlugin(plugin://plugin.video.movies4me/?name=service&url=service&mode=155&list=service)' ) except: pass xbmc.sleep(1000)
def runProgram(self): self.last_run = 0 while not xbmc.abortRequested: if settings.enable_subscriptions(): try: next_run = datetime.datetime.fromtimestamp( time.mktime( time.strptime( ADDON.getSetting('service_time').encode( 'utf-8', 'replace'), "%Y-%m-%d %H:%M:%S"))) now = datetime.datetime.now() if now > next_run: xbmc.executebuiltin( 'RunPlugin(plugin://plugin.video.flixanity/?name=service&url=service&mode=26&list=service)' ) if xbmc.Player().isPlaying() == False: if xbmc.getCondVisibility( 'Library.IsScanningVideo') == False: xbmc.log( '[MovieStorm] Refreshing subscriptions') time.sleep(1) xbmc.executebuiltin( 'RunPlugin(plugin://plugin.video.flixanity/?name=service&url=service&mode=17&list=service)' ) time.sleep(1) self.last_run = now ADDON.setSetting( 'service_time', str(datetime.datetime.now() + timedelta(hours=12)).split('.')[0]) xbmc.log( "[MovieStorm] Subscriptions and Library updated. Next run at " + ADDON.getSetting('service_time')) else: xbmc.log( "[Flixanity] Player is running, waiting until finished" ) except: pass xbmc.sleep(1000)
def runProgram(self): self.last_run = 0 while not xbmc.abortRequested: if settings.enable_subscriptions(): try: next_run = datetime.datetime.fromtimestamp(time.mktime(time.strptime(ADDON.getSetting('service_time').encode('utf-8', 'replace'), "%Y-%m-%d %H:%M:%S"))) now = datetime.datetime.now() if now > next_run: xbmc.executebuiltin('RunPlugin(plugin://plugin.video.flixanity/?name=service&url=service&mode=26&list=service)') if xbmc.Player().isPlaying() == False: if xbmc.getCondVisibility('Library.IsScanningVideo') == False: xbmc.log('[MovieStorm] Refreshing subscriptions') time.sleep(1) xbmc.executebuiltin('RunPlugin(plugin://plugin.video.flixanity/?name=service&url=service&mode=17&list=service)') time.sleep(1) self.last_run = now ADDON.setSetting('service_time', str(datetime.datetime.now() + timedelta(hours=12)).split('.')[0]) xbmc.log("[MovieStorm] Subscriptions and Library updated. Next run at " + ADDON.getSetting('service_time')) else: xbmc.log("[Flixanity] Player is running, waiting until finished") except: pass xbmc.sleep(1000)
def runProgram(self): self.last_run = 0 while not xbmc.abortRequested: if settings.enable_subscriptions(): try: next_run = datetime.datetime.fromtimestamp( time.mktime( time.strptime( ADDON.getSetting('service_time').encode( 'utf-8', 'replace'), "%Y-%m-%d %H:%M:%S"))) now = datetime.datetime.now() if now > next_run: if xbmc.Player().isPlaying() == False: xbmc.executebuiltin( 'RunPlugin(plugin://plugin.video.smoothschedule/?name=service&url=service&mode=50)' ) self.last_run = now ADDON.setSetting( 'service_time', str(datetime.datetime.now() + timedelta(hours=2)).split('.')[0]) except: pass xbmc.sleep(1000)
import glob from hashlib import md5 import hashlib from threading import Thread import requests import urlresolver from helpers import clean_file_name from metahandler import metahandlers metainfo = metahandlers.MetaData() ADDON = settings.addon() TVO_USER = settings.tvo_user() TVO_PASSWORD = settings.tvo_pass() TVO_EMAIL = settings.tvo_email() ENABLE_SUBS = settings.enable_subscriptions() ENABLE_META = settings.enable_meta() TV_PATH = settings.tv_directory() CACHE_PATH = settings.cache_path() FAV = settings.favourites_file() SUB = settings.subscription_file() addon_path = os.path.join(xbmc.translatePath('special://home/addons'), '') fanart = xbmc.translatePath(os.path.join('special://home/addons/plugin.video.tvonline.cc', 'art', 'Fanart2.jpg')) iconart = xbmc.translatePath(os.path.join('special://home/addons/plugin.video.tvonline.cc', 'icon.png')) base_url = 'http://www.tvonline.cc/' def open_url(url, cache_time=3600): trans_table = ''.join( [chr(i) for i in range(128)] + [' '] * 128 ) req = urllib2.Request(url) req.add_header('User-Agent','Mozilla/5.0 (Windows NT 6.1; rv:30.0) Gecko/20100101 Firefox/30.0')
import time,datetime from datetime import date, timedelta import settings import json from t0mm0.common.net import Net net = Net() import cookielib local=xbmcaddon.Addon(id='plugin.video.smoothschedule') SMOOTHSTREAMSADDON = xbmcaddon.Addon(id='plugin.video.mystreamstv.beta') SS_quality=SMOOTHSTREAMSADDON.getSetting('high_def') SS_server_type=SMOOTHSTREAMSADDON.getSetting('server_type') SS_server=SMOOTHSTREAMSADDON.getSetting('server') SS_service=SMOOTHSTREAMSADDON.getSetting('service') SS_Suname=SMOOTHSTREAMSADDON.getSetting('SUserN') SS_Spwd=SMOOTHSTREAMSADDON.getSetting('SPassW') ENABLE_SUBS = settings.enable_subscriptions() fanart = xbmc.translatePath(os.path.join('special://home/addons/plugin.video.smoothschedule', 'fanart.jpg')) art = xbmc.translatePath(os.path.join('special://home/addons/plugin.video.smoothschedule/art', '')) cookie_jar = settings.cookie_jar() USER = settings.username() PW = settings.user_password() SS_library=xbmc.translatePath(os.path.join('special://home/addons/plugin.video.mystreamstv.beta', 'default.py')) xml_path = os.path.join(xbmc.translatePath('special://profile/addon_data/plugin.video.smoothschedule'), 'smooth_epg.xml') xml_url='http://cdn.smoothstreams.tv/schedule/feed.xml' m3u_path = os.path.join(xbmc.translatePath('special://profile/addon_data/plugin.video.smoothschedule'), 'smooth.m3u') logo_archive = xbmc.translatePath(os.path.join('special://home/addons/plugin.video.smoothschedule/art', 'pvrlogos.zip')) logo_path = os.path.join(xbmc.translatePath('special://profile/addon_data/plugin.video.smoothschedule'), '') TIMEZONE = settings.timezone() i = datetime.datetime.now()