Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program crashes if a ComicInfo.xml exists in a subfolder #173

Closed
baew opened this issue Feb 1, 2025 · 2 comments · Fixed by #174
Closed

Program crashes if a ComicInfo.xml exists in a subfolder #173

baew opened this issue Feb 1, 2025 · 2 comments · Fixed by #174
Assignees

Comments

@baew
Copy link

baew commented Feb 1, 2025

Describe the bug

If a cbz file has a folder packed with it and a ComicInfo.xml is in this folder and not in the top level then the app crashes.

Command i use:
metron-tagger -omc *.cbz

Result :
Image

  • OS: MAC OS 14.1.2 (23B92)
  • metron-tagger 3.2.0

If you delete the ComicInfo.xml beforehand, everything works perfectly.

Thank you for the app and the effort you have put into it. It is very useful for me.

@bpepple bpepple self-assigned this Feb 1, 2025
@bpepple bpepple added bug Something isn't working and removed bug Something isn't working labels Feb 1, 2025
@bpepple bpepple changed the title MAC OS: Program crashes if a ComicInfo.xml exists in a subfolder Program crashes if a ComicInfo.xml exists in a subfolder Feb 2, 2025
@bpepple
Copy link
Member

bpepple commented Feb 2, 2025

So, possible solutions for this could be:

  1. Skip the file, and log the error to the users ~/.config/metron-tagger.log, and they can decide how they want to fix it (delete the file or move it to it's parent directory).
  2. Read and write the existing metadata file in the subdirectory. This could cause problems with some of the comic servers, since the metadata is expected in the parent directory, and I'm not sure if the comic servers support having it in a subdirectory (tho after talking with the Kavita dev, they at least do).
  3. Read existing existing metadata, and rename it by appending something like _bak, and write a new metadata file to the parent directory.
  4. Move metadata to parent directory, and then write to it.

I'm leaning towards the first option (since it's the easiest), but I'm not sure which is the best route to go, what are your thoughts, @baew?

@baew
Copy link
Author

baew commented Feb 3, 2025

I would also tend towards the first option.
I find it clean and transparent.

@bpepple bpepple linked a pull request Feb 16, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants