RoChess / IMDbPlus

IMDb+ scraper for MediaPortal's MovingPictures plugin
4 stars 6 forks source link

UpdateScriptPaths can cause race condition problem #35

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Current process is:

1. Download IMDb+ scraper-script SVN
2. Insert into MovPic database with wrong paths
3. Update paths directly into MovPic

Between step #2 and #3 there seems to be a cache/memory/race-condition issue 
because the database 'scripts' table will contain the right version, but 
MovingPictures ends up using the inserted version with wrong paths.

The 'CheckForUpdate' function @ 
http://code.google.com/p/imdbplus/source/browse/trunk/IMDb%2B/IMDb.cs#598

at line #609 it does step #2 which refers to 'ScraperScriptInstallation' 
function @ 
http://code.google.com/p/imdbplus/source/browse/trunk/IMDb%2B/IMDb.cs#716

It is before line #718 that the 'UpdateScriptPaths' function @ 
http://code.google.com/p/imdbplus/source/browse/trunk/IMDb%2B/IMDb.cs#818 
should be done.

This means the 'UpdateScriptPaths' function has to be rewritten to deal with 
the 'xmlFile' from disk and not MovPic database.

Original issue reported on code.google.com by RoChess....@gmail.com on 27 Jan 2012 at 9:57

GoogleCodeExporter commented 8 years ago
Fixed in r246

Original comment by RoChess....@gmail.com on 31 Jan 2012 at 12:25