Leseratte10 / acsm-calibre-plugin

Calibre plugin for ACSM->EPUB and ACSM->PDF conversion.
https://www.mobileread.com/forums/showthread.php?t=341975
GNU General Public License v3.0
593 stars 23 forks source link

When Calibre thinks book is a duplicate, file is not processed by DeACSM #46

Closed Gwouigwoui closed 1 year ago

Gwouigwoui commented 1 year ago

When I import automatically an ACSM file and a similar ebook exists in the library, Calibre asks if I want to import the book anyway. This somehow prevents the new ACSM from being processed by DeACSM.

Leseratte10 commented 1 year ago

I've just tested that and it's working fine for me.

Do other (non-duplicate) books work for you?

Can you please post a debug log? Right-click the "Preferences" button, choose "Restart in debug mode", then import an ACSM and close Calibre, then post the debug log file that shows up.

Gwouigwoui commented 1 year ago

Here you go! debug.txt

Leseratte10 commented 1 year ago

Okay, the only error message I can see in that log file is this:

Traceback (most recent call last):
  File "calibre\gui2\auto_add.py", line 283, in do_add
FileNotFoundError: [WinError 2] Le fichier spécifié est introuvable: 'F:\\Livres à ajouter automatiquement\\l-enfant.acsm'

Now I don't speak french but that sounds like a "File not found" error from Calibre. No idea why that occurs, but it's most likely not caused by my plugin.

Are you adding the file using the "Add books" button or do you use Drag-and-Drop to add the file?

Gwouigwoui commented 1 year ago

I'm using the watch folder. When I drop a file in there, apparently Calibre checks if there are possible duplicates and ask if I want to proceed if it finds there might be one. When it's an EPUB, no problem, the book appears in my library as expected, but when it's an ACSM the file is moved into its own folder and appears in the library as well, but without being processed by DeACSM, just an ACSM file. Maybe Calibre moves it first so your plugin can't find it anymore in the watch folder? This would explain the error (FileNotFoundError).

Leseratte10 commented 1 year ago

Okay, when I A) use the auto-add folder, and B) I have the "Check for duplicates" option in the auto-add settings enabled, I can reproduce the error, though I'm not sure yet what causes it because the logging isn't working properly for some reason with auto-added books.

As a workaround you could disable the duplicate detection for auto-added books if you always want it to add duplicates. I'll take a look to see if I can fix this bug in my plugin or if it needs to be fixed in Calibre.

Gwouigwoui commented 1 year ago

Ok, thanks!

Le mercredi 25 janvier 2023 à 14:18:29 UTC−5, Florian Bach ***@***.***> a écrit :  

Okay, when I A) use the auto-add folder, and B) I have the "Check for duplicates" option in the auto-add settings enabled, I can reproduce the error, though I'm not sure yet what causes it because the logging isn't working properly for some reason with auto-added books.

As a workaround you could disable the duplicate detection for auto-added books if you always want it to add duplicates. I'll take a look to see if I can fix this bug in my plugin or if it needs to be fixed in Calibre.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Leseratte10 commented 1 year ago

I took a closer look and this seems to be a bug in Calibre, not in my plugin. Looks like nobody has ever used my plugin with the auto-add folder and enabled duplicate detection.

I've reported the bug to the Calibre developers, hoping that they can fix that issue: https://bugs.launchpad.net/calibre/+bug/2003906

Leseratte10 commented 1 year ago

This bug should now be fixed in Calibre, if you set up a development environment you can already test it, otherwise you can wait until the next Calibre update.

Gwouigwoui commented 1 year ago

Excellent, thanks for the follow-up!

Le mardi 31 janvier 2023 à 05:26:15 UTC−5, Florian Bach ***@***.***> a écrit :  

This bug should now be fixed in Calibre, if you set up a development environment you can already test it, otherwise you can wait until the next Calibre update.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Leseratte10 commented 1 year ago

Can you confirm that this is now fixed in Calibre 6.12? Then I can close this issue.

Gwouigwoui commented 1 year ago

Yup, it's all good, thanks again!


De : Florian Bach @.> Envoyé : Friday, February 10, 2023 3:03:23 PM À : Leseratte10/acsm-calibre-plugin @.> Cc : Gwouigwoui @.>; Author @.> Objet : Re: [Leseratte10/acsm-calibre-plugin] When Calibre thinks book is a duplicate, file is not processed by DeACSM (Issue #46)

Can you confirm that this is now fixed in Calibre 6.12? Then I can close this issue.

— Reply to this email directly, view it on GitHubhttps://github.com/Leseratte10/acsm-calibre-plugin/issues/46#issuecomment-1426277351, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADZXBSMUILY4NCG55ZB3DSLWW2NIXANCNFSM6AAAAAAUGVOH2E. You are receiving this because you authored the thread.Message ID: @.***>