Jump to content

Amazon Audiobooks Image/Metadata fetcher


mickle026

Recommended Posts

mickle026

AmazonAudioBooks.zipAmazonAudioBooks.jpg.6c3b012c0c543bbba7888ae463e2c1c5.jpg

Still some search improvements to be done! - Testing version.

Not always fetching overviews - so I need to look at that.

 

AmazonAudioBooks2.thumb.jpg.661e84631fbeee3d1219f730ec34e503.jpg

This is a webscraper, It searches amazon for your audiobook.

Its up to you to check you can legally use this in your country - I accept no responsibilty. Use at your own risk.
As this is a private use plugin and at no way connected to commercial use, copyrights are deemed "fair use" - for personal use in most countries, However its on you to check this where you are.

For Audiobooks it fetches:

  • Book Title
  • Release Date
  • Studio
  • Poster Images
  • Writers / Narrators (names only)
  • Tagline
  • Overview

It does not fetch any Writers or Narrators Information or Images (when you click them) - it only fetches the audiobook information..

It only searches the book names, if I search the release dates or writers as well it usually doesn't find anything, so its possible to get the wrong book of the same name - just so you know.

However so far for me, it has got the right books each time up to now ... theres still time to get the wrong book....

Identify is not enabled in this plugin so will error in Emby log if you try to use it.

 

Drop the .dll in your plugins folder

Restart Emby

Go to Library Settings,

Enable in metadata and Images

AmazonAudioBooks3.jpg.549dc6372cda1c8a99129bc707c2541c.jpg

AmazonAudioBooks4.jpg.4de56c7891395733411a3840473ca2cc.jpg

 

I'm not entirely sure how to add Narrators to Audio books - there doesnt seem to be a narrator entity.

@Luke

So I have added them as an Actor with the Role "Narrator", this maybe not the correct place to put them - so until I know how they are handled, thats where this plugin adds them

This is an initial test release so do not consider it perfect! - I advise testing it on a dummy library first.

31.Jan.2023  -  01.12.35 [GetMetadata] Searching for AudioBook = The Running Man
31.Jan.2023  -  01.12.35 Url = https://www.amazon.co.uk/s?k="the running man"+audiobook
31.Jan.2023  -  01.12.36 Search Link Added: https://www.amazon.co.uk/The-Running-Man/dp/B01H0INT8Y
31.Jan.2023  -  01.12.36 Found link = https://www.amazon.co.uk/The-Running-Man/dp/B01H0INT8Y
31.Jan.2023  -  01.12.36 Testing Link: https://www.amazon.co.uk/The-Running-Man/dp/B01H0INT8Y
31.Jan.2023  -  01.12.38 [AudiBook Name] found: 'The Running Man'
31.Jan.2023  -  01.12.38 [Person] found: 'Stephen King'
31.Jan.2023  -  01.12.38 [Person] found: 'Kevin Kenerly'
31.Jan.2023  -  01.12.38 [Studio] found: 'Hodder & Stoughton'
31.Jan.2023  -  01.12.38 [ReleaseDate] found: '28 July 2016'
31.Jan.2023  -  01.12.38 [ReleaseDate] extracted: 27/07/2016 23:00:00
31.Jan.2023  -  01.12.38 Tagline Found: It's not just a game when you're running for your life.
31.Jan.2023  -  01.12.38 Overview: It's not just a game when you're running for your life. Every night they tuned in to the nation's favourite prime-time TV game show. They all watched, from the sprawling slums to the security-obsessed enclaves of the rich. They all watched the ultimate live death game as the contestants tried to beat not the clock but annihilation at the hands of the Hunters. Survive 30 days, and win the billion-dollar jackpot - that was the promise. But the odds were brutal and the game rigged. Best score so far was eight days. And now there was a new contestant, the latest running man, staking his life while a nation watched. [Copyright: Amazon.com, Non Commercial fair use]
31.Jan.2023  -  01.12.38 Metadata Found for: The Running Man and added to search results.
31.Jan.2023  -  01.12.39 [GetMetadata] Searching for AudioBook = The Running Man
31.Jan.2023  -  01.12.39 Url = https://www.amazon.co.uk/s?k="the running man"+audiobook
31.Jan.2023  -  01.12.41 Search Link Added: https://www.amazon.co.uk/The-Running-Man/dp/B01H0INT8Y
31.Jan.2023  -  01.12.41 Found link = https://www.amazon.co.uk/The-Running-Man/dp/B01H0INT8Y
31.Jan.2023  -  01.12.41 Testing Link = https://www.amazon.co.uk/The-Running-Man/dp/B01H0INT8Y
31.Jan.2023  -  01.12.43 Page verified as containg Actor Name, now checking for image
31.Jan.2023  -  01.12.43 Page claims to contain a MusicAlbum image
31.Jan.2023  -  01.12.43 Poster Image Link ?? : https://m.media-amazon.com/images/I/511sHPjwvRL.jpg
31.Jan.2023  -  01.12.43 [GetImages] SingleImage - Primary Image for "The Running Man" was found: 
31.Jan.2023  -  01.12.43 [GetImages] Primary was added to lookup results.

Let me know of any errors.

I already know if your results are not on page 1 then it wont find them - thats a "to do" item.

 

 

 

Edited by mickle026
  • Like 4
  • Thanks 2
Link to comment
Share on other sites

mickle026

OK, reuploaded it.  Definately a testing version so use at your own choice.

 

There seems to be an issue within Emby that @Lukewill need to clarify what is happening with audiobooks.

 

In this thread:

I was told to use an album provider for audio books, which this plugin does.

however, when opening Edit Metadata most of the information is missing. (Overview , studio, People etc), - It shows on the library browser view!

For some the overview shows, but all of them do not show people or studios

2066636784_Screenshot2023-01-31at17-57-11Emby.png.813d7877b0ba40d9051b90e1b13eebd9.png

1617829692_Screenshot2023-01-31at17-57-55Emby.png.5005cf0584e5e28e99b4e13ec51494ed.png

1631277459_Screenshot2023-01-31at17-57-45Emby.png.1202b3803d6d5bd0cf4cde3f39f33bdd.png

1587420574_Screenshot2023-01-31at17-58-33Emby.png.63d4fa5ed2dfb7be2d2173eca5e67bf0.png

 

But its not all of them for overview, it shows fo running man

1433952636_Screenshot2023-01-31at18-01-22Emby.png.52ff3171fcfccfcf6b9a9d873a50a469.png

Tagline is missing from the editor!

Im have no idea , but I presume there are remnants of an older audiobook system when it was seperate from MusicAlbum still present or at work here ??

 

Edited by mickle026
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 5 months later...
  • 2 months later...
On 1/31/2023 at 1:03 PM, mickle026 said:

OK, reuploaded it.  Definately a testing version so use at your own choice.

 

There seems to be an issue within Emby that @Lukewill need to clarify what is happening with audiobooks.

 

In this thread:

I was told to use an album provider for audio books, which this plugin does.

however, when opening Edit Metadata most of the information is missing. (Overview , studio, People etc), - It shows on the library browser view!

For some the overview shows, but all of them do not show people or studios

2066636784_Screenshot2023-01-31at17-57-11Emby.png.813d7877b0ba40d9051b90e1b13eebd9.png

1617829692_Screenshot2023-01-31at17-57-55Emby.png.5005cf0584e5e28e99b4e13ec51494ed.png

1631277459_Screenshot2023-01-31at17-57-45Emby.png.1202b3803d6d5bd0cf4cde3f39f33bdd.png

1587420574_Screenshot2023-01-31at17-58-33Emby.png.63d4fa5ed2dfb7be2d2173eca5e67bf0.png

 

But its not all of them for overview, it shows fo running man

1433952636_Screenshot2023-01-31at18-01-22Emby.png.52ff3171fcfccfcf6b9a9d873a50a469.png

Tagline is missing from the editor!

Im have no idea , but I presume there are remnants of an older audiobook system when it was seperate from MusicAlbum still present or at work here ??

 

We can add more info for editing in the metadata editor. Thanks.

  • Thanks 1
Link to comment
Share on other sites

adminExitium

@mickle026Thanks a lot for this. Would it be possible to use the Audnexus (https://audnex.us/) endpoint instead for all this info? It already has a lot of info put together without needing everyone to scrape it individually.

Plex Plugin using that: https://github.com/djdembeck/Audnexus.bundle

Repo for the datasource: https://github.com/laxamentumtech/audnexus

Link to comment
Share on other sites

mickle026
On 02/10/2023 at 11:42, adminExitium said:

@mickle026Thanks a lot for this. Would it be possible to use the Audnexus (https://audnex.us/) endpoint instead for all this info? It already has a lot of info put together without needing everyone to scrape it individually.

Plex Plugin using that: https://github.com/djdembeck/Audnexus.bundle

Repo for the datasource: https://github.com/laxamentumtech/audnexus

I took a quick look at the audnexus, and whilst it does have a whole lot of information and I could use it, it doesn't support lookup by book title, which is a bit of a problem.

You can find most books if you have the ASIN, its a bit awkward by Author though, as the author returns just ASIN's, so then you have to look them all up until you find the book.

However I have now got several ideas, using several sources how to make a pretty complete plugin.

I know just need to borrow some time from somewhere .............. at the moment I dont have much .....

  • Thanks 1
Link to comment
Share on other sites

adminExitium

It uses the unofficial Audible API for the title searches. An example search URL:

 

https://api.audible.com/1.0/catalog/products?response_groups=contributors,product_desc,product_attrs&num_results=25&products_sort_by=Relevance&title=The Sour Taste of Suspicion&author=CeeCee James

 

  • Thanks 1
Link to comment
Share on other sites

mickle026
4 minutes ago, adminExitium said:

It uses the unofficial Audible API for the title searches. An example search URL:

 

https://api.audible.com/1.0/catalog/products?response_groups=contributors,product_desc,product_attrs&num_results=25&products_sort_by=Relevance&title=The Sour Taste of Suspicion&author=CeeCee James

 

Could just use that directly :)

Link to comment
Share on other sites

adminExitium

Yeah, that's what the plex plugin uses for getting the ASIN and then the Audnexus API for the remaining info like the genre, cover images, series info etc. from that ASIN.

Link to comment
Share on other sites

mickle026
6 minutes ago, adminExitium said:

Yeah, that's what the plex plugin uses for getting the ASIN and then the Audnexus API for the remaining info like the genre, cover images, series info etc. from that ASIN.

Yep, just checked the Audiable API - it seems that the Products responce is the only part that doesnt require a device authenticated on amazon, the rest of the queries do.  So they must have a backend script that fethces the data via an authenticated device script or device and save that response to their own webserver.  I,e build it on the fly as requests are made.

Link to comment
Share on other sites

adminExitium

Basically, yeah. I am not 100% sure if it's on-demand fetching or pre-fetched periodically but doesn't really matter to the plugin needs either way as long as it responds with all the data.

Link to comment
Share on other sites

adminExitium

Also, I am not sure how much info is available from the ffprobe for plugins but I have all my audiobooks tagged with the ASIN field for exact matches so hopefully, the plugin can make use of those (if available) and avoid any additional processing for figuring out the correct match.

Link to comment
Share on other sites

  • 1 month later...
mickle026

@VicMooreI wish I could do js , Im not good at js ☹️

Nearly everything I do in my plugins is done in c# and I have had to learn that on the fly.

I don't use API calls except to my own code, everything is done internal via c#.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...