08-03-2024, 11:52 PM | #1 |
Member
Posts: 12
Karma: 10
Join Date: Aug 2023
Device: Kobo Clara HD, Kobo Libra Colour
|
[Metadata Source Plugin] Apple Books covers
I recently discovered that iTunes has an API that lets you search for books available on the Apple Books store, and makes high-resolution covers available for them. And so taking the idea from the Kindle hi-res covers plugin I decided to make this API available as Calibre plugin.
The nice thing about the API is that you don't need to know any Apple Books-specific identifier for a book, you can just search by title and/or author. The one downside is that the store is country-specific, so you may need to configure your country in the plugin's settings. I've also added an optional secondary country setting in case you often want to search for books from different countries. Unfortunately there's no way to just search all country stores. If available in the metadata the plugin will first try to look up the book's ISBN directly, and if unsuccessful it will fall back to the search mentioned above. Note that the API documentation says that there is a rate limit of about 20 requests per minute, although I haven't been able to trigger that yet. Configuring two countries means there will be more requests per search, so there is a chance that this will hit the rate limit earlier. The source is available here: https://github.com/majutsushi/apple-books-covers Last edited by Majutsushi; 08-12-2024 at 02:24 AM. Reason: New plugin version |
08-04-2024, 01:35 AM | #2 |
Bibliophagist
Posts: 40,603
Karma: 157444382
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
I did some testing on 20 books with your plugin and it seems to return the same hi-res covers as the Kobo Metadata plugin in most cases. On 2 books, the Kobo Metadata plugin returned the correct hi-res covers and the Apple Books plugin returned an incorrect cover. On another book, the Apple Books plugin returned the correct hi-res cover and the Kobo Metadata plugin returned an incorrect cover.
Thanks very much for an useful addition to calibre's cover downloader toolset. Edit: added a couple of images of cover options. Last edited by DNSB; 08-04-2024 at 01:48 AM. Reason: Attach image of cover downloads |
Advert | |
|
08-04-2024, 02:23 AM | #3 |
Member
Posts: 12
Karma: 10
Join Date: Aug 2023
Device: Kobo Clara HD, Kobo Libra Colour
|
Yeah it's probably expected that the ebooks in different stores will often have the same cover, but since this uses an official API it should hopefully be more reliable than scraping websites.
|
08-05-2024, 12:27 PM | #4 |
Resident Curmudgeon
Posts: 76,491
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Can we get hi-res covers from Apple? It looks like then the eBook cover is low-res, so is the cover from Apple Books. When the eBook cover is hi-res, I get a hi-res cover. Is this the way it is?
Last edited by JSWolf; 08-05-2024 at 12:31 PM. |
08-05-2024, 02:48 PM | #5 |
Bibliophagist
Posts: 40,603
Karma: 157444382
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
From my testing, most of the Apple books use the same cover as this plugin returns. What the publisher supplies is what you get.
|
Advert | |
|
08-05-2024, 09:04 PM | #6 |
Member
Posts: 12
Karma: 10
Join Date: Aug 2023
Device: Kobo Clara HD, Kobo Libra Colour
|
Yes, the plugin tries to get the highest-resolution cover it can find, which in my tests is usually the same resolution as the equivalent result from the Kindle and Kobo stores. But as DNSB said it always depends on the publisher.
|
08-06-2024, 06:15 AM | #7 | |
Resident Curmudgeon
Posts: 76,491
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
What makes the plugin sometimes only download 1 cover and sometimes more covers? I'm set to 2 covers and US/UK. |
|
08-06-2024, 01:42 PM | #8 |
Bibliophagist
Posts: 40,603
Karma: 157444382
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
The number of covers seen would depend on what the Apple API returns. With your settings, you will get from 0 to 2 covers. When I tested a couple of books with Canada/UK, I got the North American and British covers which were different.
|
08-07-2024, 12:33 AM | #9 |
Member
Posts: 12
Karma: 10
Join Date: Aug 2023
Device: Kobo Clara HD, Kobo Libra Colour
|
If the plugin finds an exact ISBN match then it will only download that cover, otherwise it will do a search and return the number of configured covers. I've been wondering if it should (optionally) do a search in the first case as well in case there are alternate editions with other covers available, so if that's something that people would find useful then I could add that. The main downside of that is that it will increase the risk of running into the API rate limit.
|
08-07-2024, 07:53 PM | #10 | |
Resident Curmudgeon
Posts: 76,491
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
A lot of time the covers are different and sometimes I US cover is better or the UK cover is better. So I want to be able to choose which cover if they are hi-res. Yes, I would like to be able to download both covers. I thought I should already be able to and it was just broken that it didn't work. Others will see the settings the same way I did and find it's broken. It really is broken even thought the programming says it's not because the programming is not following the options. Last edited by JSWolf; 08-07-2024 at 07:55 PM. |
|
08-07-2024, 08:38 PM | #11 |
Bibliophagist
Posts: 40,603
Karma: 157444382
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
I tried setting the first source to Canada and the second source to UK. I've left the number of covers at the default of 5. Downloading the covers from Apple only for J. D. Robb's Dark in Death returned 10 covers. The two covers for Dark in Death were the North American and UK covers. See attached images from Kobo (Amazon, etc. showed the same NA/UK covers).
Sadly, B&N still seems to think the 428x700 is a hi-res image. Last edited by DNSB; 08-07-2024 at 08:41 PM. |
08-09-2024, 02:58 AM | #12 |
Member
Posts: 12
Karma: 10
Join Date: Aug 2023
Device: Kobo Clara HD, Kobo Libra Colour
|
The plugin currently only downloads a single cover if it finds an ISBN match because I thought that getting the right cover for the specific edition was enough and I wanted to reduce the number of queries due to the rate limit, but I agree that the covers for alternative editions can also be desirable. As for why in DNSB's case it returns 10 covers instead of 5 that's because the limit is per-store, not absolute, which I probably should have made clearer.
Here's a version where I made some changes around this: * It now always does a search, even if there's an ISBN match, to allow for alternative covers. * It always returns at most the actual number of covers configured. * If two stores are configured, it will prioritize the first results from each, since those are going to be the most relevant ones. With these changes, if I configure the stores to be US and UK with two max covers, I get exactly the two US and UK covers for DNSB's book. Unless someone finds a bug with this I'll release it as the next version, although I'm not sure if I can currently edit my initial post to change the attachment. |
08-12-2024, 02:26 AM | #13 |
Member
Posts: 12
Karma: 10
Join Date: Aug 2023
Device: Kobo Clara HD, Kobo Libra Colour
|
I have now released the above changes as version 0.2.0 and edited the initial post, so presumably the plugin should automatically update for people who installed it with the plugin manager (or even if not? I'm not sure).
|
08-12-2024, 12:36 PM | #14 |
Bibliophagist
Posts: 40,603
Karma: 157444382
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
The plug-in updated message showed up here.
|
08-20-2024, 06:04 PM | #15 |
Resident Curmudgeon
Posts: 76,491
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Thank you. I now have the updated plugin and it's working well.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Metadata Source Plugin] Skoob Books | thiago.eec | Plugins | 23 | 08-27-2024 02:04 PM |
[Metadata Source Plugin] Kindle (Amazon) High-res Covers | lbschenkel | Plugins | 107 | 02-13-2024 09:01 PM |
[Metadata Source Plugin] Kobo Books | davidfor | Plugins | 201 | 10-17-2023 12:19 PM |
How do I know which Metadata Source Plugin was called from fetch-ebook-metadata? | eryMpexI | Library Management | 6 | 04-22-2023 09:58 AM |
[Metadata Source Plugin] Empty Plugin? (Fake Identifier) | mneimeyer | Plugins | 3 | 11-11-2019 09:07 PM |