当前位置: 首页>>代码示例>>Python>>正文


Python ArchivCZSK.get_addon方法代码示例

本文整理汇总了Python中Plugins.Extensions.archivCZSK.archivczsk.ArchivCZSK.get_addon方法的典型用法代码示例。如果您正苦于以下问题:Python ArchivCZSK.get_addon方法的具体用法?Python ArchivCZSK.get_addon怎么用?Python ArchivCZSK.get_addon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Plugins.Extensions.archivCZSK.archivczsk.ArchivCZSK的用法示例。


在下文中一共展示了ArchivCZSK.get_addon方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: resolve_dependencies

# 需要导入模块: from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK [as 别名]
# 或者: from Plugins.Extensions.archivCZSK.archivczsk.ArchivCZSK import get_addon [as 别名]
    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")
开发者ID:natko1412,项目名称:archivczsk,代码行数:39,代码来源:contentprovider.py

示例2: replace_words

# 需要导入模块: from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK [as 别名]
# 或者: from Plugins.Extensions.archivCZSK.archivczsk.ArchivCZSK import get_addon [as 别名]
# -*- 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)))
开发者ID:slavkodemeter,项目名称:archivczsk-doplnky,代码行数:33,代码来源:default.py

示例3: OBSAH

# 需要导入模块: from Plugins.Extensions.archivCZSK.archivczsk import ArchivCZSK [as 别名]
# 或者: from Plugins.Extensions.archivCZSK.archivczsk.ArchivCZSK import get_addon [as 别名]
        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():
开发者ID:slavkodemeter,项目名称:archivczsk-doplnky,代码行数:33,代码来源:default.py


注:本文中的Plugins.Extensions.archivCZSK.archivczsk.ArchivCZSK.get_addon方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。