Wintermute0110 / plugin.program.AEL.dev

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

[Feature request] Add the platforn in the gamedb url query. #14

Closed mac1202 closed 8 years ago

mac1202 commented 8 years ago

Hi just noticed that there is no platform in the query sent to gamedb wich introduce a lot of false result. When the platform is set in the launcher it would be better to add it to the query. For example here :

18:14:17 T:140340707178240   ERROR: AEL DEBUG: Scraper_TheGamesDB::get_search search_string        "Albert Odyssey   Legend of Eldean"
18:14:17 T:140340707178240   ERROR: AEL DEBUG: Scraper_TheGamesDB::get_search rom_base_noext       "Albert Odyssey - Legend of Eldean (USA) (RE)"
18:14:17 T:140340707178240   ERROR: AEL DEBUG: Scraper_TheGamesDB::get_search AEL platform         "Sega Saturn"
18:14:17 T:140340707178240   ERROR: AEL DEBUG: Scraper_TheGamesDB::get_search TheGamesDB platform  ""
18:14:17 T:140340707178240   ERROR: AEL DEBUG: net_get_URL_text() Reading URL "http://thegamesdb.net/api/GetGamesList.php?name=Albert+Odyssey+++Legend+of+Eldean&platform="

If the query is change to "http://thegamesdb.net/api/GetGamesList.php?name=Albert+Odyssey+++Legend+of+Eldean&platform=Sega+Saturn"

the result are way better

Wintermute0110 commented 8 years ago

Thanks for the report. Yeah, scrapers need some work. Will address this issue ASAP.

eggfoo commented 8 years ago

Yup. Scrapper is the cause of the JSON corruption issue b Thanks wintermute. Good work.

Wintermute0110 commented 8 years ago

@eggfoo No. What is causing the corruption is non ascii characters returned by the scraper. Windows and Linux versions of Kodi ship with different Python versions. I did the development in Linux and tested even with Japanese characters. The problem is that current code does not work in Windows Python version.

Wintermute0110 commented 8 years ago

This issue should be fixed in 0.9.2. Enjoy!

mac1202 commented 8 years ago

There's still be a issue for example for front mission 3 and playstation your query this url http://thegamesdb.net/api/GetGamesList.php?name=Front+Mission+3&platform=sony-playstation that return this error The specified platform was not valid. The correct url is http://thegamesdb.net/api/GetGamesList.php?name=Front+Mission+3&platform=sony+playstation I didnt test other platform but they probably need to be fixed too.

Wintermute0110 commented 8 years ago

OK. Will fix ASAP.

Wintermute0110 commented 8 years ago

I got the platform list from the dropbox here http://thegamesdb.net/search/. Do you know where is the platform list?

mac1202 commented 8 years ago

Nope sorry I just found the correct url by testing. I think It must be the same for other platform, replace the "-" by "+" in the query url will porbably work.

Wintermute0110 commented 8 years ago

OK, I changed all the platforms names substituting - by +. Have a look here https://github.com/Wintermute0110/plugin.program.advanced.emulator.launcher/blob/master/resources/scrap_info.py#L194 Please try.

mac1202 commented 8 years ago

Now the url is http://thegamesdb.net/api/GetGamesList.php?name=Front+Mission+3&platform=sony%2Bplaystation

and return an error

Wintermute0110 commented 8 years ago

OK... will revert last commit and change some code in the scraper. Thanks for your tests. I will let you know when's done so you can test again.

Wintermute0110 commented 8 years ago

This time it should be fixed in last commit. I have been testing several platforms and now scraper seems to work OK. Please try last commit.

mac1202 commented 8 years ago

Seems to work for me too. But I have rescraped some of my collection to test, and now It doesn't display any thumb for game. In previous version it automatically set the boxfront as thumb for game. Now i have to manually set it for every games. Did i miss some new option ?

Wintermute0110 commented 8 years ago

In a ROM launcher, in Edit Launcher you can choose which artwork to display for thumbs/fanarts for the ROMs. Currently thumb defaults to Title and fanart to Fanart. In Favourites/Collections you can do the same on a per ROM basis for maximum flexibility.

Soon I will change the default mapping from Thumb -> Title to Thumb -> Boxfront as requested by one skinner.

Since the problem seems to be solved I will close the issue now. If you find any other bug or have a feature request fell free to open a new one.