示例#1
0
    def resolve_dependencies(self):
        from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK
        log.info("%s trying to resolve dependencies for %s", self,
                 self.video_addon)
        for dependency in self.video_addon.requires:
            addon_id, version, optional = dependency['addon'], dependency[
                'version'], dependency['optional']

            # checking if archivCZSK version is compatible with this plugin
            if addon_id == 'enigma2.archivczsk':
                if not util.check_version(aczsk.version, version):
                    log.debug("%s archivCZSK version %s>=%s", self,
                              aczsk.version, version)
                else:
                    log.debug("%s archivCZSK version %s<=%s", self,
                              aczsk.version, version)
                    raise AddonError(
                        _("You need to update archivCZSK at least to") + " " +
                        version + " " + _("version"))

            log.info("%s requires %s addon, version %s", self, addon_id,
                     version)
            if ArchivCZSK.has_addon(addon_id):
                tools_addon = ArchivCZSK.get_addon(addon_id)
                log.debug("%s required %s founded", self, tools_addon)
                if not util.check_version(tools_addon.version, version):
                    log.debug("%s version %s>=%s", self, tools_addon.version,
                              version)
                    self._dependencies.append(tools_addon)
                else:
                    log.debug("%s version %s<=%s", self, tools_addon.version,
                              version)
                    if not optional:
                        log.error("%s cannot execute", self)
                        raise AddonError(
                            "Cannot execute addon %s, dependency %s version %s needs to be at least version %s"
                            % (self.video_addon, tools_addon.id,
                               tools_addon.version, version))
                    else:
                        log.debug("%s skipping")
                        continue
            else:
                log.error("%s required %s addon not founded", self, addon_id)
                if not optional:
                    log.error("%s cannot execute %s addon", self,
                              self.video_addon)
                    raise Exception(
                        "Cannot execute %s, missing dependency %s" %
                        (self.video_addon, addon_id))
                else:
                    log.debug("skipping")
示例#2
0
        def remove_addon_callback(remove):
            if (remove):
                log.info("removing addon: %s" % addon.id)
                try:
                    shutil.rmtree(addon.path)
                except Exception as e:
                    log.error("cannot remove addon: %s" % str(e))
                    message = ("Unable to remove addon")
                    self.session.open(MessageBox,
                                      message,
                                      type=MessageBox.TYPE_WARNING)

                log.info("addon was removed: %s" % addon.id)

                from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK
                ArchivCZSK.remove_addon(addon)
                self.content_screen.workingStarted()
                self.content_screen.refreshList()
                self.content_screen.workingFinished()
示例#3
0
    def resolve_dependencies(self):
        from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK
        log.info("trying to resolve dependencies for %s" , self.video_addon)
        for dependency in self.video_addon.requires:
            addon_id, version, optional = dependency['addon'], dependency['version'], dependency['optional']

            # checking if archivCZSK version is compatible with this plugin
            if addon_id == 'enigma2.archivczsk':
                if  not util.check_version(aczsk.version, version):
                    log.debug("archivCZSK version %s>=%s" , aczsk.version, version)
                else:
                    log.debug("archivCZSK version %s<=%s" , aczsk.version, version)
                    raise AddonError(_("You need to update archivCZSK at least to") + " " + version + " " + _("version"))

            log.info("%s requires %s addon, version %s" , self.video_addon, addon_id, version)
            if ArchivCZSK.has_addon(addon_id):
                tools_addon = ArchivCZSK.get_addon(addon_id)
                log.info("required %s founded" , tools_addon)
                if  not util.check_version(tools_addon.version, version):
                    log.debug("version %s>=%s" , tools_addon.version, version)
                    self._dependencies.append(tools_addon)
                else:
                    log.debug("version %s<=%s" , tools_addon.version, version)
                    if not optional:
                        log.error("cannot execute %s " , self.video_addon)
                        raise AddonError("Cannot execute addon %s, dependency %s version %s needs to be at least version %s"
                                        % (self.video_addon, tools_addon.id, tools_addon.version, version))
                    else:
                        log.debug("skipping")
                        continue
            else:
                log.info("required %s addon not founded" , addon_id)
                if not optional:
                    log.info("cannot execute %s addon" , self.video_addon)
                    raise Exception("Cannot execute %s, missing dependency %s" % (self.video_addon, addon_id))
                else:
                    log.debug("skipping")
示例#4
0
    def saveVipDaysToSettings(self):
        vipDaysLeft = "-99"
        try:
            if self.token and self.loginOk:
                udata = userData()
                vipDaysLeft = udata.vipDaysLeft
            else:
                vipDaysLeft = "-2"            
        except:
            pass

        # save to settings
        try:
            from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK
            addon = ArchivCZSK.get_xbmc_addon('plugin.video.stream-cinema')
            addon.setSetting('wsvipdays', vipDaysLeft)
        except:
            pass
示例#5
0
    def saveVipDaysToSettings(self):
        vipDaysLeft = "-99"
        try:
            if self.token and self.loginOk:
                udata = userData()
                vipDaysLeft = udata.vipDaysLeft
            else:
                vipDaysLeft = "-2"
        except:
            pass

        # save to settings
        try:
            from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK
            addon = ArchivCZSK.get_xbmc_addon('plugin.video.stream-cinema')
            addon.setSetting('wsvipdays', vipDaysLeft)
        except:
            pass
import urllib2,urllib,re,os,string,time,base64,datetime
from urlparse import urlparse
import aes
try:
    import hashlib
except ImportError:
    import md5

from parseutils import *
from util import addDir, addLink, addSearch, getSearch
from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK

__baseurl__ = 'http://novaplus.nova.cz'
__dmdbase__ = 'http://iamm.uvadi.cz/xbmc/voyo/'
_UserAgent_ = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'
addon =  ArchivCZSK.get_xbmc_addon('plugin.video.dmd-czech.novaplus')
profile = addon.getAddonInfo('profile')
__settings__ = addon
home = __settings__.getAddonInfo('path')
icon =  os.path.join( home, 'icon.png' )
nexticon = os.path.join( home, 'nextpage.png' )
fanart = os.path.join( home, 'fanart.jpg' )
nova_service_url = 'http://cdn-lb.cdn.cra.cz/'
nova_app_id = 'nova-vod'

def OBSAH():
    addDir('Nejnovější','http://novaplus.nova.cz',6,icon,1)
    addDir('Seriály a pořady','http://novaplus.nova.cz/porady/',5,icon,1)
    addDir('Televizní noviny','http://novaplus.nova.cz/porad/televizni-noviny',1,icon,1)

def NEW(url,page):
# -*- coding: utf-8 -*-
import urllib2,urllib,re,os,string,time,base64,md5,datetime
from parseutils import *
from util import addDir, addLink
from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK
__baseurl__ = 'http://www.metropol.cz/'
__dmdbase__ = 'http://iamm.uvadi.cz/xbmc/metropol/'
_UserAgent_ = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'
__settings__ = ArchivCZSK.get_addon('plugin.video.dmd-czech.metropol')
home = __settings__.get_info('path')
icon = os.path.join(home, 'icon.png')
nexticon = os.path.join(home, 'nextpage.png') 
page_pole_url = []
page_pole_no = []

def OBSAH():
    addDir('Pořady',__baseurl__+'porady/',1,icon)
    addDir('Videa',__baseurl__+'videa/',2,icon)

def PORADY(url):
    doc = read_page(url)
    items = doc.find('div', 'show-list')
    for item in items.findAll('div', 'show'):
            name = item.a
            name = name.getText(" ").encode('utf-8')
            url = item.findAll('li', 'archive')
            pocet = url[0].a
            pocet = pocet.getText(" ").encode('utf-8')
            pocet =  re.compile('([0-9]+)').findall(pocet)
            url = str(url[0].a['href'])
            thumb = str(item.img['src'])
        i1 = data.find(start,i2+1)
        while i1 >= 0:
                i2 = data.find(end,i1+1)
                result +=data[i1:i2]
                i1 = data.find(start, i2 + 1)

        return result



__baseurl__ = 'http://www.ceskatelevize.cz/ivysilani'
#__dmdbase__ = 'http://iamm.netuje.cz/xbmc/stream/'
_UserAgent_ = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'
#swfurl = 'http://img8.ceskatelevize.cz/libraries/player/flashPlayer.swf?version=1.43'
swfurl = 'http://img.ceskatelevize.cz/libraries/player/flashPlayer.swf?version=1.45.5'
__settings__ = ArchivCZSK.get_addon('plugin.video.dmd-czech.ivysilani')
home = __settings__.get_info('path')
icon = os.path.join(home, 'icon.png')
search = os.path.join( home, 'search.png' )
nexticon = os.path.join(home, 'nextpage.png')
page_pole_url = []
page_pole_no = []
bonus_video = __settings__.get_setting('bonus-video')

DATE_FORMAT = '%d.%m.%Y'
DAY_NAME = (u'Po', u'Út', u'St', u'Čt', u'Pá', u'So', u'Ne')

RE_DATE   = re.compile('(\d{1,2}\.\s*\d{1,2}\.\s*\d{4})')


def OBSAH():
示例#9
0
def main(session, **kwargs):
    ArchivCZSK(session)
示例#10
0
    except:
        pass
    try:
        from Plugins.Extensions.archivCZSK.osrefmg import OSRefreshMG
        OSRefreshMG(session).refresh()
    except:
        pass
    try:
        from Plugins.Extensions.archivCZSK.osrefo2 import OSRefreshO2
        OSRefreshO2(session).refresh()
    except:
        pass

def Plugins(path, **kwargs):
    list = [PluginDescriptor(where=[PluginDescriptor.WHERE_SESSIONSTART], fnc=sessionStart),
        PluginDescriptor(NAME, description=DESCRIPTION, where=PluginDescriptor.WHERE_PLUGINMENU, fnc=main, icon="czsk.png")]
    if config.plugins.archivCZSK.extensions_menu.value:
        #list.append(PluginDescriptor(NAME, where=PluginDescriptor.WHERE_EXTENSIONSMENU, fnc=main))
        list.append(PluginDescriptor(NAME, description=DESCRIPTION, where=PluginDescriptor.WHERE_EXTENSIONSMENU, fnc=main))
    if config.plugins.archivCZSK.main_menu.value:
        #list.append(PluginDescriptor(NAME, where=PluginDescriptor.WHERE_MENU, fnc=menu))
        list.append(PluginDescriptor(NAME, description=DESCRIPTION, where=PluginDescriptor.WHERE_MENU, fnc=menu))
    if config.plugins.archivCZSK.epg_menu.value:
        list.append(PluginDescriptor(_("Search in ArchivCZSK"), where=PluginDescriptor.WHERE_EVENTINFO, fnc=eventInfo))

    list.append(PluginDescriptor("OS_refresh", where=PluginDescriptor.WHERE_EVENTINFO, fnc=osrefresh))
    return list

if config.plugins.archivCZSK.preload.value and not ArchivCZSK.isLoaded():
    ArchivCZSK.load_repositories()
    ArchivCZSK.load_skin()
示例#11
0
import simplejson as json


from util import addDir, addLink, showInfo, showError, showWarning
from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK

sys.path.append(os.path.join (os.path.dirname(__file__), 'resources', 'lib'))

try:
    import voyo27 as voyo
except ImportError:
    import voyo26 as voyo

__baseurl__ = 'http://voyo.nova.cz'
_UserAgent_ = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0'
__settings__ = ArchivCZSK.get_xbmc_addon('plugin.video.dmd-czech.voyo')
home = __settings__.getAddonInfo('path')
icon = os.path.join(home, 'icon.png')
nexticon = os.path.join(home, 'nextpage.png')

username = __settings__.getSetting('username')
password = __settings__.getSetting('password')
dev_hash = __settings__.getSetting('devhash')
secret_token = __settings__.getSetting('secret_token')

user_php_url = __baseurl__ + '/bin/eshop/ws/user.php'
wallet_php_url = __baseurl__ + '/bin/eshop/ws/ewallet.php'
player_php_url = __baseurl__ + '/bin/eshop/ws/plusPlayer.php'

MAX_PAGE_ENTRIES = 34
PAGER_RE = "<span class=\'next next_set\'><a href=\'([^']+)"
示例#12
0
import os
import cookielib
import decimal
import random

import aes
import simplejson as json
from parseutils import *

from util import addDir, addLink, showInfo, showError, showWarning
from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK

__baseurl__ = 'http://voyo.markiza.sk'
_UserAgent_ = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0'

__settings__ = ArchivCZSK.get_xbmc_addon('plugin.video.voyosk')
home = __settings__.getAddonInfo('path')
icon = os.path.join(home, 'icon.png')
nexticon = os.path.join(home, 'nextpage.png')

username = __settings__.getSetting('username')
password = __settings__.getSetting('password')
dev_hash = __settings__.getSetting('devhash')

user_php_url = 'http://voyo.markiza.sk/bin/eshop/ws/user.php'
wallet_php_url = 'http://voyo.markiza.sk/bin/eshop/ws/ewallet.php'
player_php_url = 'http://voyo.markiza.sk/bin/eshop/ws/plusPlayer.php'
livestream_php_url = 'http://voyo.markiza.sk/lbin/player/LiveStream.php'

MAX_PAGE_ENTRIES = 35
示例#13
0
# *  You should have received a copy of the GNU General Public License
# *  along with this program; see the file COPYING.  If not, write to
# *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# *  http://www.gnu.org/copyleft/gpl.html
# *
# */
sys.path.append( os.path.join ( os.path.dirname(__file__),'resources','lib') )
from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK
import joj
import xbmcprovider, xbmcutil
import util
import traceback,urllib2

__scriptid__   = 'plugin.video.joj.sk'
__scriptname__ = 'joj.sk'
__addon__ = ArchivCZSK.get_xbmc_addon(__scriptid__)
__language__   = __addon__.getLocalizedString

settings = {'quality':__addon__.getSetting('quality')}
provider = joj.JojContentProvider()

class XBMCJojContentProvider(xbmcprovider.XBMCMultiResolverContentProvider):
    def render_default(self, item):
        if item['type'] == 'showoff':
            item['title'] = item['title'] + '  (Nevys)'
        elif item['type'] == "showon7d":
            item['title'] = item['title'] + ' (7d)'
        if item['type'] == 'topvideo' or item['type'] == 'newvideo':
            self.render_video(item)
        else:
            self.render_dir(item)
示例#14
0
import sys
import traceback
import m3u8

from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK
try:
    from Plugins.Extensions.archivCZSK.engine.client import add_dir, add_video, getSearch, showError, showInfo, showWarning, log, getListInput, set_command
    from Plugins.Extensions.archivCZSK.resources.libraries import m3u8
except ImportError:
    showError("PrimaPlay vyzaduje novsiu verziu archivCZSK")

sys.path.append(os.path.join (os.path.dirname(__file__), 'libPrimaPlay'))

import PrimaPlay

_addon_ = ArchivCZSK.get_xbmc_addon('plugin.video.primaplay')
_scriptname_ = _addon_.getAddonInfo('name')
_version_ = _addon_.getAddonInfo('version')

###############################################################################
def _log(msg, level=0):
    if type(msg).__name__ == 'unicode':
        msg = msg.encode('utf-8')
    if level == 0:
        log.debug("[%s] %s" % (_scriptname_, msg.__str__()))
    else:
        log.error("[%s] %s" % (_scriptname_, msg.__str__()))

def logDbg(msg):
    _log(msg, level=0)
示例#15
0
 def writeSetting(self, id, val):
     from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK
     addon = ArchivCZSK.get_xbmc_addon('plugin.video.stream-cinema')
     addon.setSetting(id, val)
示例#16
0
# -*- coding: utf-8 -*-
import urllib2, urllib, re, os, traceback
from parseutils import *
from util import addDir, addLink, addSearch, getSearch
from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK
import vk, novamov, videobb
import videonet, ytube, videomail
import servertools

__baseurl__ = 'http://filmycz.com'
#_UserAgent_ = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'
_UserAgent_ = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506)'
__settings__ = ArchivCZSK.get_addon('plugin.video.dmd-czech.filmyczcom')
home = __settings__.get_info('path')
icon = os.path.join(home, 'icon.png')
nexticon = os.path.join(home, 'nextpage.png') 


#==========================================================================
def OBSAH():
    addDir('Hledat ...', __baseurl__, 4, icon)
    addDir('Podle kategorie', __baseurl__, 1, icon)
    addDir('Serialy', __baseurl__ + '/serialy/1-online', 5, icon)
    addDir('Filmy', __baseurl__ + '/', 2, icon)
#==========================================================================



#==========================================================================
def KATEGORIE():
    addDir('Akční', __baseurl__ + '/film/category/akcni/', 2, icon)
示例#17
0
 def writeSetting(self, id, val):
     from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK
     addon = ArchivCZSK.get_xbmc_addon('plugin.video.stream-cinema')
     addon.setSetting(id, val)
# *
# *  You should have received a copy of the GNU General Public License
# *  along with this program; see the file COPYING.  If not, write to
# *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# *  http://www.gnu.org/copyleft/gpl.html
# *
# */
import os, re, sys, urllib, urllib2, traceback, cookielib, time, socket
from htmlentitydefs import name2codepoint as n2cp
import simplejson as json
import util
UA = 'Mozilla/6.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.5) Gecko/2008092417 Firefox/3.0.3'
from Plugins.Extensions.archivCZSK.engine import client
from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK

__addon__ = ArchivCZSK.get_xbmc_addon('script.module.stream.resolver')
__lang__ = __addon__.getLocalizedString


client_version = 0
if hasattr(client,'getVersion'):
	client_version = client.getVersion()
# compatibility for older version
if isinstance(client_version, basestring):
	client_version = 1

##
# initializes urllib cookie handler
def init_urllib():
	cj = cookielib.LWPCookieJar()
	opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
示例#19
0
            image,
            infoLabels=infoLabels,
            menuItems=menuItems,
            video_item=video_item)


def addLink(name, url, image, *args, **kwargs):
    add_video(name, url, None, image)


import HTMLParser
from datetime import datetime, timedelta

__baseurl__ = 'http://tv.sme.sk'
__piano_d__ = '?piano_d=1'
__addon__ = ArchivCZSK.get_xbmc_addon('plugin.video.tv.sme.sk')
__cwd__ = __addon__.getAddonInfo('path')
__scriptname__ = 'plugin.video.tv.sme.sk'
icon = os.path.join(__cwd__, 'icon.png')
nexticon = os.path.join(__cwd__, 'nextpage.png')
video_quality = int(__addon__.getSetting('quality'))

VQ_SELECT = 0
VQ_SD = 1
VQ_HD = 2


def log(msg, level='debug'):
    if type(msg).__name__ == 'unicode':
        msg = msg.encode('utf-8', 'ignore')
    if level == 'debug':
示例#20
0
# -*- coding: utf-8 -*-
import urllib2,urllib,re,os,random,decimal
from parseutils import *
from util import addDir, addLink
from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK


__baseurl__ = 'http://play.iprima.cz'
__nejnovejsiurl__ = 'http://play.iprima.cz/primaplay/channel_ajax_more/'
__cdn_url__ = 'http://cdn-dispatcher.stream.cz/?id='
__dmdbase__ = 'http://iamm.netuje.cz/xbmc/prima/'
_UserAgent_ = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'

__settings__ = ArchivCZSK.get_addon('plugin.video.dmd-czech.prima')
home = __settings__.get_info('path')
icon = os.path.join(home, 'icon.png')
nexticon = os.path.join(home, 'nextpage.png')
prima = os.path.join(home, 'family.png')
love = os.path.join(home, 'love.png')
cool = os.path.join(home, 'cool.png')
zoom = os.path.join(home, 'zoom.png')
fanart = os.path.join(home, 'fanart.jpg')
vyvoleni = os.path.join( home, 'vyvoleni.png' )
kvalita = __settings__.get_setting('kvalita')
konvert_nazev = __settings__.get_setting('prevod_nazev')

if kvalita == '':
    __settings__.open_settings(session)

def replace_words(text, word_dic):
    rc = re.compile('|'.join(map(re.escape, word_dic)))
示例#21
0
from urlparse import urlparse, urlunparse, parse_qs
import aes
import json
try:
    import hashlib
except ImportError:
    import md5

from Components.config import config
from parseutils import *
from util import addDir, addLink, addSearch, getSearch
from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK

__baseurl__ = 'http://videoarchiv.markiza.sk'
_UserAgent_ = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0'
addon =  ArchivCZSK.get_xbmc_addon('plugin.video.dmd-czech.markiza')
profile = addon.getAddonInfo('profile')
__settings__ = addon
home = __settings__.getAddonInfo('path')
icon =  os.path.join( home, 'icon.png' )
fanart = os.path.join( home, 'fanart.jpg' )
loginurl = 'https://moja.markiza.sk/'
settings = {'username': __settings__.get_setting('markiza_user'), 'password': __settings__.get_setting('markiza_pass')}
cookiepath = os.path.join(config.plugins.archivCZSK.logPath.getValue(),'markiza.cookies')

class loguj(object):
    ERROR = 0
    INFO = 1
    DEBUG = 2
    mode = INFO
示例#22
0
# -*- coding: utf-8 -*-
import urllib2, urllib, re, os
from util import addDir, addLink, addSearch, getSearch, showWarning
from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK
import json
from hashlib import md5
from time import time

__baseurl__ = 'http://www.stream.cz/API'
_UserAgent_ = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'
__settings__ = ArchivCZSK.get_addon('plugin.video.dmd-czech.stream')
home = __settings__.get_info('path')
icon = os.path.join(home, 'icon.png')
nexticon = os.path.join(home, 'nextpage.png')


def replace_words(text, word_dic):
    rc = re.compile('|'.join(map(re.escape, word_dic)))

    def translate(match):
        return word_dic[match.group(0)]

    return rc.sub(translate, text)


word_dic = {
    '\u00e1': 'á',
    '\u00e9': 'é',
    '\u00ed': 'í',
    '\u00fd': 'ý',
    '\u00f3': 'ó',
示例#23
0
 def runArchivCZSK(callback=None):
     ArchivCZSK(session)
示例#24
0
import urllib2,urllib,re,os,string,time,base64,datetime
from urlparse import urlparse, urlunparse, parse_qs
import aes
try:
    import hashlib
except ImportError:
    import md5

from parseutils import *
from util import addDir, addLink, addSearch, getSearch
from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK

__baseurl__ = 'http://novaplus.nova.cz'
__dmdbase__ = 'http://iamm.uvadi.cz/xbmc/voyo/'
_UserAgent_ = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0'
addon =  ArchivCZSK.get_xbmc_addon('plugin.video.dmd-czech.novaplus')
profile = addon.getAddonInfo('profile')
__settings__ = addon
home = __settings__.getAddonInfo('path')
icon =  os.path.join( home, 'icon.png' )
fanart = os.path.join( home, 'fanart.jpg' )

def OBSAH():
    addDir('Seriály a pořady','http://novaplus.nova.cz/porady/',5,icon,1)
    addDir('Televizní noviny','http://novaplus.nova.cz/porad/televizni-noviny',1,icon,1)
    addDir('TOP pořady','http://novaplus.nova.cz',9,icon,1)
    addDir('Poslední epizody','http://novaplus.nova.cz',8,icon,1)
    addDir('Nejsledovanější','http://novaplus.nova.cz',6,icon,1)
    addDir('Nova Plus Originals','http://novaplus.nova.cz',10,icon,1)
    addDir('Doporučujeme','http://novaplus.nova.cz',7,icon,1)
示例#25
0
import os, re, sys, urllib, urllib2, traceback, cookielib, time, socket
from htmlentitydefs import name2codepoint as n2cp
import simplejson as json
import util
from Plugins.Extensions.archivCZSK.engine import client
from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK
from resolver import rslog

try:
    from Plugins.Extensions.archivCZSK.settings import USER_AGENT
    UA = USER_AGENT
except:
    UA = 'Mozilla/6.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.5) Gecko/2008092417 Firefox/3.0.3'
    pass

__addon__ = ArchivCZSK.get_xbmc_addon('script.module.stream.resolver')
__lang__ = __addon__.getLocalizedString

client_version = 0
if hasattr(client, 'getVersion'):
    client_version = client.getVersion()
# compatibility for older version
if isinstance(client_version, basestring):
    client_version = 1


##
# initializes urllib cookie handler
def init_urllib():
    cj = cookielib.LWPCookieJar()
    opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
示例#26
0
import simplejson as json

from util import addDir, addLink, showInfo, showError, showWarning
from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK

sys.path.append(os.path.join(os.path.dirname(__file__), 'resources', 'lib'))

try:
    import voyo27 as voyo
except ImportError:
    import voyo26 as voyo

__baseurl__ = 'http://voyo.nova.cz'
_UserAgent_ = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0'
__settings__ = ArchivCZSK.get_xbmc_addon('plugin.video.dmd-czech.voyo')
home = __settings__.getAddonInfo('path')
icon = os.path.join(home, 'icon.png')
nexticon = os.path.join(home, 'nextpage.png')

username = __settings__.getSetting('username')
password = __settings__.getSetting('password')
dev_hash = __settings__.getSetting('devhash')
secret_token = __settings__.getSetting('secret_token')

user_php_url = __baseurl__ + '/bin/eshop/ws/user.php'
wallet_php_url = __baseurl__ + '/bin/eshop/ws/ewallet.php'
player_php_url = __baseurl__ + '/bin/eshop/ws/plusPlayer.php'

MAX_PAGE_ENTRIES = 34
PAGER_RE = "<span class=\'next next_set\'><a href=\'([^']+)"
示例#27
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; see the file COPYING.  If not, write to
# *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
# *  http://www.gnu.org/copyleft/gpl.html
# *
# */
import os
import util, xbmcprovider, xbmcutil, resolver
from provider import ResolveException
from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK
__scriptid__ = 'plugin.video.pohadkar.cz'
__scriptname__ = 'Pohádkář.cz'
__addon__ = ArchivCZSK.get_xbmc_addon(__scriptid__)
__language__ = __addon__.getLocalizedString
__settings__ = __addon__.getSetting

sys.path.append(os.path.join (__addon__.getAddonInfo('path'), 'resources', 'lib'))
import pohadkar
settings = {'downloads':__addon__.getSetting('downloads'), 'quality':__addon__.getSetting('quality')}

def vp8_youtube_filter(stream):
    # some embedded devices running xbmc doesnt have vp8 support, so we
    # provide filtering ability for youtube videos
    
    #======================================================================
    #       5: "240p h263 flv container",
    #      18: "360p h264 mp4 container | 270 for rtmpe?",
    #      22: "720p h264 mp4 container",
示例#28
0
# -*- coding: utf-8 -*-
import urllib2,urllib,re,os

__baseurl__ = 'http://tv.sme.sk'
_UserAgent_ = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'
from util import addDir, addLink
from util import log as ACZSKLog
from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK
import HTMLParser
from datetime import datetime,timedelta

__settings__ = ArchivCZSK.get_xbmc_addon('plugin.video.tv.sme.sk')
__cwd__ = __settings__.getAddonInfo('path')
__scriptname__ = 'plugin.video.tv.sme.sk'
icon = os.path.join(__cwd__, 'icon.png')
nexticon = os.path.join(__cwd__, 'nextpage.png') 


def log(msg, level='debug'):
	if type(msg).__name__=='unicode':
		msg = msg.encode('utf-8','ignore')
	if level == 'debug':
		logfnc = ACZSKLog.debug
	else:
		logfnc = ACZSKLog.error
	logfnc("[%s] %s"%(__scriptname__,msg))

def logDbg(msg):
	log(msg,level='debug')

def logErr(msg):