Wintermute0110 / plugin.program.AEL.dev

Emulator frontend and app launcher for Kodi
GNU General Public License v2.0
105 stars 36 forks source link

Can't scrape games with TheGamesDB #127

Closed caiotbc closed 3 years ago

caiotbc commented 3 years ago

Hi. I'm setting up a new AEL install and TheGamesDB scraper is not working for me. I usually go for the screenscraper one and it was working fine, but right now their website is down for maintenance so I've tried thegamesdb and it fails to scrape any game. Kodi version is 18.9, OS is Ubuntu 20.04.2, AEL 0.9.9. ROMs have no-intro names, tried with NES and n64, and I have nothing else installed on kodi except AEL and arctic zephyr 2. Here is what the kodi.log says about it: https://pastebin.com/raw/8wMbACc2

I'm sorry if I'm doing something wrong, but it seems like a bug to me. Any help is appreciated.

Wintermute0110 commented 3 years ago

They have made some changes in TheGamesDB API. You have more details here. AEL crashes due to the newly introduced titlescreen field. I think nobody noticed until now because the title screen was introduced in May 2020 but still not many games have it. In other words, AEL only crashes if you scrape a game that has the new field. I will update AEL ASAP.

Wintermute0110 commented 3 years ago

If you want a workaround, edit the file resources/scrap.py, go to line 2183. Change this code:

    asset_name_mapping = {
        'screenshot': ASSET_SNAP_ID,
        'boxart' : ASSET_BOXFRONT_ID,
        'boxartfront': ASSET_BOXFRONT_ID,
        'boxartback': ASSET_BOXBACK_ID,
        'fanart' : ASSET_FANART_ID,
        'clearlogo': ASSET_CLEARLOGO_ID,
        'banner': ASSET_BANNER_ID,
    }

to

    asset_name_mapping = {
        'titlescreen' : ASSET_TITLE_ID,
        'screenshot' : ASSET_SNAP_ID,
        'boxart' : ASSET_BOXFRONT_ID,
        'boxartfront': ASSET_BOXFRONT_ID,
        'boxartback': ASSET_BOXBACK_ID,
        'fanart' : ASSET_FANART_ID,
        'clearlogo': ASSET_CLEARLOGO_ID,
        'banner': ASSET_BANNER_ID,
    }

this should prevent AEL from crashing. However, until I don't make further changes Titles would be disabled for TheGamesDB.

caiotbc commented 3 years ago

Thanks for the fix, working fine now!

Wintermute0110 commented 3 years ago

I will reopen this until fixed officially.