Esempio n. 1
0
    import StorageServer
except:
    import storageserverdummy as StorageServer

action = None
common = CommonFunctions
language = xbmcaddon.Addon().getLocalizedString
setSetting = xbmcaddon.Addon().setSetting
getSetting = xbmcaddon.Addon().getSetting
addonName = xbmcaddon.Addon().getAddonInfo("name")
addonVersion = xbmcaddon.Addon().getAddonInfo("version")
addonId = xbmcaddon.Addon().getAddonInfo("id")
addonPath = xbmcaddon.Addon().getAddonInfo("path")
addonFullId = addonName + addonVersion
addonDesc = language(30450).encode("utf-8")
cache = StorageServer.StorageServer(addonFullId, 1).cacheFunction
cache2 = StorageServer.StorageServer(addonFullId, 24).cacheFunction
cache3 = StorageServer.StorageServer(addonFullId, 720).cacheFunction
addonIcon = os.path.join(addonPath, 'icon.png')
addonFanart = os.path.join(addonPath, 'fanart.jpg')
addonArt = os.path.join(addonPath, 'resources/art')
addonImage = os.path.join(addonPath, 'resources/art/Image.jpg')
addonImage2 = os.path.join(addonPath, 'resources/art/Image2.jpg')
addonGames = os.path.join(addonPath, 'resources/art/Games.png')
addonHighlights = os.path.join(addonPath, 'resources/art/Highlights.png')
addonTeams = os.path.join(addonPath, 'resources/art/Teams.png')
addonNext = os.path.join(addonPath, 'resources/art/Next.png')
dataPath = xbmc.translatePath('special://profile/addon_data/%s' % (addonId))
viewData = os.path.join(dataPath, 'views.cfg')

Esempio n. 2
0
    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"]))
Esempio n. 3
0
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:
Esempio n. 4
0
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
Esempio n. 5
0
    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())
Esempio n. 6
0
	def __init__(self):
		self.cm = sdCommon.common()
		self.TVdb = sdTVdb.sdTVdb()
		self.cache24 = StorageServer.StorageServer('SDXBMC24', 24)
		self.cache6 = StorageServer.StorageServer('SDXBMC6', 6)
Esempio n. 7
0
        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')
Esempio n. 8
0
language			= xbmcaddon.Addon().getLocalizedString
setSetting			= xbmcaddon.Addon().setSetting
getSetting			= xbmcaddon.Addon().getSetting
addonName			= xbmcaddon.Addon().getAddonInfo("name")
addonVersion		= xbmcaddon.Addon().getAddonInfo("version")
addonId				= xbmcaddon.Addon().getAddonInfo("id")
addonPath			= xbmcaddon.Addon().getAddonInfo("path")
addonDesc			= language(30450).encode("utf-8")
addonIcon			= os.path.join(addonPath,'icon.png')
addonFanart			= os.path.join(addonPath,'fanart.jpg')
addonArt			= os.path.join(addonPath,'resources/art')
dataPath			= xbmc.translatePath('special://profile/addon_data/%s' % (addonId))
viewData			= os.path.join(dataPath,'views.cfg')
favData				= os.path.join(dataPath,'favourites2.cfg')
cache				= StorageServer.StorageServer(addonName+addonVersion,24).cacheFunction
cache2				= StorageServer.StorageServer(addonName+addonVersion,240).cacheFunction
common				= CommonFunctions


class main:
    def __init__(self):
        index().container_data()
        params = {}
        splitparams = sys.argv[2][sys.argv[2].find('?') + 1:].split('&')
        for param in splitparams:
            if (len(param) > 0):
                splitparam = param.split('=')
                key = splitparam[0]
                try:	value = splitparam[1].encode("utf-8")
                except:	value = splitparam[1]
Esempio n. 9
0
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
Esempio n. 10
0
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

Esempio n. 11
0
from collections import namedtuple

import StorageServer

import urllib, urllib2, re, xbmc, xbmcplugin, xbmcgui, xbmcaddon, os, sys, time, cookielib, xbmcaddon

__settings__ = xbmcaddon.Addon(id='plugin.video.wallaNew.video')
__language__ = __settings__.getLocalizedString
__cachePeriod__ = __settings__.getSetting("cache")
__PLUGIN_PATH__ = __settings__.getAddonInfo('path')
__DEBUG__ = __settings__.getSetting("DEBUG") == "true"
__addon__ = xbmcaddon.Addon()
__addonname__ = __addon__.getAddonInfo('name')
__icon__ = __addon__.getAddonInfo('icon')
sys.modules["__main__"].dbg = True
cacheServer = StorageServer.StorageServer("plugin.video.wallaNew.video", __cachePeriod__)  # (Your plugin name, Cache time in hours)


def enum(**enums):
        return type('Enum', (), enums)

def getMatches(url, pattern):
        contentType, page = getData(url)
        matches = re.compile(pattern).findall(page)
        return contentType, matches   

def getParams(arg):
        param = []
        paramstring = arg
        if len(paramstring) >= 2:
            params = arg
Esempio n. 12
0
global debuging
pluginhandle = int(sys.argv[1])
addon = xbmcaddon.Addon()
socket.setdefaulttimeout(40)
addonPath = xbmc.translatePath(
    addon.getAddonInfo('path')).encode('utf-8').decode('utf-8')
dataPath = xbmc.translatePath(
    addon.getAddonInfo('profile')).encode('utf-8').decode('utf-8')
defaultFanart = os.path.join(addonPath, 'fanart.jpg')
icon = os.path.join(addonPath, 'icon.png')
enableInputstream = addon.getSetting("inputstream") == "true"
if PY2:
    cachePERIOD = int(addon.getSetting("cacheTime"))
    cache = StorageServer.StorageServer(
        addon.getAddonInfo('id'),
        cachePERIOD)  # (Your plugin name, Cache time in hours)
baseURL = "https://www.sporttotal.tv"

xbmcplugin.setContent(int(sys.argv[1]), 'tvshows')


def py2_enc(s, encoding='utf-8'):
    if PY2 and isinstance(s, unicode):
        s = s.encode(encoding)
    return s


def py2_uni(s, encoding='utf-8'):
    if PY2 and isinstance(s, str):
        s = unicode(s, encoding)
Esempio n. 13
0
import xbmcgui
import xbmcaddon
import xbmcvfs
import urlfetch
import Cookie
#import subtitles
from BeautifulSoup import BeautifulSoup

__settings__ = xbmcaddon.Addon(id='plugin.video.4share')
__language__ = __settings__.getLocalizedString
home = __settings__.getAddonInfo('path')
icon = xbmc.translatePath(os.path.join(home, 'icon.png'))

try:
    import StorageServer
    cache = StorageServer.StorageServer("upshare2")
except:
    import storageserverdummy as StorageServer
    cache = StorageServer.StorageServer("upshare2")

HTTP_DESKTOP_UA = {
    'Host': 'up.4share.vn',
    'Accept-Encoding': 'gzip, deflate',
    'Referer': 'http://up.4share.vn',
    'Connection': 'keep-alive',
    'Accept':
    'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
    'User-Agent':
    'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0',
    'Content-Type': 'application/x-www-form-urlencoded'
}
Esempio n. 14
0
from kodi_six import xbmc, xbmcplugin, xbmcgui, xbmcvfs
from resources.lib import random_ua, cloudflare, strings
from resources.lib.basics import addDir, searchDir, cum_image
from functools import wraps
from resources.lib.url_dispatcher import URL_Dispatcher
try:
    import StorageServer
except ImportError:
    import storageserverdummy as StorageServer
import xml.etree.ElementTree as ET
from xml.dom import minidom

from resolveurl.plugins.lib import captcha_lib

cache = StorageServer.StorageServer("cumination", int(addon.getSetting('cache_time')))
url_dispatcher = URL_Dispatcher('utils')

USER_AGENT = random_ua.get_ua()
PY2 = six.PY2
PY3 = six.PY3
TRANSLATEPATH = xbmcvfs.translatePath if PY3 else xbmc.translatePath
LOGINFO = xbmc.LOGINFO if PY3 else xbmc.LOGNOTICE

base_hdrs = {'User-Agent': USER_AGENT,
             'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
             'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
             'Accept-Encoding': 'gzip',
             'Accept-Language': 'en-US,en;q=0.8',
             'Connection': 'keep-alive'}
openloadhdr = base_hdrs
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
Esempio n. 16
0
    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',
                 ''))
Esempio n. 17
0
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':
Esempio n. 18
0
	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:
Esempio n. 19
0
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>', '')
Esempio n. 20
0
import config
import datetime
import json

from aussieaddonscommon import session
from aussieaddonscommon import utils

from bs4 import BeautifulSoup

try:
    import StorageServer
except ImportError:
    utils.log("script.common.plugin.cache not found!")
    import storageserverdummy as StorageServer

cache = StorageServer.StorageServer(utils.get_addon_id(), 1)


def fetch_url(url, headers=None):
    """Simple function that fetches a URL using requests."""
    with session.Session() as sess:
        if headers:
            sess.headers.update(headers)
        request = sess.get(url)
        try:
            request.raise_for_status()
        except Exception as e:
            # Just re-raise for now
            raise e
        data = request.text
    return data
Esempio n. 21
0
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
Esempio n. 22
0
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é
Esempio n. 23
0
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'
Esempio n. 24
0
# -*- 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')
Esempio n. 25
0
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
Esempio n. 26
0
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]
Esempio n. 27
0
from urlparse import urlparse, parse_qs
from BeautifulSoup import BeautifulSoup
from BeautifulSoup import BeautifulStoneSoup
from operator import itemgetter
from XmlDict import XmlDictConfig

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')
debug = addon.getSetting('debug')
addon_version = addon.getAddonInfo('version')
cache = StorageServer.StorageServer("nfl_game_pass", 2)
username = addon.getSetting('email')
password = addon.getSetting('password')

show_archives = {
    'NFL Gameday': {'2013': '179', '2012': '146'},
    'Playbook': {'2013': '180', '2012': '147'},
    'NFL Total Access': {'2013': '181', '2012': '148'},
    'Sound FX': {'2013': '183', '2012': '150'},
    'Coaches Show': {'2013': '184', '2012': '151'},
    'Top 100 Players': {'2013': '185', '2012': '153'},
    'A Football Life': {'2013': '186', '2012': '154'},
    'Superbowl Archives': {'2013': '117'}
     # {'NFL Films Presents': {'2013': '187', '2012': ''}}, isn't showing any episodes
    }
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()
Esempio n. 29
0
    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,
Esempio n. 30
0
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
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 _base_ import Scraper
from BeautifulSoup import BeautifulSoup, SoupStrainer
import urllib, re, requests
import HTMLParser
from resources.lib import cfscrape
try:
    import StorageServer
except:
    import storageserverdummy as StorageServer
cache = StorageServer.StorageServer('deccandelight', 1)


class tyogi(Scraper):
    def __init__(self):
        Scraper.__init__(self)
        self.bu = 'http://tamilyogi.cc/home/'
        self.icon = self.ipath + 'tyogi.png'

    def get_cfpass(self):
        durl = self.bu[:-5] + 'wp-content/themes/tamilyogi/images/back_menu.png'
        cj = cfscrape.get_tokens(durl, user_agent=self.hdr['User-Agent'])[0]
        ckstr = '; '.join([str(x) + "=" + str(y) for x, y in cj.items()])
        return (cj, ckstr)

    def get_menu(self):