Universal-Rom-Tools / Universal-XML-Scraper

Scraper de Rom
195 stars 46 forks source link

Bin/cue handling #162

Closed paradadf closed 7 years ago

paradadf commented 7 years ago

Hi!

Right now, UXS scrapes both the bin and the cue file, thus the gamelist.xml gets unnecessary large. Recalbox got the bin files "deactivated" in the upcoming 4.1 version (Retropie had the bin extension for psx games removed long ago), so it actually only the cue file (for psx, segacd and pcengine) needs to be scraped. That's the easy way (disregarding bin extensions for those systems at all). The harder wsy would be for UXS to only scrape the bin files ONLY if no corresponding cue file exists.

Universal-Rom-Tools commented 7 years ago

Hi @paradadf

On Recalbox, cue+bin are handle by hidding the bin and scraping the cue. So nothing to do (but only when cue/bin have the same name)

On Retropie it's a little bit more complicated, because some plateform have bin rom, so I can't deactivate them. Need to check if I can use the same sort of "routine" as Recalbox, without the hidding part (just scrape the cue when cue+bin are found)

paradadf commented 7 years ago

I tried to scrape them but the bin files didn't get the hidden tag. You might want to check that again.

sselph commented 7 years ago

The way I did this, if it is helpful, is I first scan a directory for cue files then parse them to find all the files they reference. Then when I do the scrape I skip bin files that are part of a cue but I use the hash value of the bin if I don't find the cue. I do that since the cue is just a list of files so easy for renaming to make the hash not match.

A few issues

morgalion commented 7 years ago

Hello, thank for your great job with this scraper. Why you don't only add .cue in gamelist.xml and not matching .bin. It would work for retropie, no ? If .bin are not included in gamelist.xml, they don't show in emulationstation. Simple temporary solution : i manually exclude .bin files. But it only works if i have matching .cue (normally the case in retropie handling ;) )

Universal-Rom-Tools commented 7 years ago

Unfortunatly I can't put .bin in the exclusion list... Simply because other emulator, work with .bin...

What I do on Recalbox Profil : If I found a Bin file with a matching name with a Cue File, I skip it and put it in Hidden (need to check, because Paradadf say it doesn't work :S )

I need to the same with Retropie Profil, without the "hidden" tag ;)

paradadf commented 7 years ago

That isn't needed on Retropie, as they have excluded .bin for psx (I suppose for segacd and pcengince cd too). And recalbox currently has it only for psx, but I excluded for version 4.1 (soon to be released I've heard). My point is that there is no reason to scrape something you don't need. It makes the the gamelist.xml unnecessarely longer and the boot time increases. What I'm suggesting is to handle it more like sselph is doing it. Don't add the bin files at all if a corresponding cue exists. I would even suggest not to add rhe bin at all for cd based system, even if no cue exists. Because launching a game from the bin will very likely cause sync problems wirh the audio tracks (that's the reason why bin files for those systems were hidden, to force the yser to get/create them).

morgalion commented 7 years ago

Yes .bin are excluded (and so aren't visible) if you put .cue + .bin in your psx rom folder (but only WITHOUT matching in gamelist.xml). BUT if you have some .bin in your gamelist.xml, they are visible, even if es_systems.cfg (emulationstation config file) is configured to exclude .bin for psx. I'm pretty sure gamelist.xml takes priority over the config.

@paradf you're right, i think its better to always generate .cue for .bin based roms, and to not scrap .bin at all (it doesn't make sense to have multiple times the same info, to display only one. and it's better for SS Bandwidth :p )

Universal-Rom-Tools commented 7 years ago

The "Hidden" feature for bin can be "removed" in the Recalbox 4.1, but for now we need it. The function that UXS don't scrape bin when cue is found need to be added ;) But I can't put bin in the excluded extension by default... simply because other emulator work with bin (and they are not CD based...)

paradadf commented 7 years ago

I never suggested to remove the bin extension :P Just to handle it better for cd based systems ;)

sbowler commented 7 years ago

So using your latest scrapper and recalbox it appears all of the bin files got marked as hidden properly as you described. It does seem to kind of bloat the gameslist file and waste time on all of the bin files though. It said it scrapped like 110 files or something like that and I think I have about 15 or so actual cue files for example.

Perhaps it might be worthwhile to add an option or configuration to tell the scrapper to skip bin files.

Universal-Rom-Tools commented 7 years ago

Test the 2.2.0.2 normally it's ok now : https://github.com/Universal-Rom-Tools/Universal-XML-Scraper/releases/tag/2.2.0.2