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


Python Addon.getAddonInfo方法代码示例

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


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

示例1: convert_subtitles

# 需要导入模块: from addon.common.addon import Addon [as 别名]
# 或者: from addon.common.addon.Addon import getAddonInfo [as 别名]
def convert_subtitles(closedcaption):
	# from pycaption import detect_format, SRTWriter
	# idea taken from LearningIt(t1m)
	str_output =''
	if closedcaption[0] is not None:
		try:
			cc_content = smart_unicode(make_request(closedcaption[0]))
			# reader = detect_format(cc_content)
			if cc_content != "":
				profile = Addon.getAddonInfo('profile').decode("utf-8")
				prodir  = xbmc.translatePath(os.path.join(profile))
				if not os.path.isdir(prodir):
					os.makedirs(prodir)
				subfile = xbmc.translatePath(os.path.join(profile, 'subtitles.srt'))	
				file = open(subfile, 'w+')
				str_output = re.sub('\d+(\b,\b)\d+','.',cc_content)
				str_output = str_output.replace('WEBVTT','')
				file.write(str_output)
				str_output=''
				file.close()
			else:
				print "unknown sub type"
		except:
			print "Exception with Subs: "
			subfile = ''
	return subfile
开发者ID:YoColdRain,项目名称:ErosNow-Rain,代码行数:28,代码来源:default.py

示例2: Addon

# 需要导入模块: from addon.common.addon import Addon [as 别名]
# 或者: from addon.common.addon.Addon import getAddonInfo [as 别名]
import urllib
import urllib2
import json
import requests
import xbmc
import xbmcplugin
import xbmcgui
import xbmcaddon
import xbmcvfs
from addon.common.addon import Addon
import datetime

addon_id = 'plugin.video.hotstar-rain'
addon = Addon(addon_id, sys.argv)
Addon = xbmcaddon.Addon(addon_id)
addon_version = Addon.getAddonInfo('version')
debug = Addon.getSetting('debug')

# language = (Addon.getSetting('langType')).lower()
langTypes=''
langHindi = (Addon.getSetting('langHindi'))
langEnglish = (Addon.getSetting('langEnglish'))
langMalayalam = (Addon.getSetting('langMalayalam'))
langTamil = (Addon.getSetting('langTamil'))
langBengali = (Addon.getSetting('langBengali'))
langTelugu = (Addon.getSetting('langTelugu'))
langMarathi = (Addon.getSetting('langMarathi'))
langKannada = (Addon.getSetting('langKannada'))
langGujarati = (Addon.getSetting('langGujarati'))
if langHindi!='false': 
	if langTypes!='': langTypes+=',hindi' 
开发者ID:gahan9,项目名称:Hotstar-Rain,代码行数:33,代码来源:default.py

示例3: CATEGORIES

# 需要导入模块: from addon.common.addon import Addon [as 别名]
# 或者: from addon.common.addon.Addon import getAddonInfo [as 别名]
print 'Thumb is: ' + thumb
print 'Extension is: ' + ext
print 'File Type is: ' + console
print 'DL Folder is: ' + dlfoldername
print 'Favtype is: ' + favtype
print 'Main Image is: ' + mainimg


download_path = settings.getSetting('download_folder')


#Family Fun Flix - Blazetamer.
addon = xbmcaddon.Addon ('plugin.video.familyfunflix')
URL= 'http://www.popcornflixkids.com'

addonPath = addon.getAddonInfo('path')
artPath = xbmc.translatePath(os.path.join('http://addonrepo.com/xbmchub/familyfunflix/images/', ''))
fanartPath = xbmc.translatePath(os.path.join('http://addonrepo.com/xbmchub/familyfunflix/images/fanart/', ''))


#HOOKS
settings = xbmcaddon.Addon(id='plugin.video.familyfunflix')






def CATEGORIES():
    
    main.addDir('New Arrivals','http://www.popcornflixkids.com/new-arrival-kids-movies','indexdeep','','','movies')
开发者ID:ReSearchITEng,项目名称:allinclusive-kodi-pi,代码行数:33,代码来源:default.py

示例4: Addon

# 需要导入模块: from addon.common.addon import Addon [as 别名]
# 或者: from addon.common.addon.Addon import getAddonInfo [as 别名]
from addon.common.addon import Addon
import time
import base64, json
import pyaes
import sqlite3
import socket


addon_id = "plugin.video.DesiTVLive"
addon = Addon(addon_id, sys.argv)
Addon = xbmcaddon.Addon(addon_id)
debug = Addon.getSetting("debug")

socket.setdefaulttimeout(30)
pluginhandle = int(sys.argv[1])
addonDir = xbmc.translatePath(Addon.getAddonInfo("path"))
profile = xbmc.translatePath(Addon.getAddonInfo("profile"))
local_db = os.path.join(profile, "local_db.db")
pluginDir = sys.argv[0]
dialog = xbmcgui.Dialog()

language = (Addon.getSetting("langType")).lower()
tvsort = (Addon.getSetting("tvsortType")).lower()
moviessort = (Addon.getSetting("moviessortType")).lower()
ipaddress = Addon.getSetting("ipaddress")

base_url = "http://origin.dittotv.com"
base2_url = "/tvshows/all/0/" + language + "/"
listitem = ""

# Create addon folder in user_data, necessary for the sqlite db
开发者ID:RozebMomin,项目名称:KodiAddons,代码行数:33,代码来源:default.py

示例5: Addon

# 需要导入模块: from addon.common.addon import Addon [as 别名]
# 或者: from addon.common.addon.Addon import getAddonInfo [as 别名]
import xbmcgui
import xbmcaddon
from addon.common.addon import Addon
import sqlite3
import socket
import requests
import random

addon_id = 'plugin.video.ditto-rain'
addon = Addon(addon_id, sys.argv)
Addon = xbmcaddon.Addon(addon_id)
debug = Addon.getSetting('debug')

socket.setdefaulttimeout(30)
pluginhandle = int(sys.argv[1])
addonDir = xbmc.translatePath(Addon.getAddonInfo('path'))
profile = xbmc.translatePath(Addon.getAddonInfo('profile'))
local_db = os.path.join(profile, 'local_db.db')
pluginDir = sys.argv[0]
dialog = xbmcgui.Dialog()

language = (Addon.getSetting('langType'))
tvsort = (Addon.getSetting('tvsortType'))
moviessort = (Addon.getSetting('moviessortType'))
quality = (Addon.getSetting('qualityType')).lower()

base_url = 'http://www.dittotv.com'
# base2_url = '/tvshows/all/0/'+language+'/'
listitem=''

if 'Latest' in moviessort:
开发者ID:jakop345,项目名称:Ditto-Rain,代码行数:33,代码来源:default.py


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