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

Processing Errors (Alpha Build) #14

Closed
Ablex222 opened this issue Jan 11, 2021 · 14 comments
Closed

Processing Errors (Alpha Build) #14

Ablex222 opened this issue Jan 11, 2021 · 14 comments
Assignees
Labels
bug Something isn't working

Comments

@Ablex222
Copy link

Program now will run, rename, and create the metadata files correctly. However, it does not seem to be stable. When going from one series to another, a error is encountered and the metadata files fail to be generated. Furthermore, it seems the tagger does not seem to work with series that go by multiple names (Ex. Japanese title and English titles differ), even if there is only one possible search result.

image

On a side note, it may be useful to have a series metadata file created in the parent folder of the processed .cbz files, this way programs like Komga will show a description for the work without having to open one of the nested files.

@Inpacchi Inpacchi self-assigned this Jan 12, 2021
@Inpacchi
Copy link
Owner

Can you upload the log file?

@Inpacchi Inpacchi added the bug Something isn't working label Jan 12, 2021
@Ablex222
Copy link
Author

Tried to reproduce the error again to get a clean log. Instead, I believe the problem is that if you try and pull down a file that already exists in the database, it pulls the file, then instead of moving it to the library once processed, deletes it. It worked on other new files that it hadn't seen before.

image

@Inpacchi
Copy link
Owner

Inpacchi commented Jan 12, 2021

Here is how the rename process works:

  1. Find what the file should be renamed to (i.e ******* 001.cbz)
  2. Find if any other files are currently being processed using the newly-found chapter name (******* 001.cbz)
    • Note this word: currently. This part of the application does not account for previously processed files; that is handled by the next part of the application.
  3. If a file IS found, pause processing. If a file IS NOT found, continue processing.
  4. Look in the processed_files table in the database to see if a file has been processed using the manga title and chapter number (******* and 001)
  5. If no results have been found - continue processing. If results were found, determine if an upgrade is necessary.

With that in mind - Manga Tagger is working as intended. It finds that a file (should) have already been processed under the new filename, and since the file that's currently being processed is not an upgrade, it deletes the file. That being said, we are going to want to clear out the processed_files table for you, since you are running an alpha build.

Do you have MongoDB Compass set up on your computer?

@Inpacchi
Copy link
Owner

Also, a couple more things.

  1. May I know what manga series you were downloading when you encountered the first issue? It seems that there isn't a publish date for it on MyAnimeList and I would like to know if there is any other dates or if it's just completely missing. That would let me fix that issue so that part would process without error.
  2. The issue with differing English and Japanese names theoretically should be fixed bc2ddcb; however I won't know for sure until I know what manga you had a problem with.
  3. Do you know if Komga follows a specific format for series metadata? Does it use a ComicInfo.xml file or it's own metadata file?

@Ablex222
Copy link
Author

Ok retested everything on a fresh VM and I am going to try and go down the list.

  1. I see what your saying about how it works. What I was doing was pulling a file and then would move it outside of the library folder after it was processed. Then if I say wanted to pull the same file down again, instead of getting another of the named and tagged files, the new download is just deleted. Does this mean that if the database has a record that a file of the same name has been processed, that another of the same file cannot get tagged with the preexisting information in the database? On the same note, could the database scan the predetermined file location for the presence of the file and if not present, proceed as standard?
  2. ( https://myanimelist.net/manga/21600/G-Maru_Edition?q=(g)%20edition&cat=manga ) is a example.
  3. It appears Komga just a couple days ago released a new version resolving the metadata appearing on a series level.

I was also looking into volume creation and it looks like if the .cbz file has the folders in A-Z order, a unified document can be created. Such that say fileA.cbz has *** 001, *** 002, and *** 003 as separate folders inside of it, the file will open with the chapters in the correct order. Was thinking this may be a easy way to implement a easy volume creation protocol designed purely to just create a single document that every time a new chapter is added, is unzipped, new content added, and rezipped.

@Ablex222
Copy link
Author

Wasn't sure where I could put this, so I will just add this here. Going along with the Komga metadata thing, I found some projects that may be helpful as reference with pulling cover art compatible with Komga at the same time as the metadata.
https://github.com/notdedsec/anicon
https://github.com/Omar-AbdulAzeez/Meine-Manicon/
https://github.com/NicholasDawson/Data-Extractor-for-AniList
At least the first couple are using the Jikan API, but seem to be converting the images to a different form. The third works for Anilist but I am not sure if the dependencies are the same. Since Komga now will pull metadata from the first .cbz for series, all that would be needed is to pull the cover art and a fully automated and pretty solution is within reach. Thank you for all your hard work!

@Ablex222
Copy link
Author

New error. Files that are labeled with "oneshot" cannot be processed since they don't have chapters. May need a workaround to make "oneshot" interpreted as "001"
image

@Inpacchi
Copy link
Owner

To your point 1 - yes, the database keeps a record of all files that Manga Tagger processes. It does this so that it can determine if a "v2" or some other upgrade of the file was downloaded and is being processed. Therefore if an upgrade is determined not necessary, then the new file is just deleted. It does this to prevent duplicates in the library location. I do think it would be a great idea to scan the library location and proceed as standard if the file is not there, so I will proceed with that.

Volume creation is next on my list of features to implement, so thanks for your research into it, I'll definitely be looking into it once I finish refining this 1.1.x-alpha.

Currently working on the oneshot issue, and will use the manga you linked to develop further test cases.

@Inpacchi
Copy link
Owner

Also - G-Maru Edition; what was the filename that Manga Tagger was trying to process? I need to know because another case I had, Peach Girl Next [EN] is different than the MAL name. I won't know how to account for the filename without having what is named as from the source.

@Ablex222
Copy link
Author

From FMD its (G) Edition.

@Ablex222
Copy link
Author

When you do get a chance check out the code here:
https://github.com/Omar-AbdulAzeez/Meine-Manicon/blob/master/manicon.py
I believe line 80-114 is where it pulls the cover image from Jikan API result. I believe if the variables are changed to match those used to store the determined title at the same time of the comicinfo.xml creation, it should be rather straightforward to save image as say "poster.jpg" at the same location as the fully processed files. Probably would need to be adjusted to something though like "if poster.jpg exists at C://Library/***** then return. Else if (syntax to pull/rename) to C://Library/*****. Just thought I would put this out there, since if this is made functional, it would be easier to debug improper naming since the wrong poster would be present.

On a side note, I was wondering if it would be possible to have the opened menu when the .exe is run display the ongoing processed like a CL command? It would make it a little easier to see if its still working or if it is hung on a process.

@Inpacchi
Copy link
Owner

In the settings.json under logger - set the "console" block to true as follows

"logger": { "console": { "enabled": true },

Also, what source from FMD?

@Ablex222
Copy link
Author

Mangadex

@Inpacchi
Copy link
Owner

Fixed series verification in 1d05a2b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants