當前位置: 首頁>>代碼示例>>Python>>正文


Python archivczsk.ArchivCZSK類代碼示例

本文整理匯總了Python中Plugins.Extensions.archivCZSK.archivczsk.ArchivCZSK的典型用法代碼示例。如果您正苦於以下問題:Python ArchivCZSK類的具體用法?Python ArchivCZSK怎麽用?Python ArchivCZSK使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了ArchivCZSK類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: resolve_dependencies

    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,代碼行數:37,代碼來源:contentprovider.py

示例2: saveVipDaysToSettings

    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
開發者ID:mx3L,項目名稱:archivczsk-doplnky,代碼行數:18,代碼來源:webshare.py

示例3: vp8_youtube_filter

# *  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",
開發者ID:mx3L,項目名稱:archivczsk-doplnky,代碼行數:31,代碼來源:default.py

示例4: replace_words

# -*- 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,代碼行數:31,代碼來源:default.py

示例5: OBSAH

# -*- 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'])
開發者ID:slavkodemeter,項目名稱:archivczsk-doplnky,代碼行數:31,代碼來源:default.py

示例6: OSRefreshMG

    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()
開發者ID:mx3L,項目名稱:archivczsk,代碼行數:31,代碼來源:plugin.py

示例7: writeSetting

 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)
開發者ID:mx3L,項目名稱:archivczsk-doplnky,代碼行數:4,代碼來源:trakttv.py

示例8: hasattr

# *
# *  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))
開發者ID:slavkodemeter,項目名稱:archivczsk-doplnky,代碼行數:31,代碼來源:xbmcutil.py

示例9:

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=\'([^']+)"
開發者ID:mx3L,項目名稱:archivczsk-doplnky,代碼行數:31,代碼來源:default.py

示例10: log

# -*- 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):
開發者ID:slavkodemeter,項目名稱:archivczsk-doplnky,代碼行數:31,代碼來源:default.py


注:本文中的Plugins.Extensions.archivCZSK.archivczsk.ArchivCZSK類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。