Skip to content

Commit e2f1b83

Browse files
Sync code with master branch.
Master branch is now the Python 3 Matrix branch. Also "Fixes scraping ROM metadata using CM. Github issue #146"
1 parent 89b1aba commit e2f1b83

File tree

8 files changed

+25
-293
lines changed

8 files changed

+25
-293
lines changed

addon.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<addon id="plugin.program.advanced.emulator.launcher" name="Advanced Emulator Launcher" version="0.9.11-alpha" provider-name="Wintermute0110">
2+
<addon
3+
id="plugin.program.advanced.emulator.launcher"
4+
name="Advanced Emulator Launcher"
5+
version="0.9.11-alpha"
6+
provider-name="Wintermute0110">
37
<requires>
48
<!--
59
Check main addon versions in https://github.com/xbmc/xbmc/tree/master/addons

changelog.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,16 +150,20 @@ WIP FIX Fix launching of ROMs with Windows network filenames.
150150
See https://forum.kodi.tv/showthread.php?tid=287826&pid=2919639#pid2919639
151151

152152

153-
[B]Advanced Emulator Launcher | version 0.10.1 | xx xxxxxx 2021[/B]
153+
[B]Advanced Emulator Launcher | version 0.10.1 | 04 August 2021[/B]
154154

155155
FIX Fix crash when reading a launcher NFO file when importing a launcher XML file.
156156
Refactored the NFO file functions a bit.
157157
See https://forum.kodi.tv/showthread.php?tid=287826&pid=3045045#pid3045045
158158

159+
FIX Error when scraping metadata.
160+
See https://github.com/Wintermute0110/plugin.program.AEL/issues/146
159161

160-
[B]Advanced Emulator Launcher | version 0.9.11 | xx xxxxxx 2021[/B]
161162

162-
NOTE This version is feature identical to 0.10.1
163+
[B]Advanced Emulator Launcher | version 0.9.11 | 04 August 2021[/B]
164+
165+
NOTE This version is for Python 2 and feature identical to 0.10.1
166+
Main development is in the Python 3 branch.
163167

164168

165169
[B]Advanced Emulator Launcher | version 0.10.0 | 22 June 2021[/B]
@@ -175,7 +179,7 @@ FEATURE Port release 0.9.10 to Python 3.
175179

176180
[B]Advanced Emulator Launcher | version 0.9.10 | 22 June 2021[/B]
177181

178-
NOTE Python 2 version for Leia/Krypon in branch release-0.9.x-python2
182+
NOTE Python 2 version for Leia/Krypton in branch release-0.9.x-python2
179183
Have a look at AML code to ease the conversion.
180184

181185
FEATURE Create file misc.py and refactor utils.py. Copy structure from AML.

resources/main.py

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2864,21 +2864,20 @@ def _command_edit_rom(self, categoryID, launcherID, romID):
28642864
scraper_index = mindex2 - len(common_menu_list)
28652865
scraper_ID = g_scrap_factory.get_metadata_scraper_ID_from_menu_idx(scraper_index)
28662866

2867-
# --- Grab data ---
2868-
object_dic = roms[romID]
2869-
ROM = FileName(roms[romID]['filename'])
2867+
# Prepare data for scraping.
2868+
rom = roms[romID]
2869+
ROM_FN = FileName(rom['filename'])
2870+
if rom['disks']:
2871+
ROM_hash_FN = FileName(ROM_FN.getDir()).pjoin(rom['disks'][0])
2872+
else:
2873+
ROM_hash_FN = ROM_FN
28702874
if categoryID == VCATEGORY_FAVOURITES_ID or categoryID == VCATEGORY_COLLECTIONS_ID:
2871-
platform = roms[romID]['platform']
2875+
platform = rom['platform']
28722876
else:
28732877
platform = self.launchers[launcherID]['platform']
2874-
if roms[romID]['disks']:
2875-
# Multidisc ROM. Take first file of the set.
2876-
ROM_checksums_FN = FileName(ROM.getDir()).pjoin(roms[romID]['disks'][0])
2877-
else:
2878-
ROM_checksums_FN = ROM
28792878
data_dic = {
2880-
'rom_FN' : ROM,
2881-
'rom_checksums_FN' : ROM_checksums_FN,
2879+
'ROM_FN' : ROM_FN,
2880+
'ROM_hash_FN' : ROM_hash_FN,
28822881
'platform' : platform,
28832882
}
28842883

@@ -2890,7 +2889,7 @@ def _command_edit_rom(self, categoryID, launcherID, romID):
28902889
# Remember to flush caches after scraping.
28912890
st_dic = kodi_new_status_dic()
28922891
s_strategy = g_scrap_factory.create_CM_metadata(scraper_ID, platform)
2893-
s_strategy.scrap_CM_metadata_ROM(object_dic, data_dic, st_dic)
2892+
s_strategy.scrap_CM_metadata_ROM(rom, data_dic, st_dic)
28942893
g_scrap_factory.destroy_CM()
28952894
if kodi_display_status_message(st_dic): return
28962895

@@ -3004,9 +3003,7 @@ def _command_edit_rom(self, categoryID, launcherID, romID):
30043003
ROM_hash_FN = FileName(ROM_FN.getDir()).pjoin(rom['disks'][0])
30053004
else:
30063005
ROM_hash_FN = ROM_FN
3007-
if categoryID == VCATEGORY_FAVOURITES_ID:
3008-
platform = rom['platform']
3009-
elif categoryID == VCATEGORY_COLLECTIONS_ID:
3006+
if categoryID == VCATEGORY_FAVOURITES_ID or categoryID == VCATEGORY_COLLECTIONS_ID:
30103007
platform = rom['platform']
30113008
else:
30123009
platform = self.launchers[launcherID]['platform']

tools/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

tools/convert_Fav_XML_to_Fav_JSON.py

Lines changed: 0 additions & 32 deletions
This file was deleted.

tools/convert_Fav_v0_to_Fav_v1.py

Lines changed: 0 additions & 86 deletions
This file was deleted.

tools/read_AL_launchers_XML.py

Lines changed: 0 additions & 93 deletions
This file was deleted.

tools/read_launcher_NFO_files.py

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)