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

[Feature Request] Autofill Volume title (with fallback) #204

Open
eg-ayoub opened this issue Jan 28, 2024 · 0 comments
Open

[Feature Request] Autofill Volume title (with fallback) #204

eg-ayoub opened this issue Jan 28, 2024 · 0 comments

Comments

@eg-ayoub
Copy link

Is your feature request related to a problem? Please describe.
When starting my manga library I generate CBZ files of Volumes instead of Individual chapters.
This creates a problem for me as Fetch Online doesn't autofill the title field of comicInfo.
That is a problematic in my use case as I rely on the Title field in my calibre library (and calibre has been notoriously bad at fetching my manga metadata).
for now I have used this workaround:

--- a/MangaManager/src/MetadataManager/MetadataManagerGUI.py
+++ b/MangaManager/src/MetadataManager/MetadataManagerGUI.py
@@ -412,6 +412,11 @@ class GUIApp(Tk, MetadataManagerLib):
                         item.has_changes = True
                         any_items_changed = True

+                if item.cinfo_object.series and item.cinfo_object.volume:
+                    item.cinfo_object.title = f"{item.cinfo_object.series} Vol. {item.cinfo_object.volume}"
+                    item.has_changes = True
+                    any_items_changed = True
+
                 if not item.cinfo_object.number:
                     number = parse_number(item.file_name)
                     if number:
@@ -510,4 +515,4 @@ class GUIApp(Tk, MetadataManagerLib):
         self.widget_mngr.clean_widgets()
         self.image_cover_frame.clear()
         self.selected_files_path = list()
-        self.selected_files_treeview.clear()
\ No newline at end of file
+        self.selected_files_treeview.clear()

Describe the solution you'd like
My proposed solution comes in two parts:
1- a title parser that looks into the CBZ filename during Filename Fill
2- a fallback option that uses an f-string (perhaps a configurable pattern) to fill in the title

In this example,

Filename Fill generates

filename = "Vol1: Nobody with Naturally Wavy Hair Can Be That Bad.cbz"
cinfo.title = "Gin Tama Vol. 1 Nobody with Naturally Wavy Hair Can Be That Bad.cbz"

The fallback generates

cinfo.series = "Gin Tama"
cinfo.volume = 1
cinfo.title => "Gin Tama Vol. 1"

Describe alternatives you've considered
A title scraper with a source that provides Title info (google books, amazon, kobo ...) for individual chapters, with the same fallbacks. I realize this alternative is quite far-fetched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant