PK H;H plugin.program.dokifix/addon.xml
executable
all
PK H $ plugin.program.dokifix/changelog.txtv1.0.4
Kidstube.nl toegevoegd, Kids menu aangemaakt
v1.0.3
installatie fix, Autosub verwijderd, 123movies addon toegevoegd
v1.0.2
Addons toegevoegd KUD, KidsTime, Youtube Music en RadioTunes en auto-subtitles verwijderd
v1.0.1
bug fixes
v1.0
NLVBMC releasePK H^# # ! plugin.program.dokifix/default.pyimport xbmc, xbmcaddon, xbmcgui, xbmcplugin,os,sys
import shutil
import urllib2,urllib
import re
import extract
import time
import downloader
import plugintools
import zipfile
import ntpath
USER_AGENT = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'
base='http://www.dokitv.nl'
ADDON=xbmcaddon.Addon(id='plugin.program.dokifix')
dialog = xbmcgui.Dialog()
VERSION = "1.0.0"
PATH = "dokifix"
def CATEGORIES():
link = OPEN_URL('https://raw.githubusercontent.com/Project-Galaxy/build/master/fix').replace('\n','').replace('\r','')
match = re.compile('name="(.+?)".+?rl="(.+?)".+?mg="(.+?)".+?anart="(.+?)".+?escription="(.+?)"').findall(link)
for name,url,iconimage,fanart,description in match:
addDir(name,url,1,iconimage,fanart,description)
setView('movies', 'MAIN')
def OPEN_URL(url):
req = urllib2.Request(url)
req.add_header('User-Agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3')
response = urllib2.urlopen(req)
link=response.read()
response.close()
return link
def wizard(name,url,description):
path = xbmc.translatePath(os.path.join('special://home/addons','packages'))
dp = xbmcgui.DialogProgress()
dp.create("DOKI Fix","Downloading ",'', 'Please Wait')
lib=os.path.join(path, name+'.zip')
try:
os.remove(lib)
except:
pass
downloader.download(url, lib, dp)
addonfolder = xbmc.translatePath(os.path.join('special://','home'))
time.sleep(2)
dp.update(0,"", "Extracting Zip Please Wait")
print '======================================='
print addonfolder
print '======================================='
extract.all(lib,addonfolder,dp)
dialog = xbmcgui.Dialog()
dialog.ok("DOWNLOAD COMPLETE", 'Unfortunately the only way to get the new changes to stick is', 'to force close kodi. Click ok to force Kodi to close,', 'DO NOT use the quit/exit options in Kodi., If the Force close does not close for some reason please Restart Device or kill task manaully')
killxbmc()
def killxbmc():
choice = xbmcgui.Dialog().yesno('Force Close Kodi', 'You are about to close Kodi', 'Would you like to continue?', nolabel='No, Cancel',yeslabel='Yes, Close')
if choice == 0:
return
elif choice == 1:
pass
myplatform = platform()
print "Platform: " + str(myplatform)
if myplatform == 'osx': # OSX
print "############ try osx force close #################"
try: os.system('killall -9 XBMC')
except: pass
try: os.system('killall -9 Kodi')
except: pass
dialog.ok("[COLOR=red][B]WARNING !!![/COLOR][/B]", "If you\'re seeing this message it means the force close", "was unsuccessful. Please force close XBMC/Kodi [COLOR=lime]DO NOT[/COLOR] exit cleanly via the menu.",'')
elif myplatform == 'linux': #Linux
print "############ try linux force close #################"
try: os.system('killall XBMC')
except: pass
try: os.system('killall Kodi')
except: pass
try: os.system('killall -9 xbmc.bin')
except: pass
try: os.system('killall -9 kodi.bin')
except: pass
dialog.ok("[COLOR=red][B]WARNING !!![/COLOR][/B]", "If you\'re seeing this message it means the force close", "was unsuccessful. Please force close XBMC/Kodi [COLOR=lime]DO NOT[/COLOR] exit cleanly via the menu.",'')
elif myplatform == 'android': # Android
print "############ try android force close #################"
try: os.system('adb shell am force-stop org.xbmc.kodi')
except: pass
try: os.system('adb shell am force-stop org.kodi')
except: pass
try: os.system('adb shell am force-stop org.xbmc.xbmc')
except: pass
try: os.system('adb shell am force-stop org.xbmc')
except: pass
dialog.ok("[COLOR=red][B]WARNING !!![/COLOR][/B]", "Your system has been detected as Android, you ", "[COLOR=yellow][B]MUST[/COLOR][/B] force close XBMC/Kodi. [COLOR=lime]DO NOT[/COLOR] exit cleanly via the menu.","Either close using Task Manager (If unsure pull the plug).")
elif myplatform == 'windows': # Windows
print "############ try windows force close #################"
try:
os.system('@ECHO off')
os.system('tskill XBMC.exe')
except: pass
try:
os.system('@ECHO off')
os.system('tskill Kodi.exe')
except: pass
try:
os.system('@ECHO off')
os.system('TASKKILL /im Kodi.exe /f')
except: pass
try:
os.system('@ECHO off')
os.system('TASKKILL /im XBMC.exe /f')
except: pass
dialog.ok("[COLOR=red][B]WARNING !!![/COLOR][/B]", "If you\'re seeing this message it means the force close", "was unsuccessful. Please force close XBMC/Kodi [COLOR=lime]DO NOT[/COLOR] exit cleanly via the menu.","Use task manager and NOT ALT F4")
else: #ATV
print "############ try atv force close #################"
try: os.system('killall AppleTV')
except: pass
print "############ try raspbmc force close #################" #OSMC / Raspbmc
try: os.system('sudo initctl stop kodi')
except: pass
try: os.system('sudo initctl stop xbmc')
except: pass
dialog.ok("[COLOR=red][B]WARNING !!![/COLOR][/B]", "If you\'re seeing this message it means the force close", "was unsuccessful. Please force close XBMC/Kodi [COLOR=lime]DO NOT[/COLOR] exit via the menu.","Your platform could not be detected so just pull the power cable.")
def platform():
if xbmc.getCondVisibility('system.platform.android'):
return 'android'
elif xbmc.getCondVisibility('system.platform.linux'):
return 'linux'
elif xbmc.getCondVisibility('system.platform.windows'):
return 'windows'
elif xbmc.getCondVisibility('system.platform.osx'):
return 'osx'
elif xbmc.getCondVisibility('system.platform.atv2'):
return 'atv2'
elif xbmc.getCondVisibility('system.platform.ios'):
return 'ios'
def addDir(name,url,mode,iconimage,fanart,description):
u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(mode)+"&name="+urllib.quote_plus(name)+"&iconimage="+urllib.quote_plus(iconimage)+"&fanart="+urllib.quote_plus(fanart)+"&description="+urllib.quote_plus(description)
ok=True
liz=xbmcgui.ListItem(name, iconImage="DefaultFolder.png", thumbnailImage=iconimage)
liz.setInfo( type="Video", infoLabels={ "Title": name, "Plot": description } )
liz.setProperty( "Fanart_Image", fanart )
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=False)
return ok
def get_params():
param=[]
paramstring=sys.argv[2]
if len(paramstring)>=2:
params=sys.argv[2]
cleanedparams=params.replace('?','')
if (params[len(params)-1]=='/'):
params=params[0:len(params)-2]
pairsofparams=cleanedparams.split('&')
param={}
for i in range(len(pairsofparams)):
splitparams={}
splitparams=pairsofparams[i].split('=')
if (len(splitparams))==2:
param[splitparams[0]]=splitparams[1]
return param
params=get_params()
url=None
name=None
mode=None
iconimage=None
fanart=None
description=None
try:
url=urllib.unquote_plus(params["url"])
except:
pass
try:
name=urllib.unquote_plus(params["name"])
except:
pass
try:
iconimage=urllib.unquote_plus(params["iconimage"])
except:
pass
try:
mode=int(params["mode"])
except:
pass
try:
fanart=urllib.unquote_plus(params["fanart"])
except:
pass
try:
description=urllib.unquote_plus(params["description"])
except:
pass
print str(PATH)+': '+str(VERSION)
print "Mode: "+str(mode)
print "URL: "+str(url)
print "Name: "+str(name)
print "IconImage: "+str(iconimage)
def setView(content, viewType):
# set content type so library shows more views and info
if content:
xbmcplugin.setContent(int(sys.argv[1]), content)
if ADDON.getSetting('auto-view')=='true':
xbmc.executebuiltin("Container.SetViewMode(%s)" % ADDON.getSetting(viewType) )
if mode==None or url==None or len(url)<1:
CATEGORIES()
elif mode==1:
wizard(name,url,description)
xbmcplugin.endOfDirectory(int(sys.argv[1]))
PK HpZj j $ plugin.program.dokifix/downloader.pyimport xbmcgui
import urllib
def download(url, dest, dp = None):
if not dp:
dp = xbmcgui.DialogProgress()
dp.create("Husham...Maintenance","Downloading & Copying File",' ', ' ')
dp.update(0)
urllib.urlretrieve(url,dest,lambda nb, bs, fs, url=url: _pbhook(nb,bs,fs,url,dp))
def _pbhook(numblocks, blocksize, filesize, url, dp):
try:
percent = min((numblocks*blocksize*100)/filesize, 100)
dp.update(percent)
except:
percent = 100
dp.update(percent)
if dp.iscanceled():
raise Exception("Canceled")
dp.close()
PK Hsd ! plugin.program.dokifix/extract.pyimport zipfile
def all(_in, _out, dp=None):
if dp:
return allWithProgress(_in, _out, dp)
return allNoProgress(_in, _out)
def allNoProgress(_in, _out):
try:
zin = zipfile.ZipFile(_in, 'r')
zin.extractall(_out)
except Exception, e:
print str(e)
return False
return True
def allWithProgress(_in, _out, dp):
zin = zipfile.ZipFile(_in, 'r')
nFiles = float(len(zin.infolist()))
count = 0
try:
for item in zin.infolist():
count += 1
update = count / nFiles * 100
dp.update(int(update))
zin.extract(item, _out)
except Exception, e:
print str(e)
return False
return TruePK H՞Z Z ! plugin.program.dokifix/fanart.jpg JFIF ` ` Exif MM * > J? ZQ Q Q z% u0 ` : o C
C "
} !1AQa"q2#BR$3br
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz
w !1AQaq"2B #3Rbr
$4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ? 袊 ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( 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