Skip to content

Commit

Permalink
Update to v0.6
Browse files Browse the repository at this point in the history
xbmc.translatepath -> xbmcvfs.translatepath
  • Loading branch information
zach-morris committed Nov 23, 2022
1 parent bfe8b3d commit 29d93e5
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified LICENSE.txt
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.program.retrobiostool" name="Retro BIOS Tool" version="0.5">
<addon id="plugin.program.retrobiostool" name="Retro BIOS Tool" version="0.6">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
<import addon="script.module.kodi-six"/>
Expand Down
Empty file modified icon.jpg
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified resources/__init__.py
100644 → 100755
Empty file.
Empty file modified resources/settings.xml
100644 → 100755
Empty file.
20 changes: 10 additions & 10 deletions retrobiostool.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def rbt_main():
report_data['firmware_found'][-1] = [False]
xbmc.log(msg='Retro BIOS Tool: Looking for the following bios files %(current_files)s' % {'current_files':', '.join(current_bios_files)}, level=xbmc.LOGDEBUG)
current_addon = xbmcaddon.Addon(id='%(addon_name)s' % {'addon_name':aid})
current_addon_data_folder = py2_decode(xbmc.translatePath(current_addon.getAddonInfo('profile')))
current_addon_data_folder = py2_decode(xbmcvfs.translatePath(current_addon.getAddonInfo('profile')))
current_addon_resources_folder = os.path.join(current_addon_data_folder,'resources')
current_addon_systems_folder = os.path.join(current_addon_resources_folder,'system')
for cbf in current_bios_files:
Expand Down Expand Up @@ -326,7 +326,7 @@ def rbt_main():
#Check folder specific cases
if aid in special_folder_cases_map.keys():
current_addon = xbmcaddon.Addon(id='%(addon_name)s' % {'addon_name':aid})
current_addon_data_folder = py2_decode(xbmc.translatePath(current_addon.getAddonInfo('profile')))
current_addon_data_folder = py2_decode(xbmcvfs.translatePath(current_addon.getAddonInfo('profile')))
current_addon_resources_folder = os.path.join(current_addon_data_folder,'resources')
current_addon_systems_folder = os.path.join(current_addon_resources_folder,'system')
current_bios_folder_fullpaths = [os.path.join(bios_folder,x) for x in special_folder_cases_map[aid]]
Expand Down Expand Up @@ -392,14 +392,14 @@ def rbt_main():
report_item = report_item[:-2]
li = xbmcgui.ListItem(report_item, offscreen=True)
li.setInfo('video', {'plot': report_subitem+'[CR]'+report_data['info_file'][iiaid]})
if xbmcvfs.exists(xbmc.translatePath(os.path.join('special://home','addons',str(aid),'icon.png'))):
li.setArt({ 'icon': xbmc.translatePath(os.path.join('special://home','addons',str(aid),'icon.png'))})
elif xbmcvfs.exists(xbmc.translatePath(os.path.join('special://home','addons',str(aid),'resources','icon.png'))):
li.setArt({ 'icon': xbmc.translatePath(os.path.join('special://home','addons',str(aid),'resources','icon.png'))})
elif xbmcvfs.exists(xbmc.translatePath(os.path.join('special://home','addons',str(aid),'icon.jpg'))):
li.setArt({ 'icon': xbmc.translatePath(os.path.join('special://home','addons',str(aid),'icon.jpg'))})
elif xbmcvfs.exists(xbmc.translatePath(os.path.join('special://home','addons',str(aid),'resources','icon.jpg'))):
li.setArt({ 'icon': xbmc.translatePath(os.path.join('special://home','addons',str(aid),'resources','icon.jpg'))})
if xbmcvfs.exists(xbmcvfs.translatePath(os.path.join('special://home','addons',str(aid),'icon.png'))):
li.setArt({ 'icon': xbmcvfs.translatePath(os.path.join('special://home','addons',str(aid),'icon.png'))})
elif xbmcvfs.exists(xbmcvfs.translatePath(os.path.join('special://home','addons',str(aid),'resources','icon.png'))):
li.setArt({ 'icon': xbmcvfs.translatePath(os.path.join('special://home','addons',str(aid),'resources','icon.png'))})
elif xbmcvfs.exists(xbmcvfs.translatePath(os.path.join('special://home','addons',str(aid),'icon.jpg'))):
li.setArt({ 'icon': xbmcvfs.translatePath(os.path.join('special://home','addons',str(aid),'icon.jpg'))})
elif xbmcvfs.exists(xbmcvfs.translatePath(os.path.join('special://home','addons',str(aid),'resources','icon.jpg'))):
li.setArt({ 'icon': xbmcvfs.translatePath(os.path.join('special://home','addons',str(aid),'resources','icon.jpg'))})
else:
xbmc.log(msg='Retro BIOS Tool: No icon found for %(current_aid)s' % {'current_aid':aid}, level=xbmc.LOGDEBUG)
xbmcplugin.addDirectoryItem(plugin_handle.handle,'',li)
Expand Down

0 comments on commit 29d93e5

Please sign in to comment.