2010-10-26, 00:00
Here is a new preview version. Still work in progress and not the one that should go into the repo. But it would be great if some of you could try it out and leave your comments here. This version is not compatible with the previous ones. If you want to try it out, you have to delete your current "MyGames.db". I am planning to add an automatic db update to the release that will go into the repo. I hope your old db will work with the next release again.
Changes:
This is the new structure of config.xml:
To get this working, just replace PathToRoms and PathToArtwork with your real paths. If you want to add new RomCollections, just copy a complete RomCollection entry and adjust the paths. Also check the platform id that is used by the mobygames scraper. If you are not satisfied with the scraping behaviour you can delete or reorder the scraper elements in RomCollection.
I decided against splitting it up in several files. Some global settings (log level, caching option, use solo-mode, ...) have been moved to settings.xml and are editable via settings ui. Consoles have been removed completely. The name of the RomCollection will be used to fill the Console filter from now on. EmulatorCmd has been split up in emulatorCmd and emulatorParams.
Most things in config.xml should be self explanating and already known from previous versions. New is that RomCollection and FileType have an attribute "id". This is used as a reference from your configuration file to the games and files in MyGames.db. With this you can change the name of a RomCollection without messing up the db. But never change the id without knowing what you do.
The idea behind this new structure is to ship RCB with preconfigured FileTypes, ImagePlacing and Scrapers and let the user (or soon a settings ui) only change some properties in RomCollection.
Changes:
- don't import settings to database anymore: all settings will be read at startup from config.xml
- moved global settings to settings.xml (editable via addons settings ui)
- refactoring of config.xml
- only scrape information of games that are not already in database
- scrapers are now shipped with RCB, you don't have to download them manually
- bugfix (Windows only): launch emulators with whitespaces in path
This is the new structure of config.xml:
Code:
<config>
<RomCollections>
<RomCollection id="1" name="SNES">
<emulatorCmd>C:\Program Files\Emulatoren\zsnesw151\zsnesw.exe</emulatorCmd>
<emulatorParams>-m "%ROM%"</emulatorParams>
<romPath>PathToRoms\*.zip</romPath>
<mediaPath type="boxfront">PathToArtwork\SNES\boxfront\%GAME%.*</mediaPath>
<mediaPath type="boxback">PathToArtwork\SNES\boxback\%GAME%.*</mediaPath>
<mediaPath type="screenshot">PathToArtwork\SNES\screenshot\%GAME%.*</mediaPath>
<mediaPath type="cartridge">PathToArtwork\SNES\cartridge\%GAME%.*</mediaPath>
<searchGameByCRC>True</searchGameByCRC>
<descFilePerGame>True</descFilePerGame>
<imagePlacing>gameinfobig</imagePlacing>
<scraper name="thevideogamedb.com"/>
<scraper name="mobygames.com" platform="15" replaceKeyString=" III, II" replaceValueString=" 3, 2"/>
<scraper name="giantbomb.com" replaceKeyString=" III, II" replaceValueString=" 3, 2"/>
</RomCollection>
<RomCollection id="2" name="Sega 32">
<emulatorCmd>C:\Program Files\Emulatoren\Fusion364\Fusion.exe</emulatorCmd>
<emulatorParams>"%ROM%"</emulatorParams>
<romPath>PathToRoms\*.zip</romPath>
<mediaPath type="boxfront">PathToArtwork\Sega32\boxfront\%GAME%.*</mediaPath>
<mediaPath type="boxback">PathToArtwork\Sega32\boxback\%GAME%.*</mediaPath>
<mediaPath type="screenshot">PathToArtwork\Sega32\screenshot\%GAME%.*</mediaPath>
<mediaPath type="cartridge">PathToArtwork\Sega32\cartridge\%GAME%.*</mediaPath>
<searchGameByCRC>True</searchGameByCRC>
<descFilePerGame>True</descFilePerGame>
<imagePlacing>gameinfobig</imagePlacing>
<scraper name="thevideogamedb.com"/>
<scraper name="mobygames.com" platform="21" replaceKeyString=" III, II" replaceValueString=" 3, 2"/>
<scraper name="giantbomb.com" replaceKeyString=" III, II" replaceValueString=" 3, 2"/>
</RomCollection>
</RomCollections>
<FileTypes>
<FileType id="1" name="boxfront">
<type>image</type>
<parent>game</parent>
</FileType>
<FileType id="2" name="boxback">
<type>image</type>
<parent>game</parent>
</FileType>
<FileType id="3" name="cartridge">
<type>image</type>
<parent>game</parent>
</FileType>
<FileType id="4" name="screenshot">
<type>image</type>
<parent>game</parent>
</FileType>
</FileTypes>
<ImagePlacing>
<fileTypeFor name="gameinfobig">
<fileTypeForGameList>boxfront</fileTypeForGameList>
<fileTypeForGameListSelected>boxfront</fileTypeForGameListSelected>
<fileTypeForMainViewBackground>boxfront</fileTypeForMainViewBackground>
<fileTypeForMainViewGameInfoBig>screenshot</fileTypeForMainViewGameInfoBig>
<fileTypeForGameInfoViewBackground>boxfront</fileTypeForGameInfoViewBackground>
<fileTypeForGameInfoViewGamelist>boxfront</fileTypeForGameInfoViewGamelist>
<fileTypeForGameInfoView1>boxfront</fileTypeForGameInfoView1>
<fileTypeForGameInfoView2>boxback</fileTypeForGameInfoView2>
<fileTypeForGameInfoView3>cartridge</fileTypeForGameInfoView3>
<fileTypeForGameInfoView4>screenshot</fileTypeForGameInfoView4>
</fileTypeFor>
</ImagePlacing>
<Scrapers>
<Site name="thevideogamedb.com">
<Scraper parseInstruction="01 - thevideogamedb.xml" source="http://thevideogamedb.com/API/GameDetail.aspx?apikey=%VGDBAPIKey%&crc=%CRC%"/>
</Site>
<Site name="giantbomb.com">
<Scraper parseInstruction="03.01 - giantbomb - search.xml"
source="http://api.giantbomb.com/search/?api_key=%GIANTBOMBAPIKey%&query=%GAME%&resources=game&format=xml"
returnUrl="true" replaceKeyString="%REPLACEKEYS%" replaceValueString="%REPLACEVALUES%"/>
<Scraper parseInstruction="03.02 - giantbomb - detail.xml" source="1"/>
</Site>
<Site name="mobygames.com">
<Scraper parseInstruction="04.01 - mobygames - gamesearch.xml"
source="http://www.mobygames.com/search/quick?game=%GAME%&p=%PLATFORM%" returnUrl="True" replaceKeyString="%REPLACEKEYS%" replaceValueString="%REPLACEVALUES%"/>
<Scraper parseInstruction="04.02 - mobygames - details.xml" source="1"/>
<Scraper parseInstruction="04.03 - mobygames - coverlink.xml" source="1" returnUrl="True"/>
<Scraper parseInstruction="04.04 - mobygames - coverart.xml" source="2"/>
<Scraper parseInstruction="04.05 - mobygames - screenshotlink.xml" source="1" returnUrl="True"/>
<Scraper parseInstruction="04.06 - mobygames - screenshotoriginallink.xml" source="3" returnUrl="True"/>
<Scraper parseInstruction="04.07 - mobygames - screenshots.xml" source="4"/>
</Site>
</Scrapers>
</config>
I decided against splitting it up in several files. Some global settings (log level, caching option, use solo-mode, ...) have been moved to settings.xml and are editable via settings ui. Consoles have been removed completely. The name of the RomCollection will be used to fill the Console filter from now on. EmulatorCmd has been split up in emulatorCmd and emulatorParams.
Most things in config.xml should be self explanating and already known from previous versions. New is that RomCollection and FileType have an attribute "id". This is used as a reference from your configuration file to the games and files in MyGames.db. With this you can change the name of a RomCollection without messing up the db. But never change the id without knowing what you do.
The idea behind this new structure is to ship RCB with preconfigured FileTypes, ImagePlacing and Scrapers and let the user (or soon a settings ui) only change some properties in RomCollection.