ComicVine ID lookup
2 posters
Page 1 of 1
ComicVine ID lookup
Hey, can the comicvine id # be passed as an argument to look up the comic for tagging in the cli?
manders2600- Posts : 12
Join date : 2012-12-11
Re: ComicVine ID lookup
Not as yet, but it could be done.
Would you be using the Issue ID? Or the Volume (Series) ID and issue number?
Would you be using the Issue ID? Or the Volume (Series) ID and issue number?
Re: ComicVine ID lookup
ComicTagger wrote:Not as yet, but it could be done.
Would you be using the Issue ID? Or the Volume (Series) ID and issue number?
Awesome, ideally would be able to do both/either.
Edit: Actually, looking at it, it seems like everything needed would be in the issueidentifier.py script, unless I'm missing something. I think I've learned enough python to take a crack at it, if you'd like.
manders2600- Posts : 12
Join date : 2012-12-11
Re: ComicVine ID lookup
Actually, already have it coded, so it will be in the next release.
I've added a command-line option to specify an ID (only the issue ID) and that will override all other existing metadata, so it will actually bypass the issue identifier module altogether. I assume you will be getting the CV issue ID from Mylar?
I've added a command-line option to specify an ID (only the issue ID) and that will override all other existing metadata, so it will actually bypass the issue identifier module altogether. I assume you will be getting the CV issue ID from Mylar?
Re: ComicVine ID lookup
Awesome!
Yep, it'll be passed from Mylar. I had it working with the regular metadata, but needed to do the escaping of special characters, etc, and figured it would be cleaner just to use the ID.
Though, if it bypasses the issueidentifier.py, I assume that would mean it would not be able to match the cover art? My plan had been initially to bypass all but that portion, as a kind of fail-safe, in case Mylar downloaded an incorrect comic, or if a comic was incorrectly named.
Yep, it'll be passed from Mylar. I had it working with the regular metadata, but needed to do the escaping of special characters, etc, and figured it would be cleaner just to use the ID.
Though, if it bypasses the issueidentifier.py, I assume that would mean it would not be able to match the cover art? My plan had been initially to bypass all but that portion, as a kind of fail-safe, in case Mylar downloaded an incorrect comic, or if a comic was incorrectly named.
manders2600- Posts : 12
Join date : 2012-12-11
Re: ComicVine ID lookup
Hmmm.
Well, the main point of the identifier is for cases of files that don't have any info but name and issue number. For example "Avengers 12.cbz" could apply to five different volumes, so the cover comparison is used to reduce the choices. The publication year (if there) is also to eliminate possibilities.
Your use case, as I understand it, is that Mylar knows exactly what issue (by CV id) it wants, but may have downloaded the wrong one, correct? In effect, you want a verification, not really identification. Certainly this is possible, but of course ComicTagger's algorithm isn't perfect either. Still, I guess it could somehow tag questionable ones.
I will have to let this percolate a bit, and will probably not be a priority, but I think this verification is a good thing to implement, eventually. Probably need to add a "verify" function to the IssueIdentifier class that would take the IssueID as a parameter. It would just then do the image comparison. A verify command-line option would also need to be added, and then add a new functional case in the CLI processing in comictagger.py
Just curious, as I'm not using Mylar yet, have you had any downloads of incorrect issues?
Well, the main point of the identifier is for cases of files that don't have any info but name and issue number. For example "Avengers 12.cbz" could apply to five different volumes, so the cover comparison is used to reduce the choices. The publication year (if there) is also to eliminate possibilities.
Your use case, as I understand it, is that Mylar knows exactly what issue (by CV id) it wants, but may have downloaded the wrong one, correct? In effect, you want a verification, not really identification. Certainly this is possible, but of course ComicTagger's algorithm isn't perfect either. Still, I guess it could somehow tag questionable ones.
I will have to let this percolate a bit, and will probably not be a priority, but I think this verification is a good thing to implement, eventually. Probably need to add a "verify" function to the IssueIdentifier class that would take the IssueID as a parameter. It would just then do the image comparison. A verify command-line option would also need to be added, and then add a new functional case in the CLI processing in comictagger.py
Just curious, as I'm not using Mylar yet, have you had any downloads of incorrect issues?
Re: ComicVine ID lookup
Yeah, my idea was to use it as verification, while still inserting the metadata, but creating a little "alert". I haven't looked very hard into the image algorithms, but if I understand the output correctly, they give each cover a "score" and use the highest score as a way to choose between them? My thought was to simply take the output from ComicTagger and designate any score below a certain threshold as a "warning", then pass this to mylar, and have it show up as a notification in mylar. It would still be preferable in this usage case to insert the metadata, since there would probably be a number of false-positives, but it could be helpful to see that there might be an issue. And, of course, I wouldn't be able to add the functionality into Mylar right away, but pretty soon.
As for actually getting incorrect downloads, I am not using Mylar for regular downloading every week just yet, as it's still pretty alpha, but it's getting very close. I have, however, downloaded a number of comics over the years that are incorrectly named (though, I have several hundred thousand comics in my library, so I'm not sure how common it actually is, haha). While I don't think it would be a big factor, I could definitely see the download of a comic that might be incorrect. For example, if a one-shot and a miniseries have the same name, and are published in the same year, there could be an issue, etc. Also, right now, the post-processing features of mylar only act on downloaded nzbs, but the idea for the future is to have it working on any comics in the library (like sickbeard does), which would allow for comics to be processed that might not conform to quite as strict a naming convention, and could very well be incorrect.
Anyway, this part of it was more of a future-proofing thing, though I might just take a stab at it in the next week, if you wouldn't have any objection.
As for actually getting incorrect downloads, I am not using Mylar for regular downloading every week just yet, as it's still pretty alpha, but it's getting very close. I have, however, downloaded a number of comics over the years that are incorrectly named (though, I have several hundred thousand comics in my library, so I'm not sure how common it actually is, haha). While I don't think it would be a big factor, I could definitely see the download of a comic that might be incorrect. For example, if a one-shot and a miniseries have the same name, and are published in the same year, there could be an issue, etc. Also, right now, the post-processing features of mylar only act on downloaded nzbs, but the idea for the future is to have it working on any comics in the library (like sickbeard does), which would allow for comics to be processed that might not conform to quite as strict a naming convention, and could very well be incorrect.
Anyway, this part of it was more of a future-proofing thing, though I might just take a stab at it in the next week, if you wouldn't have any objection.
manders2600- Posts : 12
Join date : 2012-12-11
Re: ComicVine ID lookup
I am not sure I follow completely.
The image comparison is done using a hashing algorithm that produces a 64-bit number for each image. The similarity between 2 images is done by calculating the Hamming distance between to the two hashes. The smaller the distance, the more similar the two images are.
(See this for a good explination: https://www.memonic.com/user/aengus/folder/coding/id/1qVeq )
Before you begin any coding, let's talk about the CLI interface for ComicTagger that you envision. That will help me understand.
I am currently working (very slowly) on the GUI for batch processing, and don't want to manage branches and such, but I think we can get your stuff integrated in for a release that will be a ways down the line.
The image comparison is done using a hashing algorithm that produces a 64-bit number for each image. The similarity between 2 images is done by calculating the Hamming distance between to the two hashes. The smaller the distance, the more similar the two images are.
(See this for a good explination: https://www.memonic.com/user/aengus/folder/coding/id/1qVeq )
Before you begin any coding, let's talk about the CLI interface for ComicTagger that you envision. That will help me understand.
I am currently working (very slowly) on the GUI for batch processing, and don't want to manage branches and such, but I think we can get your stuff integrated in for a release that will be a ways down the line.
Re: ComicVine ID lookup
Hey, sorry for not getting back to you quickly, I had some family issues that came up, and should be around this weekend.
manders2600- Posts : 12
Join date : 2012-12-11
Re: ComicVine ID lookup
Hey there, I reorganized the ComicTagger code and made it possible to use it as a library. Also, kind of cool thing, I added the ability to launch the scripts via the app, even from the the binary versions (since they essentially have the python interpreter inside them). This seems a nice solution for adding the special Mylar connectivity that you want.
Here's a sample script implementing the validation that talked about:
http://code.google.com/p/comictagger/source/browse/trunk/scripts/validate_cover.py
You can just run:
ComicTagger -S validate_cover.py FILE ID
Probably will want to re-work it, but the basics are there.
Hope this helps!
Here's a sample script implementing the validation that talked about:
http://code.google.com/p/comictagger/source/browse/trunk/scripts/validate_cover.py
You can just run:
ComicTagger -S validate_cover.py FILE ID
Probably will want to re-work it, but the basics are there.
Hope this helps!
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|