GithubHelp home page GithubHelp logo

ping / libby-calibre-plugin Goto Github PK

View Code? Open in Web Editor NEW
42.0 2.0 4.0 2.27 MB

OverDrive Libby Plugin for calibre

Home Page: https://www.mobileread.com/forums/showthread.php?t=354816

License: GNU General Public License v3.0

Python 99.56% Shell 0.44%
calibre libby overdrive ebook ebooks magazine magazines

libby-calibre-plugin's People

Contributors

ping avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

libby-calibre-plugin's Issues

Some titles fail to download

Some magazines I've borrowed in Overdrive/Libby will display in the browser, but will not download, except for the cover image and metadata. When I open the containing folder, all that is there is a jpg of the cover. Others are fine. One example is Essential Guide to Landscape Photography. Their format, like that of the ones that download successfully, is listed as "Libby Magazine".

Downloaded book is not recognised as being in library.

Not sure how this plugin determines if a book already exists in the library, but it does not seem to be working for one of my books.
Also it creates a new book which is not what I want it to do.

Scenario.

I start with an empty book in my library database which has the correct author name and title but does not have the ODID identifier.

I borrowed a book (manually from the library website and not using this plugin).

I open this plugin and it shows this book in my loans tab. This is correct as I have option "Exclude empty books when hiding titles already in library" ticked, so this book is not hidden.

I then use this plugin to download the book.

This creates a new book which I do not think is correct as the option 'Always download as a new book' is not ticked.

Also, the book is still not hidden, even after closing the plugin and re-opening it (and if I tried downloading it again, I would end up with a third copy).

Question

I've asked this in mobileforum but I rarely check there so I might forget to check back, better to ask here: if I have a hold, do I still need to go to Libby and borrow the hold first before it appears in the plugin? Does this plugin only automatically download borrowed books?

New Test Version - a9218ce

overdrive-libby-plugin-a9218ce.zip

Changes from previous test version:

  • New: If "Include titles without downloadable formats" is enabled at setup, titles that do not have a downloadable format will be shown (i.e. Kindle, audiobook loans). Also, when such a title is chosen for download, the plugin will now create an empty book.
  • New: Read with Kindle option is available for loans that are available as Kindle books and not already format-locked*
  • New: Custom columns to store borrowed/due dates, and loan type (calibre>=5.35.0)

loans

settings

Error & suggestion

OK finally I got to try the plugin on a release day and here's my report:

  • When a hold can't be borrowed for a reason, the Error pop-up message kept staying in the background and can't be closed. I need to close the plugin and close the Error pop-up message. This means re-opening the plugin and the plugin takes time to do synchronization every time it's re-opened.
  • I encountered an error when I tried to access my hold at first and I don't know what caused it. I would like to send it to you but through private manner cos I believe there's a sensitive info in it. How can I do so, please?
  • It would be great if we could pick which tab is opened at default. I'd like mine to open at 'Holds' every time I open the plugin.
  • It would be great if we could multiple select the titles available in Holds. The ACSM Input (through a report for me) has been modified to be able to handle a lot of acsms at once.
  • It would be great if we could have a checkbox for each title, Select All, and Deselect All button.

Thanks a lot for reading and trying to accommodate these issues.

Unhandled exception - KeyError: primaryColor

Error occurs with a configured plugin after performing a sync. Details are pulled from libby/overdrive as expected.

calibre, version 6.25.0
ERROR: Unhandled exception: KeyError:'primaryColor'

calibre 6.25 embedded-python: True
macOS-11.7.3-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '20.6.0', 'Darwin Kernel Version 20.6.0: Fri Dec 16 00:35:00 PST 2022; root:xnu-7195.141.49~1/RELEASE_X86_64')
Python 3.10.1
OSX: ('11.7.3', ('', '', ''), 'x86_64')
Interface language: None
Successfully initialized third party plugins: ... OverDrive Libby (0, 1, 7) ...
Traceback (most recent call last):
File "calibre_plugins.overdrive_libby.dialog.cards", line 292, in
lambda: self.libby_cards_model_reset(widget_row_pos)
File "calibre_plugins.overdrive_libby.dialog.cards", line 322, in libby_cards_model_reset
card_widget = CardWidget(card, library, self, self.cards_tab_widget)
File "calibre_plugins.overdrive_libby.dialog.cards", line 63, in init
library_card_lbl.setPixmap(self.tab.get_card_pixmap(library))
File "calibre_plugins.overdrive_libby.dialog.base", line 483, in get_card_pixmap
stop1.attrib["stop-color"] = library["settings"]["primaryColor"]["hex"]
KeyError: 'primaryColor'

No reaction from calibre GUI when trying to open OverDrive Libby

Installed the plugin through the GUI, and copied my 8 digit code into the plugin settings. When trying to open the GUI within Calibre, nothing happens.

Reloading Calibre in debug mode gives me a tiny bit of info in the debug log:

Traceback (most recent call last):
  File "/usr/lib64/calibre/calibre/gui2/ui.py", line 223, in initialize
    ac.do_genesis()
  File "/usr/lib64/calibre/calibre/gui2/actions/__init__.py", line 145, in do_genesis
    self.genesis()
  File "calibre_plugins.overdrive_libby.action", line 76, in genesis
    image_resources = get_resources(
                      ^^^^^^^^^^^^^^
TypeError: get_resources() got an unexpected keyword argument 'print_tracebacks_for_missing_resources'
calibre Debug log
calibre 5.43  embedded-python: False is64bit: True
Linux-6.4.14-200.fc38.x86_64-x86_64-with-glibc2.37 Linux ('64bit', 'ELF')
('Linux', '6.4.14-200.fc38.x86_64', '#1 SMP PREEMPT_DYNAMIC Sat Sep  2 16:36:06 UTC 2023')
Python 3.11.5

As you can see, Linux desktop app, Fedora 38, Calibre 5.43.

Am I missing something?

New Test Version - aeacd7d

overdrive-libby-plugin-aeacd7d.zip

Changes from last release:

  • New: Advance search mode
  • New: Simple filter for titles and names in the Loans/Holds/Magazines/Cards tabs
  • New: Copy the Libby share link for a book
  • New: Verify a card
  • Improve: Display linked identifiers, subjects in Book Details
  • Improve: Infrequently changed data like libraries are now cached to give sync a small speed bump
  • Improve: Card image in cards tab is not fuzzy anymore
  • Fix: Borrowing with a card that has no lending period preference
  • Fix: Display of rating in book details
  • Fix: Properly update empty book without any identifiers (ref #8)
  • Fix: Duplicate condition when finding a book in calibre library

advanced_search

AudioBook downloads creates ebook with non-audio overdrive link

Not a major issue, but I borrowed an audiobook from libby and used this plugin to create an empty book in calibre.

This created a tag which makes the overdrive plugin think that a ebook rather than audiobook is available - e.g.

odid:[email protected]

which I think should really be

odid:8970031#librariesniuk.overdrive.com

The book in question was https://librariesniuk.overdrive.com/media/8970031 or https://share.libbyapp.com/title/8970031

Title column in Holds tab

Title column in Holds tab is very small, can't be resized however I tried. Unlike the Title column in Borrowed tab which is quite ample. Let me know if you need a screenshot?

Retrieve Overdrive Wishlist or Libby Tags book lists

I would like to be able to view books in my Overdrive wishlist (overdrive.com/[library_id]/content/account/lists/wishlist) or my Libby app tags (https://libbyapp.com/shelf/tag/[tag_name]). I like to search books on my library's overdrive or libby interface, since they have nice filtering capabilities and I like to use the wishlist or tags to save books for later reading. While I understand it is possible to load available holds from the interface, my library limits the number of holds I can have (justifiably), and there are many books on my wishlist which are available and I would like to be able to loan multiple at one time.

This plugin has already been an amazing quality of life improvement for working with Overdrive libraries and Calibre. Depending on the complexity, I would probably be willing to help develop this as a feature since I'm a final year eng/comp sci undergrad and developer.

New Test Version - 7fc49ba

overdrive-libby-plugin-7fc49ba.zip

Changes from last release:

  • New: Search tab that provides a basic search function across your libraries
  • New: Cards tab that gives an overview of your linked cards
  • New: Display number of available holds in the Holds tab text
  • New: Last used tab will be opened by default
  • New: Disable borrow button if limits for the card has been reached
  • New: Compatible with calibre 5.34.0 and newer
  • Improvement: Display hold wait information in status bar
  • Improvement: Try to reduce the amount of sensitive data logged
  • Improvement: Handle unexpected errors explicitly so that errors popups don't end up behind plugin UI
  • Fix: Holds view default sort
  • Fix: Display of loans that are due soon

cards

search

settings

TypeError: None is not a unicode string

calibre, version 6.25.0
ERROR: Unhandled exception: <b>TypeError</b>:None is not a unicode string

calibre 6.25  embedded-python: True
Windows-10-10.0.19045-SP0 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19045')
Python 3.10.1
Windows: ('10', '10.0.19045', 'SP0', 'Multiprocessor Free')
Interface language: None
Successfully initialized third party plugins: ACSM Input (0, 1, 0) && DeDRM (10, 0, 3) && ACSM Input Plugin GUI Extension (0, 1, 0) && KindleUnpack - The Plugin (0, 83, 1) && Modify ePub (1, 8, 1) && OverDrive Libby (0, 1, 7)
Traceback (most recent call last):
  File "calibre_plugins.overdrive_libby.models", line 772, in filterAcceptsRow
  File "calibre\utils\icu.py", line 191, in change_case
TypeError: None is not a unicode string

Trying to type in something in the Filter bar in Cards tab generates an error.

@ping

Originally posted by @p1nkyy in #7 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.