def test_checkInstanceMode_linux(self): sys.modules["__main__"].xbmcaddon.Addon().getSetting.return_value = "true" ret = StorageServer.checkInstanceMode() print repr(ret) assert(ret == False)
def test_checkInstanceMode_ios(self): sys.modules["__main__"].xbmcaddon.Addon().getSetting.side_effect = ["false", "1"] StorageServer.run_async = Mock() ret = StorageServer.checkInstanceMode() print repr(ret) assert(ret == True) assert(StorageServer.run_async.call_count == 1)
# -*- coding: utf-8 -*- import sys,re,os import urllib,urllib2 import urlparse import xbmc,xbmcgui,xbmcaddon import xbmcplugin import urlresolver try: import StorageServer except: import storageserverdummy as StorageServer cache = StorageServer.StorageServer("iwatchonline") import resources.lib.iwatchonline as iwatchonline import resources.lib.strings as strings base_url = sys.argv[0] addon_handle = int(sys.argv[1]) args = urlparse.parse_qs(sys.argv[2][1:]) my_addon = xbmcaddon.Addon() my_addon_id = my_addon.getAddonInfo('id') addonName = my_addon.getAddonInfo('name') PATH = my_addon.getAddonInfo('path') DATAPATH = xbmc.translatePath(my_addon.getAddonInfo('profile')).decode('utf-8') RESOURCES = PATH+'/resources/' FANART = None
import os import sys import time try: import StorageServer except: import storageserverdummy as StorageServer cache = StorageServer.StorageServer("toutv.data", 1) if sys.version_info.major >= 3: # Python 3 stuff from urllib.parse import quote_plus, unquote_plus from urllib.request import Request, urlopen else: # Python 2 stuff from urllib import quote_plus, unquote_plus from urllib2 import Request, urlopen try: import json except ImportError: import simplejson as json from traceback import print_exc if sys.version >= "2.5": from hashlib import md5 as _hash else: from md5 import new as _hash
except: import storageserverdummy as StorageServer __addon_name__ = "NBA League Pass" __addon_id__ = "plugin.video.nba" # Global variables settings = xbmcaddon.Addon(id=__addon_id__) show_scores = json.loads(settings.getSetting(id="scores")) debug = json.loads(settings.getSetting(id="debug")) use_cached_thumbnails = json.loads(settings.getSetting(id="cached_thumbnails")) use_local_timezone = json.loads(settings.getSetting(id="local_timezone")) show_cameras = json.loads(settings.getSetting(id="cameras")) useragent = "iTunes-AppleTV/4.1" cache = StorageServer.StorageServer("nbaleaguepass", 1) cache.table_name = "nbaleaguepass" cookies = '' player_id = binascii.b2a_hex(os.urandom(16)) addon_dir = xbmc.translatePath(settings.getAddonInfo('path')).decode('utf-8') # the default fanart image fanart_image = os.path.join(addon_dir, "fanart.jpg") setting_fanart_image = settings.getSetting("fanart_image") if setting_fanart_image != '': fanart_image = setting_fanart_image try: config_path = os.path.join(addon_dir, "config", "config.json") config_json = open(config_path).read()
BASE_URL = "http://www.flyinhd.com" LANGS = [ 'tamil', 'hindi', 'telugu' ] addonId = 'plugin.video.flyinhd' addon = Addon( addonId, sys.argv ) addonPath = xbmc.translatePath( addon.get_profile() ) cookiePath = os.path.join( addonPath, 'cookies' ) cookieFile = os.path.join( cookiePath, "cookies.txt" ) net = Net() if not os.path.exists(cookiePath): os.makedirs(cookiePath) else: net.set_cookies( cookieFile ) cache = StorageServer.StorageServer( addonId ) cache.dbg = True cache.dbglevel = 10 def parseMoviePage( lang ): print "parseMoviePage, lang:" + lang url = BASE_URL + '/?lang=' + lang response = net.http_GET( url ) net.save_cookies( cookieFile ) movieIndex = {} url = BASE_URL + '/movies' response = net.http_GET( url ) net.save_cookies( cookieFile ) html = response.content soup = BeautifulSoup( html )
from traceback import format_exc from urlparse import urlparse, parse_qs from BeautifulSoup import BeautifulSoup from BeautifulSoup import BeautifulStoneSoup addon = xbmcaddon.Addon(id='plugin.video.nfl.gamepass') addon_path = xbmc.translatePath(addon.getAddonInfo('path')) addon_profile = xbmc.translatePath(addon.getAddonInfo('profile')) cookie_file = os.path.join(addon_profile, 'cookie_file') cookie_jar = cookielib.LWPCookieJar(cookie_file) icon = os.path.join(addon_path, 'icon.png') fanart = os.path.join(addon_path, 'fanart.jpg') base_url = '' debug = addon.getSetting('debug') addon_version = addon.getAddonInfo('version') cache = StorageServer.StorageServer("nfl_game_pass", 24) username = addon.getSetting('email') password = addon.getSetting('password') def addon_log(string): if debug == 'true': xbmc.log("[addon.nfl.gamepass-%s]: %s" % (addon_version, string)) def cache_seasons_and_weeks(login_data): soup = BeautifulSoup(login_data, convertEntities=BeautifulSoup.HTML_ENTITIES) try: seasons_soup = soup.find('select', id='seasonSelect').findChildren()
import Common from Common import MediaItem import StorageServer import CommonFunctions import urllib import sys import hosts import xbmcplugin, xbmcgui import re # For parsedom common = CommonFunctions common.dbg = False common.dbglevel = 3 cache = StorageServer.StorageServer(Common.Addonid, 1) #Query = 'nepali%20videos%20AND%20(hd%20OR%20720p%20OR%201080p)' Query = '(nepali%20OR%20nepal%20OR%20nepalese)%20AND%20(hd%20OR%20720p%20OR%201080p)' URL = 'http://gdata.youtube.com/feeds/base/videos?q=%s&start-index=%d&client=ytapi-youtube-search&alt=rss&v=1&orderby=published' site = 'youtuberss' pluginhandle = int(sys.argv[1]) def Main(): print 'youtuberss Main' browse() def browse(): try:
import urllib2 import re import os import xbmcplugin import xbmcgui import xbmcaddon import xbmcvfs from BeautifulSoup import BeautifulSoup try: import json except: import simplejson as json import StorageServer base_url = 'http://on.aol.com' cache = StorageServer.StorageServer("onaol", 1) addon = xbmcaddon.Addon(id='plugin.video.on_aol') home = xbmc.translatePath(addon.getAddonInfo('path')) profile = xbmc.translatePath(addon.getAddonInfo('profile')) debug = addon.getSetting('debug') addon_version = addon.getAddonInfo('version') icon = os.path.join(home, 'icon.png') fanart = os.path.join(home, 'fanart.jpg') fav_png = os.path.join(home, 'resources', 'fav.png') next_png = os.path.join(home, 'resources', 'next.png') search_png = os.path.join(home, 'resources', 'search.png') search_file = os.path.join(profile, 'search_queries') fav_file = os.path.join(profile, 'favorites') __language__ = addon.getLocalizedString if addon.getSetting('save_search') == 'true':
from addon.common.addon import Addon from addon.common.net import Net net = Net() import threading try: import StorageServer except: import storageserverdummy as StorageServer import time # Cache cache = StorageServer.StorageServer("familyfunflix", 0) #=====================NEW DL====================================== settings = xbmcaddon.Addon(id='plugin.video.familyfunflix') addon_id = 'plugin.video.familyfunflix' addon = Addon(addon_id, sys.argv) mode = addon.queries['mode'] url = addon.queries.get('url', '') name = addon.queries.get('name', '') thumb = addon.queries.get('thumb', '') ext = addon.queries.get('ext', '') console = addon.queries.get('console', '') dlfoldername = addon.queries.get('dlfoldername', '') favtype = addon.queries.get('favtype', '') mainimg = addon.queries.get('mainimg', '') print 'Mode is: ' + mode
player = "" cache = "" cookiejar = cookielib.LWPCookieJar() cookie_handler = urllib2.HTTPCookieProcessor(cookiejar) opener = urllib2.build_opener(cookie_handler) if (__name__ == "__main__"): if dbg: print plugin + " ARGV: " + repr(sys.argv) else: print plugin try: import StorageServer cache = StorageServer.StorageServer("YouTube") except: import storageserverdummy as StorageServer cache = StorageServer.StorageServer("YouTube") import CommonFunctions as common common.plugin = plugin import YouTubeUtils utils = YouTubeUtils.YouTubeUtils() import YouTubeStorage storage = YouTubeStorage.YouTubeStorage() import YouTubePluginSettings pluginsettings = YouTubePluginSettings.YouTubePluginSettings() import YouTubeCore core = YouTubeCore.YouTubeCore()
import resources.lib.common as common import watchlist import re import urllib import urlparse import base64 try: import StorageServer except: import storageserverdummy as StorageServer addon = xbmcaddon.Addon() # Doc for Caching Function: http://kodi.wiki/index.php?title=Add-on:Common_plugin_cache assetDetailsCache = StorageServer.StorageServer( addon.getAddonInfo('name') + '.assetdetails', 24 * 30) TMDBCache = StorageServer.StorageServer( addon.getAddonInfo('name') + '.TMDBdata', 24 * 30) extMediaInfos = addon.getSetting('enable_extended_mediainfos') icon_file = xbmc.translatePath(addon.getAddonInfo('path') + '/icon.png').decode('utf-8') skygo = None # Blacklist: diese nav_ids nicht anzeigen # 15 = Snap # Sportsection: 27 = Aktuell, 32 = News, 33 = Mediathek, 34 = Datencenter nav_blacklist = [15, 27, 32, 33, 34] # Force: anzeige dieser nav_ids erzwingen # Sport: Wiederholungen nav_force = [35, 36, 37, 161]
# -*- coding: utf-8 -*- import sys, re, os import urllib, urllib2 import urlparse import xbmc, xbmcgui, xbmcaddon import xbmcplugin import json, htmlentitydefs try: import StorageServer except: import storageserverdummy as StorageServer cache = StorageServer.StorageServer("viderpl") import resources.lib.viderpl as vider base_url = sys.argv[0] addon_handle = int(sys.argv[1]) args = urlparse.parse_qs(sys.argv[2][1:]) my_addon = xbmcaddon.Addon() my_addon_id = my_addon.getAddonInfo('id') addonName = my_addon.getAddonInfo('name') PATH = my_addon.getAddonInfo('path') DATAPATH = xbmc.translatePath(my_addon.getAddonInfo('profile')).decode('utf-8') RESOURCES = PATH + '/resources/' FANART = None FAVORITE = os.path.join(DATAPATH, 'favorites.json')
from resources.lib.player import cPlayer from resources.lib.gui.gui import cGui from resources.lib.gui.guiElement import cGuiElement from resources.lib.db import cDb from resources.lib.util import cUtil import urllib2, urllib import xbmcplugin, xbmc import xbmcgui import xbmcvfs import re, sys import threading try: import StorageServer Memorise = StorageServer.StorageServer("VstreamDownloader") except: print 'Le download ne marchera pas correctement' SITE_IDENTIFIER = 'cDownload' #http://kodi.wiki/view/Add-on:Common_plugin_cache #https://pymotw.com/2/threading/ #https://code.google.com/p/navi-x/source/browse/trunk/Navi-X/src/CDownLoader.py?r=155 #status = 0 => pas telechargé #status = 1 => en cours de DL (ou bloque si bug) #status = 2 => fini de DL #GetProperty('arret') = '0' => Telechargement en cours #GetProperty('arret') = '1' => Arret demandé
import storageserverdummy as StorageServer __addon__ = xbmcaddon.Addon() __addonname__ = __addon__.getAddonInfo('name') __icon__ = __addon__.getAddonInfo('icon') addon_id = 'plugin.video.shahidmbcnet' selfAddon = xbmcaddon.Addon(id=addon_id) addonPath = xbmcaddon.Addon().getAddonInfo("path") addonArt = os.path.join(addonPath,'resources/images') #communityStreamPath = os.path.join(addonPath,'resources/community') communityStreamPath = os.path.join(addonPath,'resources') communityStreamPath =os.path.join(communityStreamPath,'community') COOKIEFILE = communityStreamPath+'/teletdunetPlayerLoginCookie.lwp' cache_table = 'ShahidArabic' cache2Hr = StorageServer.StorageServer(cache_table,1) teledunet_htmlfile='TeledunetchannelList.html' profile_path = xbmc.translatePath(selfAddon.getAddonInfo('profile')) def PlayStream(sourceEtree, urlSoup, name, url): try: channelId = urlSoup.url.text pDialog = xbmcgui.DialogProgress() pDialog.create('XBMC', 'Communicating with Teledunet') pDialog.update(10, 'fetching channel page') loginName=selfAddon.getSetting( "teledunetTvLogin" ) howMaytimes=2 totalTried=0 doDummy=False while totalTried<howMaytimes:
from pysqlite2 import dbapi2 as lite print 'Using Sqlite2' try: from resources.modules import extract except: print 'Failed to import extract' pass try: from resources.modules import py7zlib except: print 'Failed to import py7zlib' pass cache = StorageServer.StorageServer("RomGrabber", 0) addon_id = 'plugin.program.romgrabber' addon = Addon(addon_id, sys.argv) mode = addon.queries['mode'] url = addon.queries.get('url', '') name = addon.queries.get('name', '') thumb = addon.queries.get('thumb', '') ext = addon.queries.get('ext', '') console = addon.queries.get('console', '') settings = xbmcaddon.Addon(id=addon_id) artwork = xbmc.translatePath( os.path.join('http://addonrepo.com/xbmchub/o9r1sh1/romgrabber/artwork', ''))
import storageserverdummy as StorageServer import xbmc import xbmcvfs import xbmcaddon __addon__ = xbmcaddon.Addon() __version__ = __addon__.getAddonInfo('version') # Module version __scriptname__ = __addon__.getAddonInfo('name') __language__ = __addon__.getLocalizedString __profile__ = unicode(xbmc.translatePath(__addon__.getAddonInfo('profile')), 'utf-8') __temp__ = unicode(xbmc.translatePath(os.path.join(__profile__, 'temp', '')), 'utf-8') store = StorageServer.StorageServer(__scriptname__, int(24 * 364 / 2)) # 6 months regexHelper = re.compile('\W+', re.UNICODE) # =============================================================================== # Private utility functions # =============================================================================== def normalizeString(str): return unicodedata.normalize('NFKD', unicode(unicode(str, 'utf-8'))).encode( 'utf-8', 'ignore') def clean_title(item): title = os.path.splitext(os.path.basename(item["title"])) tvshow = os.path.splitext(os.path.basename(item["tvshow"]))
def __init__(self): self.cm = sdCommon.common() self.TVdb = sdTVdb.sdTVdb() self.cache24 = StorageServer.StorageServer('SDXBMC24', 24) self.cache6 = StorageServer.StorageServer('SDXBMC6', 6)
url = [] for key in params.keys(): value = str(xbmcutil.decode_html(params[key])) value = value.encode('utf-8') url.append(key + '=' + value.encode('hex',) + '&') return plugin + '?' + ''.join(url) def merge_dicts(*dict_args): result = {} for dictionary in dict_args: result.update(dictionary) return result try: import StorageServer cache = StorageServer.StorageServer(__scriptname__) except: import storageserverdummy as StorageServer cache = StorageServer.StorageServer(__scriptname__) (v1, v2, v3) = str(xbmcplugin.__version__).split('.') if int(v1) == 2 and int(v2) <= 20: xbmcplugin.SORT_METHOD_VIDEO_USER_RATING = 20 # lebo medved na 4 je maco sortmethod = { 14: xbmcplugin.SORT_METHOD_ALBUM, 15: xbmcplugin.SORT_METHOD_ALBUM_IGNORE_THE, 11: xbmcplugin.SORT_METHOD_ARTIST, 13: xbmcplugin.SORT_METHOD_ARTIST_IGNORE_THE, 42: xbmcplugin.SORT_METHOD_BITRATE,
from addon.common.addon import Addon net = Net() addon_id = 'plugin.video.morepower' addon = Addon(addon_id, sys.argv) Addon = xbmcaddon.Addon(addon_id) sys.path.append(os.path.join(addon.get_path(), 'resources', 'lib')) data_path = addon.get_profile() try: import StorageServer except: import storageserverdummy as StorageServer cache = StorageServer.StorageServer(addon_id) def MESSAGE(url): html = net.http_GET(url).content l = [] r = re.findall('info>(.*?)</info', html, re.I | re.DOTALL)[0] r = r.replace('<message>', '').replace('</message>', '') r = r.replace('<message1>', '').replace('</message1>', '') r = r.replace('<message2>', '').replace('</message2>', '') r = r.replace('<message3>', '').replace('</message3>', '') r = r.replace('<message4>', '').replace('</message4>', '') r = r.replace('<message5>', '').replace('</message5>', '') r = r.replace('<message6>', '').replace('</message6>', '') r = r.replace('<message7>', '').replace('</message7>', '') r = r.replace('<message8>', '').replace('</message8>', '')
longCache = None lCacheFunction = None # execution cache execCache = {} # Cache cacheActive = True if control.setting('cacheActive') == 'true' else False logger.logInfo('cacheActive : %s' % (cacheActive)) if cacheActive: logger.logInfo('Storage cache enabled') try: import StorageServer except: from ressources.lib.dummy import storageserverdummy as StorageServer # Short TTL cache shortCache = StorageServer.StorageServer(config.shortCache['name'], config.shortCache['ttl']) sCacheFunction = shortCache.cacheFunction # Long TTL cache longCache = StorageServer.StorageServer(config.longCache['name'], config.longCache['ttl']) lCacheFunction = longCache.cacheFunction else: logger.logInfo('Execution cache enabled') from resources.lib.libraries import executioncache # Execution cache shortCache = executioncache.ExecutionCache(execCache) sCacheFunction = shortCache.cacheFunction longCache = shortCache lCacheFunction = longCache.cacheFunction
dialog.ok('Error', 'Unable to complete request') def getMp3link(url): content = getUrl(url) content = content[content. find('<audio id="audio-player" autoplay="autoplay">'):] content = content[content.find('<source src="') + 13:] content = content[content.find(''):] content = content[:content.find('">')] mp3path = content return mp3path def getrecordingpath(url): reader = url[url.find("-") + 1:] style = url[:url.find("-")] path = reader + "/" + style + "/" return (path) if __name__ == '__main__': try: import StorageServer except: import storageserverdummy as StorageServer cache = StorageServer.StorageServer('AudioBible', 24) try: plugin.run() except IOError: plugin.notify('Network Error')
import urllib,urllib2,re,xbmcplugin,xbmcgui,urlresolver,xbmcaddon,os from metahandler import metahandlers from t0mm0.common.addon import Addon from t0mm0.common.net import Net try: import StorageServer except: import storageserverdummy as StorageServer addon_id = 'plugin.video.filmikz' addon = Addon(addon_id, sys.argv) cache = StorageServer.StorageServer("Filmikz", 0) base_url = 'http://filmikz.ch' artwork = xbmc.translatePath(os.path.join('special://home/addons/plugin.video.filmikz/art/', '')) settings = xbmcaddon.Addon(id=addon_id) adult_content = settings.getSetting('adult_content') grab=metahandlers.MetaData() net = Net() mode = addon.queries['mode'] url = addon.queries.get('url', '') name = addon.queries.get('name', '') thumb = addon.queries.get('thumb', '') year = addon.queries.get('year', '') season = addon.queries.get('season', '') episodes = addon.queries.get('episodes', '') types = addon.queries.get('types', '')
try: import StorageServer except: import storageserverdummy as StorageServer ### import libraries from lib.script_exceptions import * from urllib2 import HTTPError, URLError ### get addon info __addon__ = lib.common.__addon__ __localize__ = lib.common.__localize__ __addonname__ = lib.common.__addonname__ __icon__ = lib.common.__icon__ cache = StorageServer.StorageServer("ArtworkDownloader", 240) ### Adjust default timeout to stop script hanging socket.setdefaulttimeout(20) ### Cache bool CACHE_ON = True # Fixes unicode problems def string_unicode(text, encoding='utf-8'): try: text = unicode(text, encoding) except: pass return text
addon_handle = int(sys.argv[1]) ADDON = xbmcaddon.Addon() ADDON_ID = ADDON.getAddonInfo('id') MEDIA_URL = xbmc.translatePath( 'special://home/addons/{0}/resources/media/'.format(ADDON_ID)) SESSION = ADDON.getSetting("session") FORMAT_LIVE = 'm3u8' FORMAT_TIMESHIFT = 'm3u8' # cache try: import StorageServer except: import storageserverdummy as StorageServer CACHE = StorageServer.StorageServer("sledovanitv", 1) channelNames = None class LoginWindow(xbmcgui.WindowDialog): def __init__(self, message): offsetX = 300 offsetY = 200 self.background = xbmcgui.ControlImage(x=offsetX, y=offsetY, width=700, height=300, filename=MEDIA_URL + "background.jpg")
except: from t0mm0.common.net import Net net = Net() try: import StorageServer except: import storageserverdummy as StorageServer # Cache cache = StorageServer.StorageServer("Two Movies", 0) mode = addon.queries['mode'] url = addon.queries.get('url', '') name = addon.queries.get('name', '') thumb = addon.queries.get('thumb', '') ext = addon.queries.get('ext', '') console = addon.queries.get('console', '') dlfoldername = addon.queries.get('dlfoldername', '') favtype = addon.queries.get('favtype', '') mainimg = addon.queries.get('mainimg', '') print 'Mode is: ' + mode print 'Url is: ' + url print 'Name is: ' + name print 'Thumb is: ' + thumb
import urllib import xbmcaddon import xbmcgui import telstra_auth from aussieaddonscommon.exceptions import AussieAddonsException from aussieaddonscommon import session from aussieaddonscommon import utils try: import StorageServer except ImportError: import storageserverdummy as StorageServer cache = StorageServer.StorageServer(utils.get_addon_id(), 1) addon = xbmcaddon.Addon() subscription_type = int(addon.getSetting('SUBSCRIPTION_TYPE')) sess = session.Session() def clear_token(): """Remove stored token from cache storage""" try: cache.delete('AFLTOKEN') utils.dialog_message('Login token removed') except AttributeError: pass def fetch_session_id(url, data):
CACHE_ENABLED = REAL_SETTINGS.getSetting('Cache_Enabled') == 'true' # Settings2 filepaths SETTINGS_FLE = xbmc.translatePath(os.path.join(SETTINGS_LOC, 'settings2.xml')) SETTINGS_FLE_DEFAULT_SIZE = 100 #bytes SETTINGS_FLE_REPAIR = xbmc.translatePath( os.path.join(SETTINGS_LOC, 'settings2.repair.xml')) SETTINGS_FLE_PENDING = xbmc.translatePath( os.path.join(SETTINGS_LOC, 'settings2.pending.xml')) SETTINGS_FLE_LASTRUN = xbmc.translatePath( os.path.join(SETTINGS_LOC, 'settings2.lastrun.xml')) SETTINGS_FLE_PRETUNE = xbmc.translatePath( os.path.join(SETTINGS_LOC, 'settings2.pretune.xml')) # commoncache globals guide = StorageServer.StorageServer("plugin://script.pseudotv.live/" + "guide", 2) daily = StorageServer.StorageServer("plugin://script.pseudotv.live/" + "daily", 24) weekly = StorageServer.StorageServer( "plugin://script.pseudotv.live/" + "weekly", 24 * 7) monthly = StorageServer.StorageServer( "plugin://script.pseudotv.live/" + "monthly", ((24 * 7) * 4)) # pyfscache globals cache_daily = FSCache(REQUESTS_LOC, days=1, hours=0, minutes=0) cache_weekly = FSCache(REQUESTS_LOC, days=7, hours=0, minutes=0) cache_monthly = FSCache(REQUESTS_LOC, days=28, hours=0, minutes=0) IMAGE_TYPES = [ '.jpg', '.jpeg', '.png', '.tif', '.tiff', '.gif', '.pcx', '.bmp', '.tga', '.ico', '.nef'
### Imports ### import re, os, sys, xbmc, urllib, xbmcplugin, xbmcgui, xbmcaddon from addon.common.addon import Addon # może trzeba więcej import weblogingoogle import StorageServer from config import ps from addon.common.net import Net # może trzeba więcej __settings__ = xbmcaddon.Addon(id="plugin.video.anime-iptv") addonPath = __settings__.getAddonInfo('path') iconFav = xbmcaddon.Addon( id="plugin.video.anime-iptv").getAddonInfo('path') + '/art/favorites.png' net = Net() _addon = Addon(ps('_addon_id'), sys.argv) cache = StorageServer.StorageServer(ps('_addon_id')) #cache = os.path.join(ps('_addon_id')) _artIcon = _addon.get_icon() _artFanart = _addon.get_fanart() def addst(r, s=''): return _addon.get_setting(r) loginGoogle = addst('username3', '') passwordGoogle = addst('password3', '') def iFL(t): return '[I]' + t + '[/I]' # For Italic Text ###
print 'Failed to import script.module.metahandler' xbmcgui.Dialog().ok( "PFTV Import Failure", "Failed to import Metahandlers", "A component needed by PFTV is missing on your system", "Please visit www.xbmchub.com for support") #Common Cache import xbmcvfs dbg = False # Set to false if you don't want debugging #Common Cache try: import StorageServer except: import storageserverdummy as StorageServer cache = StorageServer.StorageServer('plugin.video.projectfreetv') ##### Queries ########## play = addon.queries.get('play', '') mode = addon.queries['mode'] video_type = addon.queries.get('video_type', '') section = addon.queries.get('section', '') url = addon.queries.get('url', '') title = addon.queries.get('title', '') name = addon.queries.get('name', '') imdb_id = addon.queries.get('imdb_id', '') season = addon.queries.get('season', '') episode = addon.queries.get('episode', '') print '-----------------Project Free TV Addon Params------------------' print '--- Version: ' + str(addon.get_version())
except: from t0mm0.common.net import Net net = Net() import threading try: import StorageServer except: import storageserverdummy as StorageServer import time # Cache cache = StorageServer.StorageServer("pollystreaming", 0) #=========Download Thread Module by: Blazetamer and o9r1sh1========================= settings = xbmcaddon.Addon(id='plugin.video.pollystreaming') mode = addon.queries['mode'] url = addon.queries.get('url', '') name = addon.queries.get('name', '') thumb = addon.queries.get('thumb', '') ext = addon.queries.get('ext', '') console = addon.queries.get('console', '') dlfoldername = addon.queries.get('dlfoldername', '') favtype = addon.queries.get('favtype', '') mainimg = addon.queries.get('mainimg', '') print 'Mode is: ' + mode print 'Url is: ' + url print 'Name is: ' + name
from bs4 import BeautifulSoup, SoupStrainer try: import StorageServer except: import storageserverdummy as StorageServer addon = xbmcaddon.Addon() pluginHandle = int(sys.argv[1]) TVDBAPIKEY = '03B8C17597ECBD64' TVDBURL = 'http://thetvdb.com' TVDBBANNERS = 'http://thetvdb.com/banners/' TVDBSERIESLOOKUP = 'http://www.thetvdb.com/api/GetSeries.php?seriesname=' cache = StorageServer.StorageServer("ustvvod", 0) class XBMCPlayer(xbmc.Player): _counter = 0 _segments = 1 _segments_array = [] _subtitles_Enabled = False _subtitles_Type = "SRT" _subtitles_direct = None _localHTTPServer = True def __init__(self, *args, **kwargs): xbmc.Player.__init__(self) self.is_active = True