本文整理汇总了Python中addon.common.addon.Addon.get_version方法的典型用法代码示例。如果您正苦于以下问题:Python Addon.get_version方法的具体用法?Python Addon.get_version怎么用?Python Addon.get_version使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类addon.common.addon.Addon
的用法示例。
在下文中一共展示了Addon.get_version方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: str
# 需要导入模块: from addon.common.addon import Addon [as 别名]
# 或者: from addon.common.addon.Addon import get_version [as 别名]
##### Paths ##########
cookie_path = os.path.join(datapath, 'cookies')
cookie_jar = os.path.join(cookie_path, "cookiejar.lwp")
if os.path.exists(cookie_path) == False:
os.makedirs(cookie_path)
##### Queries ##########
play = addon.queries.get('play', None)
mode = addon.queries['mode']
page_num = addon.queries.get('page_num', None)
url = addon.queries.get('url', None)
addon.log('----------------------TGUN Addon Params------------------------')
addon.log('--- Version: ' + str(addon.get_version()))
addon.log('--- Mode: ' + str(mode))
addon.log('--- Play: ' + str(play))
addon.log('--- URL: ' + str(url))
addon.log('--- Page: ' + str(page_num))
addon.log('---------------------------------------------------------------')
################### Global Constants #################################
main_url = 'http://www.tgun.tv/'
shows_url = main_url + 'shows/'
#showlist_url = 'http://www.tgun.tv/menus2/shows/chmenu%s.php'
showlist_url = 'http://www.tgun.tv/menus/shows/chmenu.php'
num_showpages = 4
classic_url = main_url + 'classic/'
classic_shows_url = 'http://www.tgun.tv/menus2/classic/chmenu%s.php'
示例2: str
# 需要导入模块: from addon.common.addon import Addon [as 别名]
# 或者: from addon.common.addon.Addon import get_version [as 别名]
##### 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())
print '--- Mode: ' + str(mode)
print '--- Play: ' + str(play)
print '--- URL: ' + str(url)
print '--- Video Type: ' + str(video_type)
print '--- Section: ' + str(section)
print '--- Title: ' + str(title)
print '--- Name: ' + str(name)
print '--- IMDB: ' + str(imdb_id)
print '--- Season: ' + str(season)
print '--- Episode: ' + str(episode)
print '---------------------------------------------------------------'
################### Global Constants #################################
#URLS
示例3: Addon
# 需要导入模块: from addon.common.addon import Addon [as 别名]
# 或者: from addon.common.addon.Addon import get_version [as 别名]
addon = Addon(addon_id, sys.argv)
Addon = xbmcaddon.Addon(addon_id)
netError = os.path.join(addon.get_path(), 'resources', 'skins', 'Default', 'media', 'network_error.png')
sys.path.append(os.path.join(addon.get_path(), 'resources', 'lib'))
data_path = addon.get_profile()
cookie_file = os.path.join(data_path, 'bu.cookie')
name = addon.queries.get('name', '')
url = addon.queries.get('url', '')
alt = addon.queries.get('alt', '')
mode = addon.queries['mode']
img = addon.queries.get('img', '')
addon.log('Version %s'%addon.get_version())
import utils
def MAIN():
Menu()
def Menu():
html = GetUrl(base_url)
match = 'description\=\*ANNOUNCEMENT\*\s+(\d+\/\d+\/\d+)\.(.*?)\/des'
announce = re.search(r''+match+'', html, re.I|re.DOTALL)
fanart = ''
try:
示例4: hasattr
# 需要导入模块: from addon.common.addon import Addon [as 别名]
# 或者: from addon.common.addon.Addon import get_version [as 别名]
# All of the modules are built-in to the interpreter, e.g., by py2exe
return hasattr(sys, "frozen")
def module_path():
encoding = sys.getfilesystemencoding()
if we_are_frozen():
return os.path.dirname(unicode(sys.executable, encoding))
return os.path.dirname(unicode(__file__, encoding))
try:
addon_id = 'script.module.axel.downloader'
from addon.common.addon import Addon
addon = Addon('script.module.axel.downloader')
addon_path = addon.get_path()
profile_path = addon.get_profile()
addon_version = addon.get_version()
except:
profile_path=module_path()
def log(msg,n=0):
if addon:
addon.log(msg,n)
#xbmc.log('%s: %s' % (addon_id, msg), n)
else:
print msg
#Create queue objects
class _Singleton(type):
_instances = {}
def __call__(cls, *args, **kwargs):
示例5: get_html
# 需要导入模块: from addon.common.addon import Addon [as 别名]
# 或者: from addon.common.addon.Addon import get_version [as 别名]
url = addon.queries.get('url', None)
section = addon.queries.get('section', None)
img = addon.queries.get('img', None)
genre = addon.queries.get('genre', None)
year = addon.queries.get('year', None)
letter = addon.queries.get('letter', None)
page = addon.queries.get('page', None)
episodes = addon.queries.get('episodes', None)
listitem = addon.queries.get('listitem', None)
query = addon.queries.get('query', None)
startPage = addon.queries.get('startPage', None)
numOfPages = addon.queries.get('numOfPages', None)
play = ''
addon.log('---------------------------------------------------------------')
addon.log('--- Addon Version: ' + addon.get_version())
addon.log('--- Mode: ' + str(mode))
addon.log('--- URL: ' + str(url))
addon.log('--- Genre: ' + str(genre))
addon.log('--- Section: ' + str(section))
addon.log('--- Letter: ' + str(letter))
addon.log('--- Year: ' + str(year))
#addon.log('--- IMDB: ' + str(imdb_id))
#addon.log('--- Season: ' + str(season))
#addon.log('--- Episode: ' + str(episode))
addon.log('---------------------------------------------------------------')
def get_html(page_url):
addon.log("Retrieving URL: %s" % page_url)
示例6: Net
# 需要导入模块: from addon.common.addon import Addon [as 别名]
# 或者: from addon.common.addon.Addon import get_version [as 别名]
import urllib2
import json
import re, os, cookielib
import simplejson as json
import xbmc, xbmcgui
from addon.common.net import Net
from addon.common.addon import Addon
net = Net()
addon = Addon('plugin.video.icefilms')
CLIENT_ID = 'V24WI7BW2OHJW'
USER_AGENT = 'Icefilms for Kodi/%s' % (addon.get_version())
INTERVALS = 5
class RealDebrid:
def __init__(self):
self.hosters = None
self.hosts = None
self.headers = {'User-Agent': USER_AGENT}
def get_media_url(self, host_link, retry=False):
try:
dialog = xbmcgui.DialogProgress()
dialog.create('Resolving', 'Resolving Link Using Real-Debrid...')
dialog.update(0)
url = 'https://api.real-debrid.com/rest/1.0/unrestrict/link'
headers = self.headers
headers['Authorization'] = 'Bearer %s' % (addon.get_setting('realdebrid_token'))