Skip to content
This repository has been archived by the owner on Oct 30, 2022. It is now read-only.

Feature/binaries #139

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 16 additions & 1 deletion resources/libs/gui/build_menu.py
Expand Up @@ -170,6 +170,7 @@ def view_build(self, name):

updatecheck = CONFIG.BUILDNAME == name and version > CONFIG.BUILDVERSION
versioncheck = True if float(CONFIG.KODIV) == float(kodi) else False
infocheck = tools.open_url(info, check=True)
previewcheck = tools.open_url(preview, check=True)
guicheck = tools.open_url(gui, check=True)
themecheck = tools.open_url(themefile, check=True)
Expand Down Expand Up @@ -201,7 +202,21 @@ def view_build(self, name):
if guicheck:
directory.add_file('Apply guiFix', {'mode': 'install', 'action': 'gui', 'name': name}, description=description, fanart=fanart,
icon=icon, themeit=CONFIG.THEME1)


if infocheck:

info_link = tools.open_url(info)
try:
tname, extracted, zipsize, skin, created, programs, video, music, picture, repos, scripts, binaries = check.check_info(info_link.text)

logging.log('{0}'.format(binaries))

if binaries is not 'none':
directory.add_file('Restore Platform-Specific Addons', {'mode': 'restorebinaries'}, description=description, fanart=fanart,
icon=icon, themeit=CONFIG.THEME1)
except:
pass

if themecheck:
directory.add_separator('THEMES', fanart=fanart, icon=icon)

Expand Down
7 changes: 5 additions & 2 deletions resources/libs/wizard.py
Expand Up @@ -174,9 +174,12 @@ def build(self, action, name, over=False):

db.addon_database(CONFIG.ADDON_ID, 1)
db.force_check_updates(over=True)

binarytxt = os.path.join(CONFIG.USERDATA, 'build_binaries.txt')
if os.path.exists(binarytxt):
self.dialog.ok(CONFIG.ADDONTITLE, '[COLOR {0}]The restored build contains platform-specific addons, which will be automatically installed the next time Kodi boots. A number of dialogs may pop up during this process. Cancelling them may cause the restored build to function incorrectly.[/COLOR]'.format(CONFIG.COLOR2))

self.dialog.ok(CONFIG.ADDONTITLE, "[COLOR {0}]To save changes you now need to force close Kodi, Press OK to force close Kodi[/COLOR]".format(CONFIG.COLOR2))
tools.kill_kodi(over=True)
tools.kill_kodi(msg='[COLOR {0}]To save changes, Kodi needs to be force closed. Would you like to continue?[/COLOR]'.format(CONFIG.COLOR2))
else:
from resources.libs.gui import window
window.show_text_box("Viewing Build Install Errors", error)
Expand Down