Skip to content

Commit

Permalink
Remove thegamesdb legacy scraper
Browse files Browse the repository at this point in the history
- update unittests
  • Loading branch information
maloep committed Apr 8, 2020
1 parent ad55f00 commit 9099616
Show file tree
Hide file tree
Showing 85 changed files with 416 additions and 3,959 deletions.
9 changes: 4 additions & 5 deletions addon.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="script.games.rom.collection.browser"
version="2.2.3"
version="2.2.4"
name="Rom Collection Browser"
provider-name="bruny, malte">
<requires>
<!-- Require Kodi Krypton or above -->
<import addon="xbmc.addon" version="17.0.0"/>
<!--<import addon="xbmc.gui" version="5.12.0"/>-->
<import addon="xbmc.python" version="2.25.0"/>
<import addon="service.rom.collection.browser" version="1.0.0"/>
<!-- Required for scraping and parsing -->
Expand All @@ -17,9 +16,9 @@
<provides>executable game</provides>
</extension>
<extension point="xbmc.addon.metadata">
<news>2.2.3 (08/2018)
- implement new thegamesdb API
- rename old thegamesdb scraper to legacy.thegamesdb.net
<news>2.2.4 (04/2020)
- change url to thegamesdb API
- remove legacy.thegamesdb.net scraper
</news>
<summary lang="be">Import, browse and launch games in XBMC</summary>
<summary lang="ca">Importa, cerca i arranca jocs en l'XBMC</summary>
Expand Down
4 changes: 3 additions & 1 deletion resources/lib/dbupdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,9 @@ def resolveParseResult(self, result, itemName):
resultValue = u''

try:
resultValue = result[itemName][0].strip()
resultValue = result[itemName][0]
if(isinstance(resultValue, str)):
resultValue = resultValue.strip()

if isinstance(resultValue, str):
resultValue = util.convertToUnicodeString(resultValue)
Expand Down
3 changes: 0 additions & 3 deletions resources/lib/pyscraper/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,14 @@ class AbstractScraper(object):
_instantiated_scrapers = {}

# Mapping between scraper names in the config files and the corresponding scraper classes
#HACK: remove legacy.thegamesdb.net when update process is finished
scrapers = {'thegamesdb.net': 'TheGamesDB_Scraper',
'legacy.thegamesdb.net': 'TheGamesDB_Scraper_Legacy',
'mobygames.com': 'Mobygames_Scraper',
'giantbomb.com': 'GiantBomb_Scraper',
'MAME': 'MAME_Scraper',
'Game-database-info': 'Offline_GDBI_Scraper'}

# Mapping between scraper names in the config files and the corresponding scraper classes
online_scrapers = {'thegamesdb.net': 'TheGamesDB_Scraper',
'legacy.thegamesdb.net': 'TheGamesDB_Scraper_Legacy',
'mobygames.com': 'Mobygames_Scraper',
'giantbomb.com': 'GiantBomb_Scraper'}

Expand Down
2 changes: 1 addition & 1 deletion resources/lib/pyscraper/thegamesdb_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def _parse_image_result(self, images, gameid):
def _parse_lookup_data(self, ids, dict):
results = []

if len(ids) == 0:
if ids is None or len(ids) == 0:
return results

for id in ids:
Expand Down
199 changes: 0 additions & 199 deletions resources/lib/pyscraper/thegamesdb_scraper_legacy.py

This file was deleted.

Loading

0 comments on commit 9099616

Please sign in to comment.