forked from a4k-openproject/plugin.program.openwizard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.py
2630 lines (2493 loc) · 161 KB
/
default.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
################################################################################
# Copyright (C) 2015 Surfacingx #
# #
# This Program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2, or (at your option) #
# any later version. #
# #
# This Program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# 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 XBMC; 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 xbmc, xbmcaddon, xbmcgui, xbmcplugin, os, sys, xbmcvfs, glob
import shutil
import urllib2,urllib
import re
import uservar
import fnmatch
try: from sqlite3 import dbapi2 as database
except: from pysqlite2 import dbapi2 as database
from datetime import date, datetime, timedelta
from urlparse import urljoin
from resources.libs import extract, downloader, notify, debridit, traktit, loginit, skinSwitch, uploadLog, yt, speedtest, wizard as wiz
ADDON_ID = uservar.ADDON_ID
ADDONTITLE = uservar.ADDONTITLE
ADDON = wiz.addonId(ADDON_ID)
VERSION = wiz.addonInfo(ADDON_ID,'version')
ADDONPATH = wiz.addonInfo(ADDON_ID, 'path')
DIALOG = xbmcgui.Dialog()
DP = xbmcgui.DialogProgress()
HOME = xbmc.translatePath('special://home/')
LOG = xbmc.translatePath('special://logpath/')
PROFILE = xbmc.translatePath('special://profile/')
TEMPDIR = xbmc.translatePath('special://temp')
ADDONS = os.path.join(HOME, 'addons')
USERDATA = os.path.join(HOME, 'userdata')
PLUGIN = os.path.join(ADDONS, ADDON_ID)
PACKAGES = os.path.join(ADDONS, 'packages')
ADDOND = os.path.join(USERDATA, 'addon_data')
ADDONDATA = os.path.join(USERDATA, 'addon_data', ADDON_ID)
ADVANCED = os.path.join(USERDATA, 'advancedsettings.xml')
SOURCES = os.path.join(USERDATA, 'sources.xml')
FAVOURITES = os.path.join(USERDATA, 'favourites.xml')
PROFILES = os.path.join(USERDATA, 'profiles.xml')
GUISETTINGS = os.path.join(USERDATA, 'guisettings.xml')
THUMBS = os.path.join(USERDATA, 'Thumbnails')
DATABASE = os.path.join(USERDATA, 'Database')
FANART = os.path.join(PLUGIN, 'fanart.jpg')
ICON = os.path.join(PLUGIN, 'icon.png')
ART = os.path.join(PLUGIN, 'resources', 'art')
WIZLOG = os.path.join(ADDONDATA, 'wizard.log')
SPEEDTESTFOLD = os.path.join(ADDONDATA, 'SpeedTest')
ARCHIVE_CACHE = os.path.join(TEMPDIR, 'archive_cache')
SKIN = xbmc.getSkinDir()
BUILDNAME = wiz.getS('buildname')
DEFAULTSKIN = wiz.getS('defaultskin')
DEFAULTNAME = wiz.getS('defaultskinname')
DEFAULTIGNORE = wiz.getS('defaultskinignore')
BUILDVERSION = wiz.getS('buildversion')
BUILDTHEME = wiz.getS('buildtheme')
BUILDLATEST = wiz.getS('latestversion')
SHOW15 = wiz.getS('show15')
SHOW16 = wiz.getS('show16')
SHOW17 = wiz.getS('show17')
SHOW18 = wiz.getS('show18')
SHOWADULT = wiz.getS('adult')
SHOWMAINT = wiz.getS('showmaint')
AUTOCLEANUP = wiz.getS('autoclean')
AUTOCACHE = wiz.getS('clearcache')
AUTOPACKAGES = wiz.getS('clearpackages')
AUTOTHUMBS = wiz.getS('clearthumbs')
AUTOFEQ = wiz.getS('autocleanfeq')
AUTONEXTRUN = wiz.getS('nextautocleanup')
INCLUDEVIDEO = wiz.getS('includevideo')
INCLUDEALL = wiz.getS('includeall')
INCLUDEPLACENTA = wiz.getS('includeplacenta')
INCLUDEEXODUSREDUX = wiz.getS('includeexodusredux')
INCLUDEGAIA = wiz.getS('includegaia')
INCLUDESEREN = wiz.getS('includeseren')
INCLUDEOVEREASY = wiz.getS('includeovereasy')
INCLUDEYODA = wiz.getS('includeyoda')
INCLUDESCRUBS = wiz.getS('includescrubs')
SEPERATE = wiz.getS('seperate')
NOTIFY = wiz.getS('notify')
NOTEID = wiz.getS('noteid')
NOTEDISMISS = wiz.getS('notedismiss')
TRAKTSAVE = wiz.getS('traktlastsave')
REALSAVE = wiz.getS('debridlastsave')
LOGINSAVE = wiz.getS('loginlastsave')
KEEPFAVS = wiz.getS('keepfavourites')
KEEPSOURCES = wiz.getS('keepsources')
KEEPPROFILES = wiz.getS('keepprofiles')
KEEPADVANCED = wiz.getS('keepadvanced')
KEEPREPOS = wiz.getS('keeprepos')
KEEPSUPER = wiz.getS('keepsuper')
KEEPWHITELIST = wiz.getS('keepwhitelist')
KEEPTRAKT = wiz.getS('keeptrakt')
KEEPREAL = wiz.getS('keepdebrid')
KEEPLOGIN = wiz.getS('keeplogin')
DEVELOPER = wiz.getS('developer')
THIRDPARTY = wiz.getS('enable3rd')
THIRD1NAME = wiz.getS('wizard1name')
THIRD1URL = wiz.getS('wizard1url')
THIRD2NAME = wiz.getS('wizard2name')
THIRD2URL = wiz.getS('wizard2url')
THIRD3NAME = wiz.getS('wizard3name')
THIRD3URL = wiz.getS('wizard3url')
BACKUPLOCATION = ADDON.getSetting('path') if not ADDON.getSetting('path') == '' else 'special://home/'
BACKUPROMS = wiz.getS('rompath')
MYBUILDS = os.path.join(BACKUPLOCATION, 'My_Builds', '')
AUTOFEQ = int(float(AUTOFEQ)) if AUTOFEQ.isdigit() else 0
TODAY = date.today()
TOMORROW = TODAY + timedelta(days=1)
THREEDAYS = TODAY + timedelta(days=3)
KODIV = float(xbmc.getInfoLabel("System.BuildVersion")[:4])
if KODIV > 17:
from resources.libs import zfile as zipfile
else:
import zipfile
MCNAME = wiz.mediaCenter()
EXCLUDES = uservar.EXCLUDES
CACHETEXT = uservar.CACHETEXT
CACHEAGE = uservar.CACHEAGE if str(uservar.CACHEAGE).isdigit() else 30
BUILDFILE = uservar.BUILDFILE
APKFILE = uservar.APKFILE
YOUTUBETITLE = uservar.YOUTUBETITLE
YOUTUBEFILE = uservar.YOUTUBEFILE
ADDONFILE = uservar.ADDONFILE
ADVANCEDFILE = uservar.ADVANCEDFILE
UPDATECHECK = uservar.UPDATECHECK if str(uservar.UPDATECHECK).isdigit() else 1
NEXTCHECK = TODAY + timedelta(days=UPDATECHECK)
NOTIFICATION = uservar.NOTIFICATION
ENABLE = uservar.ENABLE
HEADERMESSAGE = uservar.HEADERMESSAGE
AUTOUPDATE = uservar.AUTOUPDATE
BUILDERNAME = uservar.BUILDERNAME
WIZARDFILE = uservar.WIZARDFILE
HIDECONTACT = uservar.HIDECONTACT
CONTACT = uservar.CONTACT
CONTACTICON = uservar.CONTACTICON if not uservar.CONTACTICON == 'http://' else ICON
CONTACTFANART = uservar.CONTACTFANART if not uservar.CONTACTFANART == 'http://' else FANART
HIDESPACERS = uservar.HIDESPACERS
COLOR1 = uservar.COLOR1
COLOR2 = uservar.COLOR2
THEME1 = uservar.THEME1
THEME2 = uservar.THEME2
THEME3 = uservar.THEME3
THEME4 = uservar.THEME4
THEME5 = uservar.THEME5
ICONBUILDS = uservar.ICONBUILDS if not uservar.ICONBUILDS == 'http://' else ICON
ICONMAINT = uservar.ICONMAINT if not uservar.ICONMAINT == 'http://' else ICON
ICONAPK = uservar.ICONAPK if not uservar.ICONAPK == 'http://' else ICON
ICONADDONS = uservar.ICONADDONS if not uservar.ICONADDONS == 'http://' else ICON
ICONYOUTUBE = uservar.ICONYOUTUBE if not uservar.ICONYOUTUBE == 'http://' else ICON
ICONSAVE = uservar.ICONSAVE if not uservar.ICONSAVE == 'http://' else ICON
ICONTRAKT = uservar.ICONTRAKT if not uservar.ICONTRAKT == 'http://' else ICON
ICONREAL = uservar.ICONREAL if not uservar.ICONREAL == 'http://' else ICON
ICONLOGIN = uservar.ICONLOGIN if not uservar.ICONLOGIN == 'http://' else ICON
ICONCONTACT = uservar.ICONCONTACT if not uservar.ICONCONTACT == 'http://' else ICON
ICONSETTINGS = uservar.ICONSETTINGS if not uservar.ICONSETTINGS == 'http://' else ICON
LOGFILES = wiz.LOGFILES
TRAKTID = traktit.TRAKTID
DEBRIDID = debridit.DEBRIDID
LOGINID = loginit.LOGINID
MODURL = 'http://tribeca.tvaddons.ag/tools/maintenance/modules/'
MODURL2 = 'http://mirrors.kodi.tv/addons/jarvis/'
INSTALLMETHODS = ['Always Ask', 'Reload Profile', 'Force Close']
DEFAULTPLUGINS = ['metadata.album.universal', 'metadata.artists.universal', 'metadata.common.fanart.tv', 'metadata.common.imdb.com', 'metadata.common.musicbrainz.org', 'metadata.themoviedb.org', 'metadata.tvdb.com', 'service.xbmc.versioncheck']
try:
INSTALLMETHOD = int(float(wiz.getS('installmethod')))
except:
INSTALLMETHOD = 0
###########################
###### Menu Items #######
###########################
#addDir (display,mode,name=None,url=None,menu=None,overwrite=True,fanart=FANART,icon=ICON, themeit=None)
#addFile(display,mode,name=None,url=None,menu=None,overwrite=True,fanart=FANART,icon=ICON, themeit=None)
def index():
errors = int(errorChecking(count=True))
errorsfound = str(errors) + ' Error(s) Found' if errors > 0 else 'None Found'
if AUTOUPDATE == 'Yes':
wizfile = wiz.textCache(WIZARDFILE)
if not wizfile == False:
ver = wiz.checkWizard('version')
if ver > VERSION: addFile('%s [v%s] [COLOR red][B][UPDATE v%s][/B][/COLOR]' % (ADDONTITLE, VERSION, ver), 'wizardupdate', themeit=THEME2)
else: addFile('%s [v%s]' % (ADDONTITLE, VERSION), '', themeit=THEME2)
else: addFile('%s [v%s]' % (ADDONTITLE, VERSION), '', themeit=THEME2)
else: addFile('%s [v%s]' % (ADDONTITLE, VERSION), '', themeit=THEME2)
if len(BUILDNAME) > 0:
version = wiz.checkBuild(BUILDNAME, 'version')
build = '%s (v%s)' % (BUILDNAME, BUILDVERSION)
if version > BUILDVERSION: build = '%s [COLOR red][B][UPDATE v%s][/B][/COLOR]' % (build, version)
addDir(build,'viewbuild', BUILDNAME, themeit=THEME4)
themefile = wiz.themeCount(BUILDNAME)
if not themefile == False:
addFile('None' if BUILDTHEME == "" else BUILDTHEME, 'theme', BUILDNAME, themeit=THEME5)
else: addDir('None', 'builds', themeit=THEME4)
if HIDESPACERS == 'No': addFile(wiz.sep(), '', themeit=THEME3)
addDir ('Builds', 'builds', icon=ICONBUILDS, themeit=THEME1)
addDir ('Maintenance', 'maint', icon=ICONMAINT, themeit=THEME1)
if wiz.platform() == 'android' or DEVELOPER == 'true': addDir ('Apk Installer' ,'apk', icon=ICONAPK, themeit=THEME1)
if not ADDONFILE == 'http://': addDir ('Addon Installer' ,'addons', icon=ICONADDONS, themeit=THEME1)
if not YOUTUBEFILE == 'http://' and not YOUTUBETITLE == '': addDir (YOUTUBETITLE ,'youtube', icon=ICONYOUTUBE, themeit=THEME1)
addDir ('Save Data', 'savedata', icon=ICONSAVE, themeit=THEME1)
if HIDECONTACT == 'No': addFile('Contact' ,'contact', icon=ICONCONTACT, themeit=THEME1)
if HIDESPACERS == 'No': addFile(wiz.sep(), '', themeit=THEME3)
addFile('Upload Log File', 'uploadlog', icon=ICONMAINT, themeit=THEME1)
addFile('View Errors in Log: %s' % (errorsfound), 'viewerrorlog', icon=ICONMAINT, themeit=THEME1)
if errors > 0: addFile('View Last Error In Log', 'viewerrorlast', icon=ICONMAINT, themeit=THEME1)
if HIDESPACERS == 'No': addFile(wiz.sep(), '', themeit=THEME3)
addFile('Settings', 'settings', icon=ICONSETTINGS, themeit=THEME1)
addFile('Force Update Text Files', 'forcetext', icon=ICONMAINT, themeit=THEME1)
if DEVELOPER == 'true': addDir('Developer Menu', 'developer', icon=ICON, themeit=THEME1)
setView('files', 'viewType')
def buildMenu():
bf = wiz.textCache(BUILDFILE)
if bf == False:
WORKINGURL = wiz.workingURL(BUILDFILE)
addFile('%s Version: %s' % (MCNAME, KODIV), '', icon=ICONBUILDS, themeit=THEME3)
addDir ('Save Data Menu' ,'savedata', icon=ICONSAVE, themeit=THEME3)
if HIDESPACERS == 'No': addFile(wiz.sep(), '', themeit=THEME3)
addFile('Url for txt file not valid', '', icon=ICONBUILDS, themeit=THEME3)
addFile('%s' % WORKINGURL, '', icon=ICONBUILDS, themeit=THEME3)
return
total, count15, count16, count17, count18, adultcount, hidden = wiz.buildCount()
third = False; addin = []
if THIRDPARTY == 'true':
if not THIRD1NAME == '' and not THIRD1URL == '': third = True; addin.append('1')
if not THIRD2NAME == '' and not THIRD2URL == '': third = True; addin.append('2')
if not THIRD3NAME == '' and not THIRD3URL == '': third = True; addin.append('3')
link = bf.replace('\n','').replace('\r','').replace('\t','').replace('gui=""', 'gui="http://"').replace('theme=""', 'theme="http://"').replace('adult=""', 'adult="no"')
match = re.compile('name="(.+?)".+?ersion="(.+?)".+?rl="(.+?)".+?ui="(.+?)".+?odi="(.+?)".+?heme="(.+?)".+?con="(.+?)".+?anart="(.+?)".+?dult="(.+?)".+?escription="(.+?)"').findall(link)
if total == 1 and third == False:
for name, version, url, gui, kodi, theme, icon, fanart, adult, description in match:
if not SHOWADULT == 'true' and adult.lower() == 'yes': continue
if not DEVELOPER == 'true' and wiz.strTest(name): continue
viewBuild(match[0][0])
return
addFile('%s Version: %s' % (MCNAME, KODIV), '', icon=ICONBUILDS, themeit=THEME3)
addDir ('Save Data Menu' ,'savedata', icon=ICONSAVE, themeit=THEME3)
if HIDESPACERS == 'No': addFile(wiz.sep(), '', themeit=THEME3)
if third == True:
for item in addin:
name = eval('THIRD%sNAME' % item)
addDir ("[B]%s[/B]" % name, 'viewthirdparty', item, icon=ICONBUILDS, themeit=THEME3)
if len(match) >= 1:
if SEPERATE == 'true':
for name, version, url, gui, kodi, theme, icon, fanart, adult, description in match:
if not SHOWADULT == 'true' and adult.lower() == 'yes': continue
if not DEVELOPER == 'true' and wiz.strTest(name): continue
menu = createMenu('install', '', name)
addDir('[%s] %s (v%s)' % (float(kodi), name, version), 'viewbuild', name, description=description, fanart=fanart,icon=icon, menu=menu, themeit=THEME2)
else:
if count18 > 0:
state = '+' if SHOW18 == 'false' else '-'
addFile('[B]%s Leia Builds(%s)[/B]' % (state, count18), 'togglesetting', 'show17', themeit=THEME3)
if SHOW18 == 'true':
for name, version, url, gui, kodi, theme, icon, fanart, adult, description in match:
if not SHOWADULT == 'true' and adult.lower() == 'yes': continue
if not DEVELOPER == 'true' and wiz.strTest(name): continue
kodiv = int(float(kodi))
if kodiv == 18:
menu = createMenu('install', '', name)
addDir('[%s] %s (v%s)' % (float(kodi), name, version), 'viewbuild', name, description=description, fanart=fanart,icon=icon, menu=menu, themeit=THEME2)
if count17 > 0:
state = '+' if SHOW17 == 'false' else '-'
addFile('[B]%s Krypton Builds(%s)[/B]' % (state, count17), 'togglesetting', 'show17', themeit=THEME3)
if SHOW17 == 'true':
for name, version, url, gui, kodi, theme, icon, fanart, adult, description in match:
if not SHOWADULT == 'true' and adult.lower() == 'yes': continue
if not DEVELOPER == 'true' and wiz.strTest(name): continue
kodiv = int(float(kodi))
if kodiv == 17:
menu = createMenu('install', '', name)
addDir('[%s] %s (v%s)' % (float(kodi), name, version), 'viewbuild', name, description=description, fanart=fanart,icon=icon, menu=menu, themeit=THEME2)
if count16 > 0:
state = '+' if SHOW16 == 'false' else '-'
addFile('[B]%s Jarvis Builds(%s)[/B]' % (state, count16), 'togglesetting', 'show16', themeit=THEME3)
if SHOW16 == 'true':
for name, version, url, gui, kodi, theme, icon, fanart, adult, description in match:
if not SHOWADULT == 'true' and adult.lower() == 'yes': continue
if not DEVELOPER == 'true' and wiz.strTest(name): continue
kodiv = int(float(kodi))
if kodiv == 16:
menu = createMenu('install', '', name)
addDir('[%s] %s (v%s)' % (float(kodi), name, version), 'viewbuild', name, description=description, fanart=fanart,icon=icon, menu=menu, themeit=THEME2)
if count15 > 0:
state = '+' if SHOW15 == 'false' else '-'
addFile('[B]%s Isengard and Below Builds(%s)[/B]' % (state, count15), 'togglesetting', 'show15', themeit=THEME3)
if SHOW15 == 'true':
for name, version, url, gui, kodi, theme, icon, fanart, adult, description in match:
if not SHOWADULT == 'true' and adult.lower() == 'yes': continue
if not DEVELOPER == 'true' and wiz.strTest(name): continue
kodiv = int(float(kodi))
if kodiv <= 15:
menu = createMenu('install', '', name)
addDir('[%s] %s (v%s)' % (float(kodi), name, version), 'viewbuild', name, description=description, fanart=fanart,icon=icon, menu=menu, themeit=THEME2)
elif hidden > 0:
if adultcount > 0:
addFile('There is currently only Adult builds', '', icon=ICONBUILDS, themeit=THEME3)
addFile('Enable Show Adults in Addon Settings > Misc', '', icon=ICONBUILDS, themeit=THEME3)
else:
addFile('Currently No Builds Offered from %s' % ADDONTITLE, '', icon=ICONBUILDS, themeit=THEME3)
else: addFile('Text file for builds not formated correctly.', '', icon=ICONBUILDS, themeit=THEME3)
setView('files', 'viewType')
def viewBuild(name):
bf = wiz.textCache(BUILDFILE)
if bf == False:
WORKINGURL = wiz.workingURL(BUILDFILE)
addFile('Url for txt file not valid', '', themeit=THEME3)
addFile('%s' % WORKINGURL, '', themeit=THEME3)
return
if wiz.checkBuild(name, 'version') == False:
addFile('Error reading the txt file.', '', themeit=THEME3)
addFile('%s was not found in the builds list.' % name, '', themeit=THEME3)
return
link = bf.replace('\n','').replace('\r','').replace('\t','').replace('gui=""', 'gui="http://"').replace('theme=""', 'theme="http://"')
match = re.compile('name="%s".+?ersion="(.+?)".+?rl="(.+?)".+?inor="(.+?)".+?ui="(.+?)".+?odi="(.+?)".+?heme="(.+?)".+?con="(.+?)".+?anart="(.+?)".+?review="(.+?)".+?dult="(.+?)".+?nfo="(.+?)".+?escription="(.+?)"' % name).findall(link)
for version, url, minor, gui, kodi, themefile, icon, fanart, preview, adult, info, description in match:
icon = icon
fanart = fanart
build = '%s (v%s)' % (name, version)
if BUILDNAME == name and version > BUILDVERSION:
build = '%s [COLOR red][CURRENT v%s][/COLOR]' % (build, BUILDVERSION)
addFile(build, '', description=description, fanart=fanart, icon=icon, themeit=THEME4)
if HIDESPACERS == 'No': addFile(wiz.sep(), '', themeit=THEME3)
addDir ('Save Data Menu', 'savedata', icon=ICONSAVE, themeit=THEME3)
addFile('Build Information', 'buildinfo', name, description=description, fanart=fanart, icon=icon, themeit=THEME3)
if not preview == "http://": addFile('View Video Preview', 'buildpreview', name, description=description, fanart=fanart, icon=icon, themeit=THEME3)
temp1 = int(float(KODIV)); temp2 = int(float(kodi))
if not temp1 == temp2:
if temp1 == 16 and temp2 <= 15: warning = False
else: warning = True
else: warning = False
if warning == True:
addFile('[I]Build designed for kodi version %s(installed: %s)[/I]' % (str(kodi), str(KODIV)), '', fanart=fanart, icon=icon, themeit=THEME3)
addFile(wiz.sep('INSTALL'), '', fanart=fanart, icon=icon, themeit=THEME3)
addFile('Fresh Install' , 'install', name, 'fresh' , description=description, fanart=fanart, icon=icon, themeit=THEME1)
addFile('Standard Install', 'install', name, 'normal' , description=description, fanart=fanart, icon=icon, themeit=THEME1)
if not gui == 'http://': addFile('Apply guiFix' , 'install', name, 'gui' , description=description, fanart=fanart, icon=icon, themeit=THEME1)
if not themefile == 'http://':
themecheck = wiz.textCache(themefile)
if not themecheck == False:
addFile(wiz.sep('THEMES'), '', fanart=fanart, icon=icon, themeit=THEME3)
link = themecheck.replace('\n','').replace('\r','').replace('\t','')
match = re.compile('name="(.+?)".+?rl="(.+?)".+?con="(.+?)".+?anart="(.+?)".+?dult="(.+?)".+?escription="(.+?)"').findall(link)
for themename, themeurl, themeicon, themefanart, themeadult, description in match:
if not SHOWADULT == 'true' and themeadult.lower() == 'yes': continue
themeicon = themeicon if themeicon == 'http://' else icon
themefanart = themefanart if themefanart == 'http://' else fanart
addFile(themename if not themename == BUILDTHEME else "[B]%s (Installed)[/B]" % themename, 'theme', name, themename, description=description, fanart=themefanart, icon=themeicon, themeit=THEME3)
setView('files', 'viewType')
def viewThirdList(number):
name = eval('THIRD%sNAME' % number)
url = eval('THIRD%sURL' % number)
work = wiz.workingURL(url)
if not work == True:
addFile('Url for txt file not valid', '', icon=ICONBUILDS, themeit=THEME3)
addFile('%s' % WORKINGURL, '', icon=ICONBUILDS, themeit=THEME3)
else:
type, buildslist = wiz.thirdParty(url)
addFile("[B]%s[/B]" % name, '', themeit=THEME3)
if HIDESPACERS == 'No': addFile(wiz.sep(), '', themeit=THEME3)
if type:
for name, version, url, kodi, icon, fanart, adult, description in buildslist:
if not SHOWADULT == 'true' and adult.lower() == 'yes': continue
addFile("[%s] %s v%s" % (kodi, name, version), 'installthird', name, url, icon=icon, fanart=fanart, description=description, themeit=THEME2)
else:
for name, url, icon, fanart, description in buildslist:
addFile(name, 'installthird', name, url, icon=icon, fanart=fanart, description=description, themeit=THEME2)
def editThirdParty(number):
name = eval('THIRD%sNAME' % number)
url = eval('THIRD%sURL' % number)
name2 = wiz.getKeyboard(name, 'Enter the Name of the Wizard')
url2 = wiz.getKeyboard(url, 'Enter the URL of the Wizard Text')
wiz.setS('wizard%sname' % number, name2)
wiz.setS('wizard%surl' % number, url2)
def apkScraper(name=""):
if name == 'kodi':
kodiurl1 = 'http://mirrors.kodi.tv/releases/android/arm/'
kodiurl2 = 'http://mirrors.kodi.tv/releases/android/arm/old/'
url1 = wiz.openURL(kodiurl1).replace('\n', '').replace('\r', '').replace('\t', '')
url2 = wiz.openURL(kodiurl2).replace('\n', '').replace('\r', '').replace('\t', '')
x = 0
match1 = re.compile('<tr><td><a href="(.+?)".+?>(.+?)</a></td><td>(.+?)</td><td>(.+?)</td></tr>').findall(url1)
match2 = re.compile('<tr><td><a href="(.+?)".+?>(.+?)</a></td><td>(.+?)</td><td>(.+?)</td></tr>').findall(url2)
addFile("Official Kodi Apk\'s", themeit=THEME1)
rc = False
for url, name, size, date in match1:
if url in ['../', 'old/']: continue
if not url.endswith('.apk'): continue
if not url.find('_') == -1 and rc == True: continue
try:
tempname = name.split('-')
if not url.find('_') == -1:
rc = True
name2, v2 = tempname[2].split('_')
else:
name2 = tempname[2]
v2 = ''
title = "[COLOR %s]%s v%s%s %s[/COLOR] [COLOR %s]%s[/COLOR] [COLOR %s]%s[/COLOR]" % (COLOR1, tempname[0].title(), tempname[1], v2.upper(), name2, COLOR2, size.replace(' ', ''), COLOR1, date)
download = urljoin(kodiurl1, url)
addFile(title, 'apkinstall', "%s v%s%s %s" % (tempname[0].title(), tempname[1], v2.upper(), name2), download)
x += 1
except:
wiz.log("Error on: %s" % name)
for url, name, size, date in match2:
if url in ['../', 'old/']: continue
if not url.endswith('.apk'): continue
if not url.find('_') == -1: continue
try:
tempname = name.split('-')
title = "[COLOR %s]%s v%s %s[/COLOR] [COLOR %s]%s[/COLOR] [COLOR %s]%s[/COLOR]" % (COLOR1, tempname[0].title(), tempname[1], tempname[2], COLOR2, size.replace(' ', ''), COLOR1, date)
download = urljoin(kodiurl2, url)
addFile(title, 'apkinstall', "%s v%s %s" % (tempname[0].title(), tempname[1], tempname[2]), download)
x += 1
except:
wiz.log("Error on: %s" % name)
if x == 0: addFile("Error Kodi Scraper Is Currently Down.")
def apkMenu(name=None, url=None):
if url == None:
addDir ('Official Kodi Apk\'s', 'apkscrape', 'kodi', icon=ICONAPK, themeit=THEME1)
if HIDESPACERS == 'No': addFile(wiz.sep(), '', themeit=THEME3)
if not APKFILE == 'http://':
if url == None:
TEMPAPKFILE = wiz.textCache(uservar.APKFILE)
if TEMPAPKFILE == False: APKWORKING = wiz.workingURL(uservar.APKFILE)
else:
TEMPAPKFILE = wiz.textCache(url)
if TEMPAPKFILE == False: APKWORKING = wiz.workingURL(url)
if not TEMPAPKFILE == False:
link = TEMPAPKFILE.replace('\n','').replace('\r','').replace('\t','')
match = re.compile('name="(.+?)".+?ection="(.+?)".+?rl="(.+?)".+?con="(.+?)".+?anart="(.+?)".+?dult="(.+?)".+?escription="(.+?)"').findall(link)
if len(match) > 0:
x = 0
for aname, section, url, icon, fanart, adult, description in match:
if not SHOWADULT == 'true' and adult.lower() == 'yes': continue
if section.lower() == 'yes':
x += 1
addDir ("[B]%s[/B]" % aname, 'apk', aname, url, description=description, icon=icon, fanart=fanart, themeit=THEME3)
elif section.lower() == 'yes':
x += 1
# addFile(aname, 'rominstall', aname, url, description=description, icon=icon, fanart=fanart, themeit=THEME2)
else:
x += 1
addFile(aname, 'apkinstall', aname, url, description=description, icon=icon, fanart=fanart, themeit=THEME2)
if x == 0:
addFile("No addons adde0d to this menu yet!", '', themeit=THEME2)
else: wiz.log("[APK Menu] ERROR: Invalid Format.", xbmc.LOGERROR)
else:
wiz.log("[APK Menu] ERROR: URL for apk list not working.", xbmc.LOGERROR)
addFile('Url for txt file not valid', '', themeit=THEME3)
addFile('%s' % APKWORKING, '', themeit=THEME3)
return
else: wiz.log("[APK Menu] No APK list added.")
setView('files', 'viewType')
def addonMenu(name=None, url=None):
if not ADDONFILE == 'http://':
if url == None:
TEMPADDONFILE = wiz.textCache(uservar.ADDONFILE)
if TEMPADDONFILE == False: ADDONWORKING = wiz.workingURL(uservar.ADDONFILE)
else:
TEMPADDONFILE = wiz.textCache(url)
if TEMPADDONFILE == False: ADDONWORKING = wiz.workingURL(url)
if not TEMPADDONFILE == False:
link = TEMPADDONFILE.replace('\n','').replace('\r','').replace('\t','').replace('repository=""', 'repository="none"').replace('repositoryurl=""', 'repositoryurl="http://"').replace('repositoryxml=""', 'repositoryxml="http://"')
match = re.compile('name="(.+?)".+?lugin="(.+?)".+?rl="(.+?)".+?epository="(.+?)".+?epositoryxml="(.+?)".+?epositoryurl="(.+?)".+?con="(.+?)".+?anart="(.+?)".+?dult="(.+?)".+?escription="(.+?)"').findall(link)
if len(match) > 0:
x = 0
for aname, plugin, aurl, repository, repositoryxml, repositoryurl, icon, fanart, adult, description in match:
if plugin.lower() == 'section':
x += 1
addDir ("[B]%s[/B]" % aname, 'addons', aname, aurl, description=description, icon=icon, fanart=fanart, themeit=THEME3)
elif plugin.lower() == 'skin':
if not SHOWADULT == 'true' and adult.lower() == 'yes': continue
x += 1
addFile("[B]%s[/B]" % aname, 'skinpack', aname, aurl, description=description, icon=icon, fanart=fanart, themeit=THEME2)
elif plugin.lower() == 'pack':
if not SHOWADULT == 'true' and adult.lower() == 'yes': continue
x += 1
addFile("[B]%s[/B]" % aname, 'addonpack', aname, aurl, description=description, icon=icon, fanart=fanart, themeit=THEME2)
else:
if not SHOWADULT == 'true' and adult.lower() == 'yes': continue
try:
add = xbmcaddon.Addon(id=plugin).getAddonInfo('path')
if os.path.exists(add):
aname = "[COLOR springgreen][Installed][/COLOR] %s" % aname
except:
pass
x += 1
addFile(aname, 'addoninstall', plugin, url, description=description, icon=icon, fanart=fanart, themeit=THEME2)
if x < 1:
addFile("No addons added to this menu yet!", '', themeit=THEME2)
else:
addFile('Text File not formated correctly!', '', themeit=THEME3)
wiz.log("[Addon Menu] ERROR: Invalid Format.")
else:
wiz.log("[Addon Menu] ERROR: URL for Addon list not working.")
addFile('Url for txt file not valid', '', themeit=THEME3)
addFile('%s' % ADDONWORKING, '', themeit=THEME3)
else: wiz.log("[Addon Menu] No Addon list added.")
setView('files', 'viewType')
def packInstaller(name, url):
if not wiz.workingURL(url) == True: wiz.LogNotify("[COLOR %s]Addon Installer[/COLOR]" % COLOR1, '[COLOR %s]%s:[/COLOR] [COLOR %s]Invalid Zip Url![/COLOR]' % (COLOR1, name, COLOR2)); return
if not os.path.exists(PACKAGES): os.makedirs(PACKAGES)
DP.create(ADDONTITLE,'[COLOR %s][B]Downloading:[/B][/COLOR] [COLOR %s]%s[/COLOR]' % (COLOR2, COLOR1, name), '', '[COLOR %s]Please Wait[/COLOR]' % COLOR2)
urlsplits = url.split('/')
lib = xbmc.makeLegalFilename(os.path.join(PACKAGES, urlsplits[-1]))
try: os.remove(lib)
except: pass
downloader.download(url, lib, DP)
title = '[COLOR %s][B]Installing:[/B][/COLOR] [COLOR %s]%s[/COLOR]' % (COLOR2, COLOR1, name)
DP.update(0, title,'', '[COLOR %s]Please Wait[/COLOR]' % COLOR2)
percent, errors, error = extract.all(lib,ADDONS,DP, title=title)
installed = grabAddons(lib)
if KODIV >= 17: wiz.addonDatabase(installed, 1, True)
DP.close()
wiz.LogNotify("[COLOR %s]Addon Installer[/COLOR]" % COLOR1, '[COLOR %s]%s: Installed![/COLOR]' % (COLOR2, name))
wiz.ebi('UpdateAddonRepos()')
wiz.ebi('UpdateLocalAddons()')
wiz.refresh()
def skinInstaller(name, url):
if not wiz.workingURL(url) == True: wiz.LogNotify("[COLOR %s]Addon Installer[/COLOR]" % COLOR1, '[COLOR %s]%s:[/COLOR] [COLOR %s]Invalid Zip Url![/COLOR]' % (COLOR1, name, COLOR2)); return
if not os.path.exists(PACKAGES): os.makedirs(PACKAGES)
DP.create(ADDONTITLE,'[COLOR %s][B]Downloading:[/B][/COLOR] [COLOR %s]%s[/COLOR]' % (COLOR2, COLOR1, name), '', '[COLOR %s]Please Wait[/COLOR]' % COLOR2)
urlsplits = url.split('/')
lib = xbmc.makeLegalFilename(os.path.join(PACKAGES, urlsplits[-1]))
try: os.remove(lib)
except: pass
downloader.download(url, lib, DP)
title = '[COLOR %s][B]Installing:[/B][/COLOR] [COLOR %s]%s[/COLOR]' % (COLOR2, COLOR1, name)
DP.update(0, title,'', '[COLOR %s]Please Wait[/COLOR]' % COLOR2)
percent, errors, error = extract.all(lib,HOME,DP, title=title)
installed = grabAddons(lib)
if KODIV >= 17: wiz.addonDatabase(installed, 1, True)
DP.close()
wiz.LogNotify("[COLOR %s]Addon Installer[/COLOR]" % COLOR1, '[COLOR %s]%s: Installed![/COLOR]' % (COLOR2, name))
wiz.ebi('UpdateAddonRepos()')
wiz.ebi('UpdateLocalAddons()')
for item in installed:
if item.startswith('skin.') == True and not item == 'skin.shortcuts':
if not BUILDNAME == '' and DEFAULTIGNORE == 'true': wiz.setS('defaultskinignore', 'true')
wiz.swapSkins(item, 'Skin Installer')
wiz.refresh()
def addonInstaller(plugin, url):
if not ADDONFILE == 'http://':
if url == None: url = ADDONFILE
ADDONWORKING = wiz.workingURL(url)
if ADDONWORKING == True:
link = wiz.textCache(url).replace('\n','').replace('\r','').replace('\t','').replace('repository=""', 'repository="none"').replace('repositoryurl=""', 'repositoryurl="http://"').replace('repositoryxml=""', 'repositoryxml="http://"')
match = re.compile('name="(.+?)".+?lugin="%s".+?rl="(.+?)".+?epository="(.+?)".+?epositoryxml="(.+?)".+?epositoryurl="(.+?)".+?con="(.+?)".+?anart="(.+?)".+?dult="(.+?)".+?escription="(.+?)"' % plugin).findall(link)
if len(match) > 0:
for name, url, repository, repositoryxml, repositoryurl, icon, fanart, adult, description in match:
if os.path.exists(os.path.join(ADDONS, plugin)):
do = ['Launch Addon', 'Remove Addon']
selected = DIALOG.select("[COLOR %s]Addon already installed what would you like to do?[/COLOR]" % COLOR2, do)
if selected == 0:
wiz.ebi('RunAddon(%s)' % plugin)
xbmc.sleep(500)
return True
elif selected == 1:
wiz.cleanHouse(os.path.join(ADDONS, plugin))
try: wiz.removeFolder(os.path.join(ADDONS, plugin))
except: pass
if DIALOG.yesno(ADDONTITLE, "[COLOR %s]Would you like to remove the addon_data for:" % COLOR2, "[COLOR %s]%s[/COLOR]?[/COLOR]" % (COLOR1, plugin), yeslabel="[B][COLOR springgreen]Yes Remove[/COLOR][/B]", nolabel="[B][COLOR red]No Skip[/COLOR][/B]"):
removeAddonData(plugin)
wiz.refresh()
return True
else:
return False
repo = os.path.join(ADDONS, repository)
if not repository.lower() == 'none' and not os.path.exists(repo):
wiz.log("Repository not installed, installing it")
if DIALOG.yesno(ADDONTITLE, "[COLOR %s]Would you like to install the repository for [COLOR %s]%s[/COLOR]:" % (COLOR2, COLOR1, plugin), "[COLOR %s]%s[/COLOR]?[/COLOR]" % (COLOR1, repository), yeslabel="[B][COLOR springgreen]Yes Install[/COLOR][/B]", nolabel="[B][COLOR red]No Skip[/COLOR][/B]"):
ver = wiz.parseDOM(wiz.openURL(repositoryxml), 'addon', ret='version', attrs = {'id': repository})
if len(ver) > 0:
repozip = '%s%s-%s.zip' % (repositoryurl, repository, ver[0])
wiz.log(repozip)
if KODIV >= 17: wiz.addonDatabase(repository, 1)
installAddon(repository, repozip)
wiz.ebi('UpdateAddonRepos()')
#wiz.ebi('UpdateLocalAddons()')
wiz.log("Installing Addon from Kodi")
install = installFromKodi(plugin)
wiz.log("Install from Kodi: %s" % install)
if install:
wiz.refresh()
return True
else:
wiz.log("[Addon Installer] Repository not installed: Unable to grab url! (%s)" % repository)
else: wiz.log("[Addon Installer] Repository for %s not installed: %s" % (plugin, repository))
elif repository.lower() == 'none':
wiz.log("No repository, installing addon")
pluginid = plugin
zipurl = url
installAddon(plugin, url)
wiz.refresh()
return True
else:
wiz.log("Repository installed, installing addon")
install = installFromKodi(plugin, False)
if install:
wiz.refresh()
return True
if os.path.exists(os.path.join(ADDONS, plugin)): return True
ver2 = wiz.parseDOM(wiz.openURL(repositoryxml), 'addon', ret='version', attrs = {'id': plugin})
if len(ver2) > 0:
url = "%s%s-%s.zip" % (url, plugin, ver2[0])
wiz.log(str(url))
if KODIV >= 17: wiz.addonDatabase(plugin, 1)
installAddon(plugin, url)
wiz.refresh()
else:
wiz.log("no match"); return False
else: wiz.log("[Addon Installer] Invalid Format")
else: wiz.log("[Addon Installer] Text File: %s" % ADDONWORKING)
else: wiz.log("[Addon Installer] Not Enabled.")
def installFromKodi(plugin, over=True):
if over == True:
xbmc.sleep(2000)
#wiz.ebi('InstallAddon(%s)' % plugin)
wiz.ebi('RunPlugin(plugin://%s)' % plugin)
if not wiz.whileWindow('yesnodialog'):
return False
xbmc.sleep(500)
if wiz.whileWindow('okdialog'):
return False
wiz.whileWindow('progressdialog')
if os.path.exists(os.path.join(ADDONS, plugin)): return True
else: return False
def installAddon(name, url):
if not wiz.workingURL(url) == True: wiz.LogNotify("[COLOR %s]Addon Installer[/COLOR]" % COLOR1, '[COLOR %s]%s:[/COLOR] [COLOR %s]Invalid Zip Url![/COLOR]' % (COLOR1, name, COLOR2)); return
if not os.path.exists(PACKAGES): os.makedirs(PACKAGES)
DP.create(ADDONTITLE,'[COLOR %s][B]Downloading:[/B][/COLOR] [COLOR %s]%s[/COLOR]' % (COLOR2, COLOR1, name), '', '[COLOR %s]Please Wait[/COLOR]' % COLOR2)
urlsplits = url.split('/')
lib=os.path.join(PACKAGES, urlsplits[-1])
try: os.remove(lib)
except: pass
downloader.download(url, lib, DP)
title = '[COLOR %s][B]Installing:[/B][/COLOR] [COLOR %s]%s[/COLOR]' % (COLOR2, COLOR1, name)
DP.update(0, title,'', '[COLOR %s]Please Wait[/COLOR]' % COLOR2)
percent, errors, error = extract.all(lib,ADDONS,DP, title=title)
DP.update(0, title,'', '[COLOR %s]Installing Dependencies[/COLOR]' % COLOR2)
installed(name)
installlist = grabAddons(lib)
wiz.log(str(installlist))
if KODIV >= 17: wiz.addonDatabase(installlist, 1, True)
installDep(name, DP)
DP.close()
wiz.ebi('UpdateAddonRepos()')
wiz.ebi('UpdateLocalAddons()')
wiz.refresh()
for item in installlist:
if item.startswith('skin.') == True and not item == 'skin.shortcuts':
if not BUILDNAME == '' and DEFAULTIGNORE == 'true': wiz.setS('defaultskinignore', 'true')
wiz.swapSkins(item, 'Skin Installer')
def installDep(name, DP=None):
dep=os.path.join(ADDONS,name,'addon.xml')
if os.path.exists(dep):
source = open(dep,mode='r'); link = source.read(); source.close();
match = wiz.parseDOM(link, 'import', ret='addon')
for depends in match:
if not 'xbmc.python' in depends:
if not DP == None:
DP.update(0, '', '[COLOR %s]%s[/COLOR]' % (COLOR1, depends))
try:
add = xbmcaddon.Addon(id=depends)
name2 = add.getAddonInfo('name')
except:
wiz.createTemp(depends)
if KODIV >= 17: wiz.addonDatabase(depends, 1)
# continue
# dependspath=os.path.join(ADDONS, depends)
# if not os.path.exists(dependspath):
# zipname = '%s-%s.zip' % (depends, match2[match.index(depends)])
# depzip = urljoin("%s%s/" % (MODURL2, depends), zipname)
# if not wiz.workingURL(depzip) == True:
# depzip = urljoin(MODURL, '%s.zip' % depends)
# if not wiz.workingURL(depzip) == True:
# wiz.createTemp(depends)
# if KODIV >= 17: wiz.addonDatabase(depends, 1)
# continue
# lib=os.path.join(PACKAGES, '%s.zip' % depends)
# try: os.remove(lib)
# except: pass
# DP.update(0, '[COLOR %s][B]Downloading Dependency:[/B][/COLOR] [COLOR %s]%s[/COLOR]' % (COLOR2, COLOR1, depends),'', 'Please Wait')
# downloader.download(depzip, lib, DP)
# xbmc.sleep(100)
# title = '[COLOR %s][B]Installing Dependency:[/B][/COLOR] [COLOR %s]%s[/COLOR]' % (COLOR2, COLOR1, depends)
# DP.update(0, title,'', 'Please Wait')
# percent, errors, error = extract.all(lib,ADDONS,DP, title=title)
# if KODIV >= 17: wiz.addonDatabase(depends, 1)
# installed(depends)
# installDep(depends)
# xbmc.sleep(100)
# DP.close()
def installed(addon):
url = os.path.join(ADDONS,addon,'addon.xml')
if os.path.exists(url):
try:
list = open(url,mode='r'); g = list.read(); list.close()
name = wiz.parseDOM(g, 'addon', ret='name', attrs = {'id': addon})
icon = os.path.join(ADDONS,addon,'icon.png')
wiz.LogNotify('[COLOR %s]%s[/COLOR]' % (COLOR1, name[0]), '[COLOR %s]Addon Enabled[/COLOR]' % COLOR2, '2000', icon)
except: pass
def youtubeMenu(name=None, url=None):
if not YOUTUBEFILE == 'http://':
if url == None:
TEMPYOUTUBEFILE = wiz.textCache(uservar.YOUTUBEFILE)
if TEMPYOUTUBEFILE == False: YOUTUBEWORKING = wiz.workingURL(uservar.YOUTUBEFILE)
else:
TEMPYOUTUBEFILE = wiz.textCache(url)
if TEMPYOUTUBEFILE == False: YOUTUBEWORKING = wiz.workingURL(url)
if not TEMPYOUTUBEFILE == False:
link = TEMPYOUTUBEFILE.replace('\n','').replace('\r','').replace('\t','')
match = re.compile('name="(.+?)".+?ection="(.+?)".+?rl="(.+?)".+?con="(.+?)".+?anart="(.+?)".+?escription="(.+?)"').findall(link)
if len(match) > 0:
for name, section, url, icon, fanart, description in match:
if section.lower() == "yes":
addDir ("[B]%s[/B]" % name, 'youtube', name, url, description=description, icon=icon, fanart=fanart, themeit=THEME3)
else:
addFile(name, 'viewVideo', url=url, description=description, icon=icon, fanart=fanart, themeit=THEME2)
else: wiz.log("[YouTube Menu] ERROR: Invalid Format.")
else:
wiz.log("[YouTube Menu] ERROR: URL for YouTube list not working.")
addFile('Url for txt file not valid', '', themeit=THEME3)
addFile('%s' % YOUTUBEWORKING, '', themeit=THEME3)
else: wiz.log("[YouTube Menu] No YouTube list added.")
setView('files', 'viewType')
def maintMenu(view=None):
on = '[B][COLOR springgreen]ON[/COLOR][/B]'; off = '[B][COLOR red]OFF[/COLOR][/B]'
autoclean = 'true' if AUTOCLEANUP == 'true' else 'false'
cache = 'true' if AUTOCACHE == 'true' else 'false'
packages = 'true' if AUTOPACKAGES == 'true' else 'false'
thumbs = 'true' if AUTOTHUMBS == 'true' else 'false'
maint = 'true' if SHOWMAINT == 'true' else 'false'
includevid = 'true' if INCLUDEVIDEO == 'true' else 'false'
includeall = 'true' if INCLUDEALL == 'true' else 'false'
thirdparty = 'true' if THIRDPARTY == 'true' else 'false'
errors = int(errorChecking(count=True))
errorsfound = str(errors) + ' Error(s) Found' if errors > 0 else 'None Found'
wizlogsize = ': [COLOR red]Not Found[/COLOR]' if not os.path.exists(WIZLOG) else ": [COLOR springgreen]%s[/COLOR]" % wiz.convertSize(os.path.getsize(WIZLOG))
if includeall == 'true':
includeplacenta = 'true'
includegaia = 'true'
includeexodusredux = 'true'
includeovereasy = 'true'
includeyoda = 'true'
includescrubs = 'true'
includeseren = 'true'
else:
includeexodusredux = 'true' if INCLUDEEXODUSREDUX == 'true' else 'false'
includeovereasy = 'true' if INCLUDEOVEREASY == 'true' else 'false'
includeplacenta = 'true' if INCLUDEPLACENTA == 'true' else 'false'
includegaia = 'true' if INCLUDEGAIA == 'true' else 'false'
includeyoda = 'true' if INCLUDEYODA == 'true' else 'false'
includescrubs = 'true' if INCLUDESCRUBS == 'true' else 'false'
includeseren = 'true' if INCLUDESEREN == 'true' else 'false'
sizepack = wiz.getSize(PACKAGES)
sizethumb = wiz.getSize(THUMBS)
archive = wiz.getSize(ARCHIVE_CACHE)
sizecache = (wiz.getCacheSize())-archive
totalsize = sizepack+sizethumb+sizecache
feq = ['Always', 'Daily', '3 Days', 'Weekly']
addDir ('[B]Cleaning Tools[/B]' ,'maint', 'clean', icon=ICONMAINT, themeit=THEME1)
if view == "clean" or SHOWMAINT == 'true':
addFile('Total Clean Up: [COLOR springgreen][B]%s[/B][/COLOR]' % wiz.convertSize(totalsize), 'fullclean', icon=ICONMAINT, themeit=THEME3)
addFile('Clear Cache: [COLOR springgreen][B]%s[/B][/COLOR]' % wiz.convertSize(sizecache), 'clearcache', icon=ICONMAINT, themeit=THEME3)
if (xbmc.getCondVisibility('System.HasAddon(script.module.urlresolver)') or xbmc.getCondVisibility('System.HasAddon(script.module.resolveurl)')): addFile('Clear Resolver Function Caches', 'clearfunctioncache', icon=ICONMAINT, themeit=THEME3)
addFile('Clear Packages: [COLOR springgreen][B]%s[/B][/COLOR]' % wiz.convertSize(sizepack), 'clearpackages', icon=ICONMAINT, themeit=THEME3)
addFile('Clear Thumbnails: [COLOR springgreen][B]%s[/B][/COLOR]' % wiz.convertSize(sizethumb), 'clearthumb', icon=ICONMAINT, themeit=THEME3)
if os.path.exists(ARCHIVE_CACHE): addFile('Clear Archive_Cache: [COLOR springgreen][B]%s[/B][/COLOR]' % wiz.convertSize(archive), 'cleararchive', icon=ICONMAINT, themeit=THEME3)
addFile('Clear Old Thumbnails', 'oldThumbs', icon=ICONMAINT, themeit=THEME3)
addFile('Clear Crash Logs', 'clearcrash', icon=ICONMAINT, themeit=THEME3)
addFile('Purge Databases', 'purgedb', icon=ICONMAINT, themeit=THEME3)
addFile('Fresh Start', 'freshstart', icon=ICONMAINT, themeit=THEME3)
addDir ('[B]Addon Tools[/B]', 'maint', 'addon', icon=ICONMAINT, themeit=THEME1)
if view == "addon" or SHOWMAINT == 'true':
addFile('Remove Addons', 'removeaddons', icon=ICONMAINT, themeit=THEME3)
addDir ('Remove Addon Data', 'removeaddondata', icon=ICONMAINT, themeit=THEME3)
addDir ('Enable/Disable Addons', 'enableaddons', icon=ICONMAINT, themeit=THEME3)
addFile('Enable/Disable Adult Addons', 'toggleadult', icon=ICONMAINT, themeit=THEME3)
addFile('Force Update Addons', 'forceupdate', icon=ICONMAINT, themeit=THEME3)
addFile('Hide Passwords On Keyboard Entry', 'hidepassword', icon=ICONMAINT, themeit=THEME3)
addFile('Unhide Passwords On Keyboard Entry', 'unhidepassword', icon=ICONMAINT, themeit=THEME3)
addDir ('[B]Misc Maintenance[/B]' ,'maint', 'misc', icon=ICONMAINT, themeit=THEME1)
if view == "misc" or SHOWMAINT == 'true':
addFile('Kodi 17 Fix', 'kodi17fix', icon=ICONMAINT, themeit=THEME3)
addDir ('Speed Test', 'speedtest', icon=ICONMAINT, themeit=THEME3)
addFile('Enable Unknown Sources', 'unknownsources', icon=ICONMAINT, themeit=THEME3)
addFile('Reload Skin', 'forceskin', icon=ICONMAINT, themeit=THEME3)
addFile('Reload Profile', 'forceprofile', icon=ICONMAINT, themeit=THEME3)
addFile('Force Close Kodi', 'forceclose', icon=ICONMAINT, themeit=THEME3)
addFile('Upload Log File', 'uploadlog', icon=ICONMAINT, themeit=THEME3)
addFile('View Errors in Log: %s' % (errorsfound), 'viewerrorlog', icon=ICONMAINT, themeit=THEME3)
if errors > 0: addFile('View Last Error In Log', 'viewerrorlast', icon=ICONMAINT, themeit=THEME3)
addFile('View Log File', 'viewlog', icon=ICONMAINT, themeit=THEME3)
addFile('View Wizard Log File', 'viewwizlog', icon=ICONMAINT, themeit=THEME3)
addFile('Clear Wizard Log File%s' % wizlogsize,'clearwizlog', icon=ICONMAINT, themeit=THEME3)
addDir ('[B]Back up/Restore[/B]' ,'maint', 'backup', icon=ICONMAINT, themeit=THEME1)
if view == "backup" or SHOWMAINT == 'true':
addFile('Clean Up Back Up Folder', 'clearbackup', icon=ICONMAINT, themeit=THEME3)
addFile('Back Up Location: [COLOR %s]%s[/COLOR]' % (COLOR2, MYBUILDS),'settings', 'Maintenance', icon=ICONMAINT, themeit=THEME3)
#addFile('Extract a ZipFile', 'extractazip', icon=ICONMAINT, themeit=THEME3)
addFile('[Back Up]: Build', 'backupbuild', icon=ICONMAINT, themeit=THEME3)
addFile('[Back Up]: GuiFix', 'backupgui', icon=ICONMAINT, themeit=THEME3)
addFile('[Back Up]: Theme', 'backuptheme', icon=ICONMAINT, themeit=THEME3)
addFile('[Back Up]: Addon Pack', 'backupaddonpack', icon=ICONMAINT, themeit=THEME3)
addFile('[Back Up]: Addon_data', 'backupaddon', icon=ICONMAINT, themeit=THEME3)
addFile('[Restore]: Local Build', 'restorezip', icon=ICONMAINT, themeit=THEME3)
addFile('[Restore]: Local GuiFix', 'restoregui', icon=ICONMAINT, themeit=THEME3)
addFile('[Restore]: Local Addon_data', 'restoreaddon', icon=ICONMAINT, themeit=THEME3)
addFile('[Restore]: External Build', 'restoreextzip', icon=ICONMAINT, themeit=THEME3)
addFile('[Restore]: External GuiFix', 'restoreextgui', icon=ICONMAINT, themeit=THEME3)
addFile('[Restore]: External Addon_data', 'restoreextaddon', icon=ICONMAINT, themeit=THEME3)
addDir ('[B]System Tweaks/Fixes[/B]', 'maint', 'tweaks', icon=ICONMAINT, themeit=THEME1)
if view == "tweaks" or SHOWMAINT == 'true':
if not ADVANCEDFILE == 'http://' and not ADVANCEDFILE == '':
addDir ('Advanced Settings', 'advancedsetting', icon=ICONMAINT, themeit=THEME3)
else:
if os.path.exists(ADVANCED):
addFile('View Current AdvancedSettings.xml', 'currentsettings', icon=ICONMAINT, themeit=THEME3)
addFile('Remove Current AdvancedSettings.xml', 'removeadvanced', icon=ICONMAINT, themeit=THEME3)
addFile('Quick Configure AdvancedSettings.xml', 'autoadvanced', icon=ICONMAINT, themeit=THEME3)
addFile('Scan Sources for broken links', 'checksources', icon=ICONMAINT, themeit=THEME3)
addFile('Scan For Broken Repositories', 'checkrepos', icon=ICONMAINT, themeit=THEME3)
addFile('Fix Addons Not Updating', 'fixaddonupdate', icon=ICONMAINT, themeit=THEME3)
addFile('Remove Non-Ascii filenames', 'asciicheck', icon=ICONMAINT, themeit=THEME3)
addFile('Convert Paths to special', 'convertpath', icon=ICONMAINT, themeit=THEME3)
addDir ('System Information', 'systeminfo', icon=ICONMAINT, themeit=THEME3)
addFile('Show All Maintenance: %s' % maint.replace('true',on).replace('false',off) ,'togglesetting', 'showmaint', icon=ICONMAINT, themeit=THEME2)
addDir ('[I]<< Return to Main Menu[/I]', icon=ICONMAINT, themeit=THEME2)
addFile('Third Party Wizards: %s' % thirdparty.replace('true',on).replace('false',off) ,'togglesetting', 'enable3rd', fanart=FANART, icon=ICONMAINT, themeit=THEME1)
if thirdparty == 'true':
first = THIRD1NAME if not THIRD1NAME == '' else 'Not Set'
secon = THIRD2NAME if not THIRD2NAME == '' else 'Not Set'
third = THIRD3NAME if not THIRD3NAME == '' else 'Not Set'
addFile('Edit Third Party Wizard 1: [COLOR %s]%s[/COLOR]' % (COLOR2, first), 'editthird', '1', icon=ICONMAINT, themeit=THEME3)
addFile('Edit Third Party Wizard 2: [COLOR %s]%s[/COLOR]' % (COLOR2, secon), 'editthird', '2', icon=ICONMAINT, themeit=THEME3)
addFile('Edit Third Party Wizard 3: [COLOR %s]%s[/COLOR]' % (COLOR2, third), 'editthird', '3', icon=ICONMAINT, themeit=THEME3)
addFile('Auto Clean', '', fanart=FANART, icon=ICONMAINT, themeit=THEME1)
addFile('Auto Clean Up On Startup: %s' % autoclean.replace('true',on).replace('false',off) ,'togglesetting', 'autoclean', icon=ICONMAINT, themeit=THEME3)
if autoclean == 'true':
addFile('--- Auto Clean Fequency: [B][COLOR springgreen]%s[/COLOR][/B]' % feq[AUTOFEQ], 'changefeq', icon=ICONMAINT, themeit=THEME3)
addFile('--- Clear Cache on Startup: %s' % cache.replace('true',on).replace('false',off), 'togglesetting', 'clearcache', icon=ICONMAINT, themeit=THEME3)
addFile('--- Clear Packages on Startup: %s' % packages.replace('true',on).replace('false',off), 'togglesetting', 'clearpackages', icon=ICONMAINT, themeit=THEME3)
addFile('--- Clear Old Thumbs on Startup: %s' % thumbs.replace('true',on).replace('false',off), 'togglesetting', 'clearthumbs', icon=ICONMAINT, themeit=THEME3)
addFile('Clear Video Cache', '', fanart=FANART, icon=ICONMAINT, themeit=THEME1)
addFile('Include Video Cache in Clear Cache: %s' % includevid.replace('true',on).replace('false',off), 'togglecache', 'includevideo', icon=ICONMAINT, themeit=THEME3)
if includevid == 'true':
addFile('--- Include All Video Addons: %s' % includeall.replace('true',on).replace('false',off), 'togglecache', 'includeall', icon=ICONMAINT, themeit=THEME3)
if xbmc.getCondVisibility('System.HasAddon(plugin.video.exodusredux)'): addFile('--- Include Exodus Redux: %s' % includeexodusredux.replace('true',on).replace('false',off), 'togglecache', 'includeexodusredux', icon=ICONMAINT, themeit=THEME3)
if xbmc.getCondVisibility('System.HasAddon(plugin.video.gaia)'): addFile('--- Include Gaia: %s' % includegaia.replace('true',on).replace('false',off), 'togglecache', 'includegaia', icon=ICONMAINT, themeit=THEME3)
if xbmc.getCondVisibility('System.HasAddon(plugin.video.overeasy)'): addFile('--- Include Overeasy: %s' % includeovereasy.replace('true',on).replace('false',off), 'togglecache', 'includeovereasy', icon=ICONMAINT, themeit=THEME3)
if xbmc.getCondVisibility('System.HasAddon(plugin.video.placenta)'): addFile('--- Include Placenta: %s' % includeplacenta.replace('true',on).replace('false',off), 'togglecache', 'includeplacenta', icon=ICONMAINT, themeit=THEME3)
if xbmc.getCondVisibility('System.HasAddon(plugin.video.scrubsv2)'): addFile( '--- Include Scrubs v2: %s' % includescrubs.replace('true', on).replace('false', off), 'togglecache', 'includescrubs', icon=ICONMAINT, themeit=THEME3)
if xbmc.getCondVisibility('System.HasAddon(plugin.video.seren)'): addFile('--- Include Seren: %s' % includeseren.replace('true',on).replace('false',off), 'togglecache', 'includeseren', icon=ICONMAINT, themeit=THEME3)
if xbmc.getCondVisibility('System.HasAddon(plugin.video.yoda)'): addFile('--- Include Yoda: %s' % includeyoda.replace('true',on).replace('false',off), 'togglecache', 'includeyoda', icon=ICONMAINT, themeit=THEME3)
addFile('--- Enable All Video Addons', 'togglecache', 'true', icon=ICONMAINT, themeit=THEME3)
addFile('--- Disable All Video Addons', 'togglecache', 'false', icon=ICONMAINT, themeit=THEME3)
setView('files', 'viewType')
#########################################NET TOOLS#############################################
def net_tools(view=None):
addDir ('Speed Tester' ,'speedtestM', icon=ICONAPK, themeit=THEME1)
if HIDESPACERS == 'No': addFile(wiz.sep(), '', themeit=THEME3)
addDir ('View IP Address & MAC Address', 'viewIP', icon=ICONMAINT, themeit=THEME1)
setView('files', 'viewType')
def viewIP():
mac,inter_ip,ip,city,state,country,isp = wiz.net_info()
addFile('[COLOR %s]Mac:[/COLOR] [COLOR %s]%s[/COLOR]' % (COLOR1, COLOR2, mac), '', icon=ICONMAINT, themeit=THEME2)
addFile('[COLOR %s]Internal IP: [COLOR %s]%s[/COLOR]' % (COLOR1, COLOR2, inter_ip), '', icon=ICONMAINT, themeit=THEME2)
addFile('[COLOR %s]External IP:[/COLOR] [COLOR %s]%s[/COLOR]' % (COLOR1, COLOR2, ip), '', icon=ICONMAINT, themeit=THEME2)
addFile('[COLOR %s]City:[/COLOR] [COLOR %s]%s[/COLOR]' % (COLOR1, COLOR2, city), '', icon=ICONMAINT, themeit=THEME2)
addFile('[COLOR %s]State:[/COLOR] [COLOR %s]%s[/COLOR]' % (COLOR1, COLOR2, state), '', icon=ICONMAINT, themeit=THEME2)
addFile('[COLOR %s]Country:[/COLOR] [COLOR %s]%s[/COLOR]' % (COLOR1, COLOR2, country), '', icon=ICONMAINT, themeit=THEME2)
addFile('[COLOR %s]ISP:[/COLOR] [COLOR %s]%s[/COLOR]' % (COLOR1, COLOR2, isp), '', icon=ICONMAINT, themeit=THEME2)
setView('files', 'viewType')
def speedTest():
addFile('Run Speed Test', 'runspeedtest', icon=ICONMAINT, themeit=THEME3)
if os.path.exists(SPEEDTESTFOLD):
speedimg = glob.glob(os.path.join(SPEEDTESTFOLD, '*.png'))
speedimg.sort(key=lambda f: os.path.getmtime(f), reverse=True)
if len(speedimg) > 0:
addFile('Clear Results', 'clearspeedtest', icon=ICONMAINT, themeit=THEME3)
addFile(wiz.sep('Previous Runs'), '', icon=ICONMAINT, themeit=THEME3)
for item in speedimg:
created = datetime.fromtimestamp(os.path.getmtime(item)).strftime('%m/%d/%Y %H:%M:%S')
img = item.replace(os.path.join(SPEEDTESTFOLD, ''), '')
addFile('[B]%s[/B]: [I]Ran %s[/I]' % (img, created), 'viewspeedtest', img, icon=ICONMAINT, themeit=THEME3)
def clearSpeedTest():
speedimg = glob.glob(os.path.join(SPEEDTESTFOLD, '*.png'))
for file in speedimg:
wiz.removeFile(file)
def viewSpeedTest(img=None):
img = os.path.join(SPEEDTESTFOLD, img)
notify.speedTest(img)
def runSpeedTest():
try:
found = speedtest.speedtest()
if not os.path.exists(SPEEDTESTFOLD): os.makedirs(SPEEDTESTFOLD)
urlsplits = found[0].split('/')
dest = os.path.join(SPEEDTESTFOLD, urlsplits[-1])
urllib.urlretrieve(found[0], dest)
viewSpeedTest(urlsplits[-1])
except:
wiz.log("[Speed Test] Error Running Speed Test")
pass
def advancedWindow(url=None):
if not ADVANCEDFILE == 'http://':
if url == None:
TEMPADVANCEDFILE = wiz.textCache(uservar.ADVANCEDFILE)
if TEMPADVANCEDFILE == False: ADVANCEDWORKING = wiz.workingURL(uservar.ADVANCEDFILE)
else:
TEMPADVANCEDFILE = wiz.textCache(url)
if TEMPADVANCEDFILE == False: ADVANCEDWORKING = wiz.workingURL(url)
addFile('Quick Configure AdvancedSettings.xml', 'autoadvanced', icon=ICONMAINT, themeit=THEME3)
if os.path.exists(ADVANCED):
addFile('View Current AdvancedSettings.xml', 'currentsettings', icon=ICONMAINT, themeit=THEME3)
addFile('Remove Current AdvancedSettings.xml', 'removeadvanced', icon=ICONMAINT, themeit=THEME3)
if not TEMPADVANCEDFILE == False:
if HIDESPACERS == 'No': addFile(wiz.sep(), '', icon=ICONMAINT, themeit=THEME3)
link = TEMPADVANCEDFILE.replace('\n','').replace('\r','').replace('\t','')
match = re.compile('name="(.+?)".+?ection="(.+?)".+?rl="(.+?)".+?con="(.+?)".+?anart="(.+?)".+?escription="(.+?)"').findall(link)
if len(match) > 0:
for name, section, url, icon, fanart, description in match:
if section.lower() == "yes":
addDir ("[B]%s[/B]" % name, 'advancedsetting', url, description=description, icon=icon, fanart=fanart, themeit=THEME3)
else:
addFile(name, 'writeadvanced', name, url, description=description, icon=icon, fanart=fanart, themeit=THEME2)
else: wiz.log("[Advanced Settings] ERROR: Invalid Format.")
else: wiz.log("[Advanced Settings] URL not working: %s" % ADVANCEDWORKING)
else: wiz.log("[Advanced Settings] not Enabled")
def writeAdvanced(name, url):
ADVANCEDWORKING = wiz.workingURL(url)
if ADVANCEDWORKING == True:
if os.path.exists(ADVANCED): choice = DIALOG.yesno(ADDONTITLE, "[COLOR %s]Would you like to overwrite your current Advanced Settings with [COLOR %s]%s[/COLOR]?[/COLOR]" % (COLOR2, COLOR1, name), yeslabel="[B][COLOR springgreen]Overwrite[/COLOR][/B]", nolabel="[B][COLOR red]Cancel[/COLOR][/B]")
else: choice = DIALOG.yesno(ADDONTITLE, "[COLOR %s]Would you like to download and install [COLOR %s]%s[/COLOR]?[/COLOR]" % (COLOR2, COLOR1, name), yeslabel="[B][COLOR springgreen]Install[/COLOR][/B]", nolabel="[B][COLOR red]Cancel[/COLOR][/B]")
if choice == 1:
file = wiz.openURL(url)
f = open(ADVANCED, 'w');
f.write(file)
f.close()
DIALOG.ok(ADDONTITLE, '[COLOR %s]AdvancedSettings.xml file has been successfully written. Once you click okay it will force close kodi.[/COLOR]' % COLOR2)
wiz.killxbmc(True)
else: wiz.log("[Advanced Settings] install canceled"); wiz.LogNotify('[COLOR %s]%s[/COLOR]' % (COLOR1, ADDONTITLE), "[COLOR %s]Write Cancelled![/COLOR]" % COLOR2); return
else: wiz.log("[Advanced Settings] URL not working: %s" % ADVANCEDWORKING); wiz.LogNotify('[COLOR %s]%s[/COLOR]' % (COLOR1, ADDONTITLE), "[COLOR %s]URL Not Working[/COLOR]" % COLOR2)
def viewAdvanced():
f = open(ADVANCED)
a = f.read().replace('\t', ' ')
wiz.TextBox(ADDONTITLE, a)
f.close()
def removeAdvanced():
if os.path.exists(ADVANCED):
wiz.removeFile(ADVANCED)
else: LogNotify("[COLOR %s]%s[/COLOR]" % (COLOR1, ADDONTITLE), "[COLOR %s]AdvancedSettings.xml not found[/COLOR]")
def showAutoAdvanced():