import re, os, sys, xbmc, urllib, xbmcplugin, xbmcgui, xbmcaddon
from addon.common.addon import Addon  # może trzeba więcej
import weblogingoogle
import StorageServer
from config import ps
from addon.common.net import Net  # może trzeba więcej


__settings__ = xbmcaddon.Addon(id="plugin.video.anime-iptv")
addonPath = __settings__.getAddonInfo('path')
iconFav = xbmcaddon.Addon(id="plugin.video.anime-iptv").getAddonInfo('path') + '/art/favorites.png'
net = Net()
_addon = Addon(ps('_addon_id'), sys.argv)
cache = StorageServer.StorageServer(ps('_addon_id'))
#cache = os.path.join(ps('_addon_id'))
_artIcon = _addon.get_icon()
_artFanart = _addon.get_fanart()


def addst(r, s=''):
    return _addon.get_setting(r)

loginGoogle = addst('username3', '')
passwordGoogle = addst('password3', '')


def iFL(t):
    return '[I]' + t + '[/I]'  # For Italic Text ###


def bFL(t):
	try: 		from t0mm0.common.addon 				import Addon
	except: 
		try: from c_t0mm0_common_addon 				import Addon
		except: pass
addon_id="service.lan.ftp"
addon_name="FTP [B]HUB[/B][I] - FTP Server[/I]"
try: 		addon=Addon(addon_id,sys.argv); 
except: 
	try: addon=Addon(addon_id,addon.handle); 
	except: addon=Addon(addon_id,0); 
plugin=xbmcaddon.Addon(id=addon_id); 
print "%s @ %s" % (addon_name,addon_id)
addonPath=xbmc.translatePath(plugin.getAddonInfo('path'))
try:		datapath 		=xbmc.translatePath(addon.get_profile()); 
except: datapath 		=""
try: 		_artIcon		=addon.get_icon(); 
except: _artIcon		=""
try: 		_artFanart	=addon.get_fanart()
except: _artFanart	=""
#_artMessage=xbmc.translatePath(os.path.join(addonPath,"msg.png"))
_artPath		=xbmc.translatePath(os.path.join(addonPath,"art"))
# ===================================================================
# --- Common Functions
# ===================================================================
def addstv(id,value=''): addon.addon.setSetting(id=id,value=value) ## Save Settings
def addst(r,s=''): return addon.get_setting(r)   ## Get Settings
def addpr(r,s=''): return addon.queries.get(r,s) ## Get Params
def tfalse(r,d=False): ## Get True / False
	if   (r.lower()=='true' ) or (r.lower()=='t') or (r.lower()=='y') or (r.lower()=='1') or (r.lower()=='yes'): return True
	elif (r.lower()=='false') or (r.lower()=='f') or (r.lower()=='n') or (r.lower()=='0') or (r.lower()=='no'): return False
	else: return d
示例#3
0
### ############################################################################################################
### ############################################################################################################

### ############################################################################################################
### ############################################################################################################
### ############################################################################################################
### Plugin Settings ###

IW_addon = Addon('plugin.video.infowars', sys.argv)
addon = IW_addon
IW_domain_url = "infowars.com"
IW_addonPath = xbmc.translatePath('Infowars')
IW_addon_path_art = ""
IW_artPath = xbmc.translatePath(os.path.join(IW_addonPath, IW_addon_path_art))
IW_datapath = xbmc.translatePath(IW_addon.get_profile())
IW_artIcon = IW_addon.get_icon()
IW_artFanart = IW_addon.get_fanart()
IW_plugin = "Infowars"
IW_authors = "Prafit, Spinalcracker"
IW_credits = ""
IW_addon_id = "plugin.video.infowars"
IW_database_name = "infowars"
IW_plugin_id = "plugin.video.infowars"
IW_database_file = os.path.join(xbmc.translatePath("special://database"),
                                'infowars.db')
IW_debugging = False
AJSIcon = "https://imgur.com/YYl3GFe.png"
DKSIcon = "https://assets.infowarsmedia.com/images/15084c28-71d4-456f-b587-7b66f73c7ede-large.png"
DKSFanart = "https://assets.infowarsmedia.com/images/203cf9b2-f811-4802-bfb4-441b2e864a7c-large.png"
WarRoomIcon = "https://static.infowars.com/images/war-room-logo-white.png"
WarRoomFanart = "https://static.infowars.com/images/war-room-studio.jpg"
示例#4
0
from common import (eod, set_view, addst, cFL, myNote)
import contextmenu
#######
try:
    from sqlite3 import dbapi2 as database
except:
    from pysqlite2 import dbapi2 as database
##########
iconFav = xbmcaddon.Addon(
    id="plugin.video.anime-iptv").getAddonInfo('path') + '/art/favorites.png'
iconSite = xbmcaddon.Addon(
    id="plugin.video.anime-iptv").getAddonInfo('path') + '/art/icon.png'
fanartSite = xbmcaddon.Addon(id="plugin.video.anime-iptv").getAddonInfo(
    'path') + '/art/japan/fanart.jpg'
_addon = Addon('plugin.video.anime-iptv', sys.argv)
_artIcon = _addon.get_icon()
_artFanart = _addon.get_fanart()
addonInfo = xbmcaddon.Addon().getAddonInfo
dataPath = xbmc.translatePath(addonInfo('profile')).decode('utf-8')
xbmcvfs.mkdir(dataPath)
favouritesFile = os.path.join(dataPath, 'favourites.db')
lang = xbmcaddon.Addon().getLocalizedString
###########


def bFL(t):
    return '[B]' + t + '[/B]'  # For Bold Text ###


def fav__COMMON__list_fetcher(site, section='', subfav=''):
    saved_favs = ('favs_' + site + '__' + section + subfav + '__')
示例#5
0


### ############################################################################################################
### ############################################################################################################
### ############################################################################################################
### Plugin Settings ###

IW_addon=Addon('plugin.video.infowars', sys.argv); addon=IW_addon; 
addon=IW_addon; 
IW_domain_url="infowars.com"
IW_addonPath	=xbmc.translatePath('Infowars')
IW_addon_path_art= ""
IW_artPath		=xbmc.translatePath(os.path.join(IW_addonPath,IW_addon_path_art))
IW_datapath 	=xbmc.translatePath(IW_addon.get_profile()); 
IW_artIcon		=IW_addon.get_icon(); 
IW_artFanart	=IW_addon.get_fanart()
IW_plugin = "Infowars"
IW_authors = "Prafit, Spinalcracker"
IW_credits= ""
IW_addon_id="plugin.video.infowars"
IW_database_name="infowars"
IW_plugin_id= "plugin.video.infowars"
IW_database_file=os.path.join(xbmc.translatePath("special://database"),'infowars.db'); 
IW_debugging= False
AJSIcon = "https://static.infowars.com/images/alex-jones-frontal.jpg"
RNWDKIcon = "https://static.infowars.com/images/real-news-logo.png"
RNWDKFanart = "https://static.infowars.com/images/real-news-with-david-knight.jpg"
WarRoomIcon = "https://static.infowars.com/images/war-room-logo.png"
WarRoomFanart = "https://static.infowars.com/images/war-room-studio.jpg"
CTIcon = "https://imgur.com/PN4jxKi.jpg"