2014-06-07, 13:28
Just in case it is of interest I thought I would post a workaround for those wanting thumbnails for their comics - unfortunately the scraper doesn't seem to be downloading these at the moment from Comicvine. As those that have tried may know, the Comicvine scraper does often need the filename to be quite exact to be able to successfully extract the correct info - especially if you're adding comics like Avengers or Batman that have a lot of different volumes.
So, the first thing I did, was to download ComicRack - you need a comic book reader anyway, but this has a few scripts which are useful, so I would go with this one - unfortunately, I think it is Windows only. ComicRack also uses the ComicVine scraper, but one trick you can do is put a txt file in the folder of your comic called cvinfo.txt - in this txt file should be just the url for the comic series you want to scrape. So for instance, for the original 1940 Batman serices, the url is http://www.comicvine.com/batman/4050-796/ - this will ensure that ComicRack scrapes the correct series using the ComicVine scraper.
Once you have done this, added the comics to the ComicRack library and clicked on the ComicVine scraper, you should have all the info in ComicRack. What we then need to do is use this info to change the file names - the easiest way I found to do this was to use the export books function in ComicRack. Select all comics, right click, select Export Books and Export Books again. Under Export Location make sure the drop down box is "Same folder as original Book" - unless of course you want to test it elsewhere. And then tick the Overwrite Existing Book, Delete Original Books and Add Newly Created Books to Library boxes - again unless you want to test it first, which is probably advisable. In the File Naming section, in the drop down list select Book Caption and then put [{format} ][{series}]-[ #{number}]-[ {title}] in the next field - this will put the all important title into the filename along with the issue and series name, so the XBMC scraper can successfully scrape. Click OK and it will go through each book and effectively rename them.
Before going into XBMC the next stage is to create the thumbnails - to do this I needed a script that doesn't come built in to ComicRack but I found it here - in the second post the chap has created a very useful script (ExtractFirstPage_1_1.zip) which needs to be downloaded, extracted and the resulting py file pasted into the script folder where ComicRack is on your PC. For our purposes this PY file needs to be altered slightly in notepad (or similar) and this is explained later on the same thread as the file was downloaded - changing CreateComicName(book) for book.FileName
Now in ComicRack (you may need to restart it) you can select all the comics, right click, select Automation and Extract First Page. You can then select a folder to put the jpegs in - needs to be the thumbnail folder you created when setting up your file launcher in XBMC. The only issue with the resulting jpegs is that in addition to the correct filename they have "pagecover" at the end of the name. There may be a way of altering the extract first page.py file to stop this, but I didn't try to be honest. Instead a used a small program called BulkRenameUtility which can be used to alter filenames in bulk - no kidding!!
There's lots you can do with this program, but the way I use it is select the folder where your jpegs are, select them all and then in the third box marked Repl (3) put PageCover (with a space before the word) in the Replace field and nothing in the With field - this will simply delete the words we don't want. There may be a simpler way of doing this, but I found this to work well.
We can now in XBMC add the comics (ensuring local images is selected for thumbnails and ComicVine for info) and as the filenames are correct the scraper will get the correct info and the matching jpeg images for the thumbnails;
There may be an easier way to do all this - although it's not tricky, but thought it might help a few people.
So, the first thing I did, was to download ComicRack - you need a comic book reader anyway, but this has a few scripts which are useful, so I would go with this one - unfortunately, I think it is Windows only. ComicRack also uses the ComicVine scraper, but one trick you can do is put a txt file in the folder of your comic called cvinfo.txt - in this txt file should be just the url for the comic series you want to scrape. So for instance, for the original 1940 Batman serices, the url is http://www.comicvine.com/batman/4050-796/ - this will ensure that ComicRack scrapes the correct series using the ComicVine scraper.
Once you have done this, added the comics to the ComicRack library and clicked on the ComicVine scraper, you should have all the info in ComicRack. What we then need to do is use this info to change the file names - the easiest way I found to do this was to use the export books function in ComicRack. Select all comics, right click, select Export Books and Export Books again. Under Export Location make sure the drop down box is "Same folder as original Book" - unless of course you want to test it elsewhere. And then tick the Overwrite Existing Book, Delete Original Books and Add Newly Created Books to Library boxes - again unless you want to test it first, which is probably advisable. In the File Naming section, in the drop down list select Book Caption and then put [{format} ][{series}]-[ #{number}]-[ {title}] in the next field - this will put the all important title into the filename along with the issue and series name, so the XBMC scraper can successfully scrape. Click OK and it will go through each book and effectively rename them.
Before going into XBMC the next stage is to create the thumbnails - to do this I needed a script that doesn't come built in to ComicRack but I found it here - in the second post the chap has created a very useful script (ExtractFirstPage_1_1.zip) which needs to be downloaded, extracted and the resulting py file pasted into the script folder where ComicRack is on your PC. For our purposes this PY file needs to be altered slightly in notepad (or similar) and this is explained later on the same thread as the file was downloaded - changing CreateComicName(book) for book.FileName
Now in ComicRack (you may need to restart it) you can select all the comics, right click, select Automation and Extract First Page. You can then select a folder to put the jpegs in - needs to be the thumbnail folder you created when setting up your file launcher in XBMC. The only issue with the resulting jpegs is that in addition to the correct filename they have "pagecover" at the end of the name. There may be a way of altering the extract first page.py file to stop this, but I didn't try to be honest. Instead a used a small program called BulkRenameUtility which can be used to alter filenames in bulk - no kidding!!
There's lots you can do with this program, but the way I use it is select the folder where your jpegs are, select them all and then in the third box marked Repl (3) put PageCover (with a space before the word) in the Replace field and nothing in the With field - this will simply delete the words we don't want. There may be a simpler way of doing this, but I found this to work well.
We can now in XBMC add the comics (ensuring local images is selected for thumbnails and ComicVine for info) and as the filenames are correct the scraper will get the correct info and the matching jpeg images for the thumbnails;
There may be an easier way to do all this - although it's not tricky, but thought it might help a few people.