Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 11-22-2021, 05:27 PM   #16
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,904
Karma: 55267620
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by BetterRed View Post
@theducks - post #8 is 'confusing', I suspect it's redundant.

@wiso - what file types does the PI process? Example: can it do flac and mp4.

BR
I just saw it now.
Agreed it is confusing
you want to delete it?
theducks is offline   Reply With Quote
Old 11-22-2021, 05:35 PM   #17
wiso
Enthusiast
wiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it is
 
wiso's Avatar
 
Posts: 33
Karma: 2114
Join Date: Nov 2021
Device: kindle
Quote:
Originally Posted by BetterRed View Post
@theducks - post #8 is 'confusing', I suspect it's redundant.

@wiso - what file types does the PI process? Example: can it do flac and mp4.

BR
Edit: I was thinking on Add more file type extensions so...Realeased Version 1.0.4 with support for this file type extensions (Mp3, M4a, Mp4, Ogg, Flac, Aac, Ac3)

If you have problems with any file type extension post it

P.S: And yes, post #8 is redundant, we can delete now

Last edited by wiso; 11-22-2021 at 06:30 PM.
wiso is offline   Reply With Quote
Advert
Old 11-23-2021, 02:26 AM   #18
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,644
Karma: 26960534
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by wiso View Post
Edit: I was thinking on Add more file type extensions so...Released Version 1.0.4 with support for this file type extensions (Mp3, M4a, Mp4, Ogg, Flac, Aac, Ac3)


BR
BetterRed is offline   Reply With Quote
Old 12-08-2021, 02:59 PM   #19
wiso
Enthusiast
wiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it is
 
wiso's Avatar
 
Posts: 33
Karma: 2114
Join Date: Nov 2021
Device: kindle
# Version 1.0.5 - 2021-12-08
Fixed requirements description.
This plugin needs, calibre 5.0 or newer.

P.S: Question...the upgrade on the download web https://plugins.calibre-ebook.com/ and Calibre repository is done automatical or manual?
wiso is offline   Reply With Quote
Old 12-08-2021, 04:57 PM   #20
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,644
Karma: 26960534
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by wiso View Post
# Version 1.0.5 - 2021-12-08
Fixed requirements description.
This plugin needs, calibre 5.0 or newer.

P.S: Question...the upgrade on the download web https://plugins.calibre-ebook.com/ and Calibre repository is done automatical or manual?
If the PI is in the sticky index here, which this one is, then should do it automatically, every hour on the half hour.

Try removing the version number from the zip file name, it's redundant, what matters is what's in __init__.py.

BR

Last edited by BetterRed; 12-08-2021 at 05:00 PM.
BetterRed is offline   Reply With Quote
Advert
Old 12-13-2021, 10:46 AM   #21
ATimson
Evangelist
ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.
 
ATimson's Avatar
 
Posts: 456
Karma: 1044878
Join Date: Apr 2009
Device: Kindle Paperwhite 4
It would be useful if this also supported the M4B file extension. (The file is the same format as M4A/MP4.)

Does it support audiobooks split across multiple files (e.g. one MP3 per chapter, or a vendor that splits into multiple M4B files based on size)?
ATimson is offline   Reply With Quote
Old 12-13-2021, 04:00 PM   #22
wiso
Enthusiast
wiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it is
 
wiso's Avatar
 
Posts: 33
Karma: 2114
Join Date: Nov 2021
Device: kindle
Quote:
Originally Posted by ATimson View Post
It would be useful if this also supported the M4B file extension. (The file is the same format as M4A/MP4.)

Does it support audiobooks split across multiple files (e.g. one MP3 per chapter, or a vendor that splits into multiple M4B files based on size)?
yes, it supports several audios, as long as they are in the same folder and returns the total duration.

M4b is not supported yet, but i'll try to include it this week.

Thx for your feedback!!

P.S: Version Update
# Version 1.0.6 - 2021-12-13
Added support for (M4b) extension.

Last edited by wiso; 12-13-2021 at 04:51 PM.
wiso is offline   Reply With Quote
Old 12-15-2021, 06:49 AM   #23
silatiw
Member
silatiw began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Oct 2021
Location: Poland
Device: PocketBook Touch 622
I catalog audiobooks in .zip format. Multi-file audiobooks reside in a folder compressed into a .zip file. and then added to the caliber.
Can you make your plugin be able to calculate the duration of the audiobook in such a compressed .zip file?
Is such a challenge possible?

The name of the folder with the .mp3 files <title - author>
The name of the .zip file <title - author.zip>
silatiw is offline   Reply With Quote
Old 12-15-2021, 04:35 PM   #24
wiso
Enthusiast
wiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it is
 
wiso's Avatar
 
Posts: 33
Karma: 2114
Join Date: Nov 2021
Device: kindle
Quote:
Originally Posted by silatiw View Post
I catalog audiobooks in .zip format. Multi-file audiobooks reside in a folder compressed into a .zip file. and then added to the caliber.
Can you make your plugin be able to calculate the duration of the audiobook in such a compressed .zip file?
Is such a challenge possible?

The name of the folder with the .mp3 files <title - author>
The name of the .zip file <title - author.zip>
Thx for your feedback.

I would like the plugin to be able to support compressed files, at least zip and rar without password.

But I don't know when it will be functional, maybe in January, maybe a little later.
wiso is offline   Reply With Quote
Old 12-17-2021, 09:52 AM   #25
silatiw
Member
silatiw began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Oct 2021
Location: Poland
Device: PocketBook Touch 622
Thank you very much for your interest in my topic.
silatiw is offline   Reply With Quote
Old 12-17-2021, 02:17 PM   #26
ATimson
Evangelist
ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.
 
ATimson's Avatar
 
Posts: 456
Karma: 1044878
Join Date: Apr 2009
Device: Kindle Paperwhite 4
Quote:
Originally Posted by wiso View Post
yes, it supports several audios, as long as they are in the same folder and returns the total duration.

M4b is not supported yet, but i'll try to include it this week.

Thx for your feedback!!
Thank *you* for the change!
ATimson is offline   Reply With Quote
Old 01-02-2022, 02:25 PM   #27
wiso
Enthusiast
wiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it is
 
wiso's Avatar
 
Posts: 33
Karma: 2114
Join Date: Nov 2021
Device: kindle
Quote:
Originally Posted by silatiw View Post
I catalog audiobooks in .zip format. Multi-file audiobooks reside in a folder compressed into a .zip file. and then added to the caliber.
Can you make your plugin be able to calculate the duration of the audiobook in such a compressed .zip file?
Is such a challenge possible?

The name of the folder with the .mp3 files <title - author>
The name of the .zip file <title - author.zip>

# Version 1.0.7 - 2022-01-02
Added support for single compressed files (Zip, Rar) without password.
Example mi_book.zip that includes a forlder and files for each chapter
(chapter1.mp3, chapter2.ogg, chapter3.aac ...)

native support for .zip files

we need to install or add a file for rar support
instructions for support of .rar files.

windows:
https://www.rarlab.com/rar_add.htm
Add the file unrar.exe inside the plugin folder like User / AppData / roaming / calibre / plugins / AudioBook_Duration / rarfile / unrar.exe

linux:
install rar and unrar.
example for debian ubuntu.
sudo apt-get install rar
sudo apt-get install unrar

mac:
untested, but should be similiar like linux
install rar and unrar


P.S: I know calibre had support for zip 7z and rar files on calibre.utils, but i can't open rar files only with unrar.dll i need unrar.exe for unrar_tool too :S
(i use unrar_tool to open rar files whithout extract files)
wiso is offline   Reply With Quote
Old 01-02-2022, 03:13 PM   #28
ATimson
Evangelist
ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.ATimson ought to be getting tired of karma fortunes by now.
 
ATimson's Avatar
 
Posts: 456
Karma: 1044878
Join Date: Apr 2009
Device: Kindle Paperwhite 4
It looks like the ZIP support might be trying to get exclusive access to the files?

I keep my Calibre library in my OneDrive folder, so trying to get the duration for a newly-added files. Ones that have completed the sync to OneDrive are fine.

Other apps can read the ZIP files while the sync is still pending. I would expect the plugin to be able to read the duration without requiring exclusive access to the file...

Spoiler:

calibre, version 5.34.0
ERROR: Unhandled exception: <b>PermissionError</b>:[Errno 13] File is open in another process: 'c:\\users\\USERNAME\\onedrive\\documents\\calibre library\\unknown\\age of darkness (3078)\\age of darkness - unknown.zip'

calibre 5.34 [64bit] embedded-python: True is64bit: True
Windows-10-10.0.22000 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.22000')
Python 3.8.5
Windows: ('10', '10.0.22000', '', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 46, 0) && DeDRM (10, 0, 2) && AZW6 Image Merge (1, 0, 0) && Package KFX (from KFX Input) (1, 46, 0) && AudioBook_Duration (1, 0, 7) && Category Tags (0, 1, 3) && Count Pages (1, 11, 1) && GetFileName (0, 1, 1) && Goodreads Sync (1, 15, 1) && KFX metadata reader (from KFX Input) (1, 46, 0) && KFX Input (1, 46, 0) && KePub Metadata Reader (3, 4, 3) && KePub Metadata Writer (3, 4, 3) && KePub Output (3, 5, 3) && KindleUnpack - The Plugin (0, 83, 0)
Traceback (most recent call last):
File "calibre\utils\filenames.py", line 358, in __init__
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'c:\\users\\USERNAME\\onedrive\\documents\\calibre library\\unknown\\age of darkness (3078)\\age of darkness - unknown.zip'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "calibre_plugins.AudioBook_Duration.main", line 240, in update_duration
File "calibre\db\legacy.py", line 581, in set_metadata
File "calibre\db\cache.py", line 75, in call_func_with_lock
File "calibre\db\cache.py", line 1425, in set_metadata
File "calibre\db\cache.py", line 1420, in set_field
File "calibre\db\cache.py", line 1220, in set_field
File "calibre\db\backend.py", line 1595, in windows_check_if_files_in_use
File "calibre\utils\filenames.py", line 382, in __init__
PermissionError: [Errno 13] File is open in another process: 'c:\\users\\USERNAME\\onedrive\\documents\\calibre library\\unknown\\age of darkness (3078)\\age of darkness - unknown.zip'
ATimson is offline   Reply With Quote
Old 01-03-2022, 11:43 AM   #29
silatiw
Member
silatiw began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Oct 2021
Location: Poland
Device: PocketBook Touch 622
Thank you for the new version with .zip file support. The plug works very well.
If I can, I have two small suggestions:
- if the book is longer than 24 hours, the result is presented e.g. 1day 3:22:45, in my opinion it should be 27:22:45
- could you please abbreviate the plugin name under the icon in the caliber menu. There is an 'AudioBook Duration plugin' probably better it will be: 'AudioBook Duration' Then the distance between the icons is smaller.
silatiw is offline   Reply With Quote
Old 01-03-2022, 05:26 PM   #30
wiso
Enthusiast
wiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it iswiso knows what time it is
 
wiso's Avatar
 
Posts: 33
Karma: 2114
Join Date: Nov 2021
Device: kindle
Quote:
Originally Posted by ATimson View Post
It looks like the ZIP support might be trying to get exclusive access to the files?

I keep my Calibre library in my OneDrive folder, so trying to get the duration for a newly-added files. Ones that have completed the sync to OneDrive are fine.

Other apps can read the ZIP files while the sync is still pending. I would expect the plugin to be able to read the duration without requiring exclusive access to the file...

Spoiler:

calibre, version 5.34.0
ERROR: Unhandled exception: <b>PermissionError</b>:[Errno 13] File is open in another process: 'c:\\users\\USERNAME\\onedrive\\documents\\calibre library\\unknown\\age of darkness (3078)\\age of darkness - unknown.zip'

calibre 5.34 [64bit] embedded-python: True is64bit: True
Windows-10-10.0.22000 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.22000')
Python 3.8.5
Windows: ('10', '10.0.22000', '', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (1, 46, 0) && DeDRM (10, 0, 2) && AZW6 Image Merge (1, 0, 0) && Package KFX (from KFX Input) (1, 46, 0) && AudioBook_Duration (1, 0, 7) && Category Tags (0, 1, 3) && Count Pages (1, 11, 1) && GetFileName (0, 1, 1) && Goodreads Sync (1, 15, 1) && KFX metadata reader (from KFX Input) (1, 46, 0) && KFX Input (1, 46, 0) && KePub Metadata Reader (3, 4, 3) && KePub Metadata Writer (3, 4, 3) && KePub Output (3, 5, 3) && KindleUnpack - The Plugin (0, 83, 0)
Traceback (most recent call last):
File "calibre\utils\filenames.py", line 358, in __init__
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'c:\\users\\USERNAME\\onedrive\\documents\\calibre library\\unknown\\age of darkness (3078)\\age of darkness - unknown.zip'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "calibre_plugins.AudioBook_Duration.main", line 240, in update_duration
File "calibre\db\legacy.py", line 581, in set_metadata
File "calibre\db\cache.py", line 75, in call_func_with_lock
File "calibre\db\cache.py", line 1425, in set_metadata
File "calibre\db\cache.py", line 1420, in set_field
File "calibre\db\cache.py", line 1220, in set_field
File "calibre\db\backend.py", line 1595, in windows_check_if_files_in_use
File "calibre\utils\filenames.py", line 382, in __init__
PermissionError: [Errno 13] File is open in another process: 'c:\\users\\USERNAME\\onedrive\\documents\\calibre library\\unknown\\age of darkness (3078)\\age of darkness - unknown.zip'

I think the zip file is not the only one in use.

As seen in these lines, the error comes when trying to update the metadata in caliber (in the metadata.opf file)
Spoiler:

File "caliber_plugins.AudioBook_Duration.main", line 240, in update_duration
File "caliber \ db \ legacy.py", line 581, in set_metadata
File "caliber \ db \ cache.py", line 75, in call_func_with_lock
File "caliber \ db \ cache.py", line 1425, in set_metadata
File "caliber \ db \ cache.py", line 1420, in set_field
File "caliber \ db \ cache.py", line 1220, in set_field
File "caliber \ db \ backend.py", line 1595, in windows_check_if_files_in_use
File "caliber \ utils \ filenames.py", line 382, ​​in __init__

This line
caliber_plugins.AudioBook_Duration.main ", line 240, in update_duration

is the one that tries to write to the metadata.opt file

This line
File "caliber \ db \ legacy.py", line 581, in set_metadata

It's from the caliber library itself that tries to do the set_metadata

Reading a file in use wouldn't be a big problem, but writing to a file in use, I'm not sure how to handle it.

At the moment it is not something that I think I can change in the short term.

Last edited by wiso; 01-03-2022 at 05:32 PM.
wiso is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] Save Virtual Libraries To Column (GUI) chaley Plugins 14 04-04-2021 05:25 AM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 08:03 AM.


MobileRead.com is a privately owned, operated and funded community.