Possible Bug With Rename option

View previous topic View next topic Go down

Possible Bug With Rename option

Post  kev0153 on Wed Feb 13, 2013 11:55 am

It looks like when using the rename option that is striping out the "-" in the series title, example X-Men is renamed to X Men. Any thoughts? Using the latest beta.

Thanks
Kevin

kev0153

Posts : 14
Join date : 2013-01-24

View user profile

Back to top Go down

Re: Possible Bug With Rename option

Post  kev0153 on Wed Feb 13, 2013 1:45 pm

Here is a test file

[link omitted]


Last edited by ComicTagger on Thu Feb 14, 2013 2:03 pm; edited 1 time in total (Reason for editing : Removed link)

kev0153

Posts : 14
Join date : 2013-01-24

View user profile

Back to top Go down

Re: Possible Bug With Rename option

Post  ComicTagger on Thu Feb 14, 2013 2:15 am

A few thoughts:

Assuming you're using the GUI, the file rename uses the selected "Read Style" to get the tag information. The rename dialog shows this in the upper left. If there aren't any tags for that type, it will attempt to parse the existing filename. In the case of your example, it has ComicRack tags, and if you had CBL tags selected, it would end up trying to parse the filename. Is that what was happening to you?

That said, the filename parsing is probably a little overzealous in its removal of hyphens. It's actually been annoying me a bit too, and I just did a fix so that they will be preserved in the series name. The whole parsing process is a lot of guesswork, and I don't think it will ever be perfect, but I think in this case we can get a little closer
avatar
ComicTagger
Admin

Posts : 208
Join date : 2012-12-02

View user profile http://comictagger.forumotion.com

Back to top Go down

Re: Possible Bug With Rename option

Post  kev0153 on Thu Feb 14, 2013 8:14 am

Ah, yeah sorry I should have mentioned that I'm using the CLI. Without digging into the code, how does the program rename the file? Does it just use the existing file name? I do a test run on all my files before I write the info and I see that it scrapes the series name ok. Can't it use the series name while rewriting the file? This is currently how I use comic tagger.

1. First I convert the file to a cbz if required.
2. Scrape info and write the tag in the file
3. Rename the file

Thanks

kev0153

Posts : 14
Join date : 2013-01-24

View user profile

Back to top Go down

Re: Possible Bug With Rename option

Post  ComicTagger on Thu Feb 14, 2013 1:30 pm

If you have the indicated metadata in the in the file, the rename just uses the data in the tags. If there is no metadata, it tries to parse the filename. If you use the -f option, it will try to parse the filename.

You can verify that you have metadata in the file by using the "-p" command to print out all tag blocks.

Can you paste in the the exact commands that you use for your steps 2 and 3?


Last edited by ComicTagger on Thu Feb 14, 2013 2:05 pm; edited 1 time in total
avatar
ComicTagger
Admin

Posts : 208
Join date : 2012-12-02

View user profile http://comictagger.forumotion.com

Back to top Go down

Re: Possible Bug With Rename option

Post  kev0153 on Thu Feb 14, 2013 1:37 pm

Sure, this assumes that I the file has been converted to a .cbz already

Scrape comic info command
comictagger.py -s -t cr -f -o /path/to/comics/*.cbz

rename
comictagger.py -r -t cr -f -o /path/to/comics/*.cbz

I call the two commands back to back in a little shell script.

I think now, after reading your post, that I'm not doing this the most efficient way. I'm guessing I should be able to use the data scrapped to rename the file?

EDIT

Ha I think I just answered my own question by reading the documentation. This command should work better.

ComicTagger -r -t cr *.cbz

basically drop the -f and -o

just tested it and yeah that works. Thanks!

kev0153

Posts : 14
Join date : 2013-01-24

View user profile

Back to top Go down

Re: Possible Bug With Rename option

Post  ComicTagger on Thu Feb 14, 2013 2:02 pm

Cool!

Yeah, the '-o' indicates "look online", and isn't relevant for the rename function.

I was actually wrong in what I said above. You have to explicitly specify '-f' for the rename to try to use the filename!

The next build will fix the removal of the hyphen from the series name in the filename parsing, in the case of renaming without any tags.
avatar
ComicTagger
Admin

Posts : 208
Join date : 2012-12-02

View user profile http://comictagger.forumotion.com

Back to top Go down

Re: Possible Bug With Rename option

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum