Giter Club home page Giter Club logo

audiobooks.bundle's Introduction

NO LONGER IN DEVELOPMENT

This was a fun little project that I started many years ago. I never really expected it to get as big as it did, and many people have splintered this off into even larger projects than I imagined would ever be. Please consider visiting one of them for your future needs. I won't be updating this anymore, and haven't for some time. But I will leave it here for anyone to borrow/steal from. Thanks!

Audiobooks (Audible) metadata agent

Metadata agent for Audiobooks stored in a music library. Now available in the Unsupported App Store!

This agent scrapes from Audible.com. It uses the Album Artist as the books Author and uses the Album Title as the Book Title. All audio files will need to be tagged correctly in order for this thing to do it's job. You can manually search for each book if you don't have them tagged ahead of time.

Download: https://github.com/macr0dev/Audiobooks.bundle/archive/master.zip

Source: https://github.com/macr0dev/Audiobooks.bundle

Metadata supplied:

Full Title Author (as Artist) Book/Album Cover (as Poster) Release Date (audiobook, not print or e-book) Production Studio (as Record Label) Publisher's Summary (as Review) Series Title (if exists) Narrator(s) (as Genre Tag) Genres (as Genre Tag)

Library Creation Options:

Create a BASIC MUSIC LIBRARY (not a premium Plex muisc library)

DO NOT check 'Use Embedded Tags'

DO check 'Store Track Progress'

Agent - Select Audiobooks

Agent Congiration Options:

If you're in the US and want to scrape from Audible.com - you're all set! If you're NOT in the US, or just want more flexibility with your searches you have options.

Manually Select Audible Site: This option allows you to manually select which site you're going to scrape. If this is not checked, the language you selected for the library, or the language selected for a manual match will be used to select which site to scrape from.

Select Audible site to use: This option is ignored if the above box is not checked.

Tips for greatest success:

Set "Album" tag in audio file as the book title Set "Artist" tag in audio file as the book author None of the other tags really matter for searching and matching. Manual 'match' will use the Author/Artist field if it's present, but you cannot enter it manually. Only the title. Make sure all the tracks have the same artist and album. Store each in a folder

Notes:

-Title data in parens () such as (Unabridged) is automatically removed before search. I've found this improves the results and matching.

-Currently, I don't have a great source for author data. What populates now (if any) is being done automatically from last.fm. You're welcome to go add some data there. This was kind of a happy accident.

-The first two genre tags show up in the top right when viewing the album/book. Genre tags are listed in the following order: Series [if exists], Narrator(s), Genre.

-You can filter by the various tags that are added to each book. Be it author, series, narrator, etc.

audiobooks.bundle's People

Contributors

brandonscript avatar cipi1965 avatar macr0dev avatar rix1337 avatar

Stargazers

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

Watchers

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

audiobooks.bundle's Issues

How do I set this up?

I'm using a QNAP NAS and I'm just wondering where to place the file to get this to work with Plex? I have had a large collection of audiobooks from years ago I'd like to add to plex, this seems to be the only way. I'm not sure if it still works, I hope someone can point me in the right direction. Thanks.

Automatic collection creation

In the current version of Plex, there is an option to automatically group items of a collection if you posess atleast 3 of an item. I was wondering if there would be a way to integrate that functionality into this plugin to group books in a series

Author Metadata Feature Request - my workaround

I hope this is OK here... it is not an issue but a helpful workaround for the lack of author metadata. Using this method I get about 60% of my authors matched automatically.

  1. I have setup my library using the audiobooks agent and followed the guide in the readme.md.
  2. Run a full scan
  3. I then switched metadata agents to the last.fm agent that comes pre-bundled with Plex.
  4. Run 'Refresh All Metadata' and Plex then goes and finds the authors leaving the albums metadata untouched.
  5. I then revert back to the audiobooks agent.

N.B. Do not click 'Upgrade Matching' as that is likely to remove existing metadata (although I haven't done it to try).

I find that last.fm does a reasonable job and matches just over half of my authors. The rest need doing manually.
It would be great if the Last.fm API can be used within this agent to avoid having to run both processes but it's possibly a complex job?

Feature Request:

Would it be possible to get an option in the settings to include the 2nd line of the title in Audible as part of the title name that is returned to Plex? For example, If a book in Audible is named "My Sequel Novel" and if the next line of text in Audible under the title says "My Series, Book 2" then return the following to Plex as the title: "My Sequel Novel: My Series, Book 2".
The public domain book series Oz, is a good example: https://www.audible.com/pd/The-Marvelous-Land-of-Oz-Audiobook/B00BHPI2TS
The title "The Marvelous Land of Oz: Oz, Book 2" would be returned to Plex.

Does this still work?

I've unzipped the contents into the plugins folder but nothing is showing up in the admin area.

I tried to install the unofficial apps store to install that way and from that repo I saw that plex is discontinuing the use of plugins.

Sooo, does this still work and I just haven't installed properly?

How to handle series?

Is there something like collections for music or is this something this agent can handle? I see a collections filter but I'm not sure how to use this:
image

What I'm really trying to do is get all books in a series/collection to show up in order of release date. For example, here is how my Harry Potter books show up currently:

image

Obviously they're showing up in alphabetical order at the moment.

Multiple Narrators loaded as single genre tag

When Audible lists multiple narrators, it's down in the same field on the website with commas separating them. I need to parse that field checking for commas and generate multiple tags.

How well does AudioBook listening work?

It's not really an issue, and I haven't even tried this plugin.

But I'm interested in knowing how well the AudioBook listening experience is with Plex..
Can someone show off a little how it works?

New parser using json.loads aborts on some pages.

The json parser doesn't seem to cope with some of the pages.
e.g.
https://www.audible.com/pd/B00IZOP8CI

Invalid \escape: line 11 column 263 (char 443)

specifically it seems to be the\)in the following.

, "description": "<p>Do you know why…</p><p>a mortgage is literally a death pledge? …why guns have girls’ names? …why salt is related to soldier?</p> You’re about to find out…<?-‘mä-lä-ji-kän) is:</p><p>*Witty (wi-te\): Full of clever humor</p><p>*Erudite (er-?-dit): Showing knowledge</p><p>*Ribald (ri-b?ld): Crude, offensive</p><p><i>The Etymologicon</i> is a ce strange underpinnings of the English language. It explains: How you get from “gruntled” to “disgruntled”; why you are absolutely right to believe that your meager salary barely covers “main of coffee shops in the world (hint: Seattle) connects to whaling in Nantucket; and what precisely the Rolling Stones have to do with gardening. </p>"

Agent turning no results even on properly tagged content

I added the agent via WebTools for Plex, and the agent properly shows up for my audiobook library. But it is unable to preovide any results for even the correctly named and tagged content. It's like Audible killed the API or something?

Is tagging required?

This might be obvious, so sorry for the basic question. I am trying to work out whether I can avoid having to tag my audiobook files and have the agent work instead from the folder names (this is how the agent for TV shows works).

I've tried changing the agent to use media.items[0].parts[0].file to pull out the filename, but it seems that media.items is always empty. Is this because this is derived from Agent.Album instead of Agent.Movies or is there something else different ?

Thanks!

Artist Profile Picture

This is more of a request. I have noticed that the program doesn't seem to pull certain profile pictures of some of the artists. for example Paul S. Kemp. Would it be possible to maybe add a feature to where it pulls the artists profile pics from an alternative site like https://www.goodreads.com. I have been having to manually grab the images from their for the missing artists profile pictures.

Program works great with everything else so far.

Scraper for Swedish Audiobooks

Cover Posters not showing

When I download audiobook metadata, the author/tags etc download, but the posters don't show up on the library page. If I head to the edit tag page, the poster is there, just not selected. If I select it, it shows up.

There are some comments on the Plex forum about this, for example this one and this and here.

I've tried clearing the metadata cache and data directories (completely) and after a restart, this still happens.

Interestingly, when I do a library scan, recent additions to the library (that also had this issue) that were fixed also show that they're searching for the metadata (spinning circle etc).

This was working until recently. Don't know if Plex introduced a breaking change or not.

This is an up to date Docker image of Plex btw.

0x7f6de2ffd700 Error parsing content

Having an issue with the latest public release of plex. Getting the below errors when i try to match. I installed the plugin clean. Not sure the issue.

Plex Version 1.18.0.1846

0x7f6de2ffd700 Error parsing content
Exception caught while attempting to match metadata on item 135442: Error parsing file
XML was (0 bytes):

Add ability to filter by narrator

A lot of books I listen too have multiple narrators (for example The Discworld books have some version read by tony robinson OR nigel planer). It would be great if the indexing was aware of this.

I can see there is the ability to do this in the audible search query that is used
https://www.audible.co.uk/search?title=the%20colour%20of%20magic&searchNarrator=Tony+Robinson

So I wonder whether we can potential have an option (maybe a checkbox on the config screen) to tell it to use the 'Album Artist' field when making its searches too. I could potentially help by having a go at this and submitting a PR if that helps, although my time is a little limited at present, so wanted to raise this now in case others may also be interested.

Debug question

Hi! First of all thanks for all the time you invested in this plugin.
I’m teaching myself python and I would like to give it a go to make some modifications to the code to try a few ideas.
Do you have any recommendations about how to debug this plugin? Anything better than change a line, go to Plex, force an update and so on.
For starters I would like to take a look at the xml that’s being parsed and see if I can extract the series information to do something with it.

Multi-part books not being consolidated into 1 "library"

I have my MP3 tags set correctly, and files named correctly, but I have a 5 part book that shows as 5 different books in my Plex Library. What's the magic sauce to get those to play nicely with each other?

Many thanks on the awesome plugin!

Exception raised when scanning Angels and Demons (Dan Brown)

I'm trying to match Angels and Demons (Dan Brown). The metadata agent ends up with this error:

2017-07-17 16:24:11,446 (270c) : DEBUG (networking:166) - Requesting 'http://127.0.0.1:32400/library/metadata/32841/tree' 2017-07-17 16:24:11,467 (270c) : DEBUG (networking:161) - Fetching 'http://www.audible.com/pd/Religion-Spirituality' from the HTTP cache 2017-07-17 16:24:11,477 (270c) : CRITICAL (core:574) - Exception in the update function of agent named 'Audiobooks', called with guid 'com.plexapp.agents.audiobooks://Religion-Spirituality?lang=xn' (most recent call last): File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-8fa494d15\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py", line 1076, in _update agent.update(obj, media, lang, **kwargs) File "D:\AppData\Local\Plex Media Server\Plug-ins\Audiobooks.bundle\Contents\Code\__init__.py", line 405, in update metadata.posters[1] = Proxy.Media(HTTP.Request(thumb)) File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-8fa494d15\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\networkkit.py", line 177, in Request if url.find(':32400/') > -1 and self._sandbox.policy.elevated_execution == False: AttributeError: 'NoneType' object has no attribute 'find'

I have not seen this error when scanning other audio books.

OS: Windows 8.1
Plex version: 1.7.6.4058

UTF-8

Miss support for UTF-8. Agent change all my special characters.

Chapter Titles?

Is it possible to have this agent label the tracks within a books folder by their appropriate chapter name?

Manual searches not working as expected.

You already have a comment int he plugin that the initial manual search doesn't work as expected, however I still find it irritating.

I figured out what I think it s better method to detect the different search types. Namily don't use manual to deicded when to use media.name. instead use media.filename.
If media.filename is None then use media.name.

e.g.

`        if media.filename is None:
          # If this is a custom search, use the user-entered name instead of the scanner hint.
          Log('Custom album search for: ' + media.name)
          #media.title = media.name
          media.album = media.name
        else:
          Log('Album search: ' + media.title)
`

No Search results from Audible.com

Looks like audible changed the code on their search results page for just audible.com. Going to have to rework the parsing for that page to be able to return results.

Other language sites (the few I checked) don't seem to be affected.

Unable to scan a particular title

I am trying to add Midnight in Chernobyl to my library and for some reason it will not add.

Other titles are fine. All tags look good. Folder structure is fine. I have an extensive library and not sure why this one will not get metadata.

2020-01-10 14:43:27,759 (9560) : DEBUG (runtime:717) - Handling request GET /system/agents/search?mediaType=9&id=38601&identifier=com.plexapp.agents.audiobooks&duration=50154722&filename=Z%253A%255CAudiobooks%255CAdam%2520Higginbotham%255CMidnight%2520in%2520Chernobyl%252Em4b&lang=en&openSubtitlesHash=828e3403d4f9031f&parentGUID=local%3A%2F%2F38600&parentID=38600&plexHash=d247524a141a4d3fb6a1546c17a78735c9b1b6d5&album=Midnight%20in%20Chernobyl&artist=Adam%20Higginbotham&title=&manual=1 2020-01-10 14:43:27,759 (9560) : DEBUG (runtime:814) - Found route matching /system/agents/search 2020-01-10 14:43:27,759 (9560) : DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/:/plugins' 2020-01-10 14:43:27,763 (9560) : INFO (logkit:16) - Searching for Album in com.plexapp.agents.audiobooks ({'album': 'Midnight in Chernobyl', 'openSubtitlesHash': '828e3403d4f9031f', 'artist': 'Adam Higginbotham', 'plexHash': 'd247524a141a4d3fb6a1546c17a78735c9b1b6d5', 'filename': 'Z%3A%5CAudiobooks%5CAdam%20Higginbotham%5CMidnight%20in%20Chernobyl%2Em4b', 'parentGUID': 'local://38600', 'parentID': '38600', 'duration': '50154722', 'title': None, 'id': '38601'}) 2020-01-10 14:43:27,765 (9560) : DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.agents.audiobooks/messaging/function/X0FnZW50S2l0OlNlYXJjaA__/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAo2CnMyCmVuczQKbGFuZ2IxczYKbWFudWFsYjFzNwpwcmltYXJ5aTAKczcKdmVyc2lvbnIxCnM2Cmt3YXJnc3M1CkFsYnVtczEwCm1lZGlhX3R5cGUxMApzMjEKTWlkbmlnaHQgaW4gQ2hlcm5vYnlsczUKYWxidW1zMTYKODI4ZTM0MDNkNGY5MDMxZnMxNwpvcGVuU3VidGl0bGVzSGFzaHMxNwpBZGFtIEhpZ2dpbmJvdGhhbXM2CmFydGlzdHM0MApkMjQ3NTI0YTE0MWE0ZDNmYjZhMTU0NmMxN2E3ODczNWM5YjFiNmQ1czgKcGxleEhhc2hzNzMKWiUzQSU1Q0F1ZGlvYm9va3MlNUNBZGFtJTIwSGlnZ2luYm90aGFtJTVDTWlkbmlnaHQlMjBpbiUyMENoZXJub2J5bCUyRW00YnM4CmZpbGVuYW1lczEzCmxvY2FsOi8vMzg2MDBzMTAKcGFyZW50R1VJRHM1CjM4NjAwczgKcGFyZW50SURzOAo1MDE1NDcyMnM4CmR1cmF0aW9ubnM1CnRpdGxlczUKMzg2MDFzMgppZHIwCg__' 2020-01-10 14:43:27,789 (9560) : DEBUG (runtime:924) - Response: [404] NoneType, 0 bytes 2020-01-10 14:43:30,434 (6078) : DEBUG (runtime:717) - Handling request GET /system/agents/search?mediaType=9&id=38601&identifier=com.plexapp.agents.audiobooks&lang=en&name=Midnight%20in%20Chernobyl&parentGUID=local%3A%2F%2F38600&parentID=38600&year=&manual=1 2020-01-10 14:43:30,434 (6078) : DEBUG (runtime:814) - Found route matching /system/agents/search 2020-01-10 14:43:30,436 (6078) : DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/:/plugins' 2020-01-10 14:43:30,440 (6078) : INFO (logkit:16) - Searching for Album in com.plexapp.agents.audiobooks ({'id': '38601', 'parentGUID': 'local://38600', 'parentID': '38600', 'name': 'Midnight in Chernobyl', 'year': None}) 2020-01-10 14:43:30,440 (6078) : DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.agents.audiobooks/messaging/function/X0FnZW50S2l0OlNlYXJjaA__/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoyCmRpY3QKZGljdAo2CnMyCmVuczQKbGFuZ2IxczYKbWFudWFsYjFzNwpwcmltYXJ5aTAKczcKdmVyc2lvbnIxCnM2Cmt3YXJnc3M1CkFsYnVtczEwCm1lZGlhX3R5cGU1CnM1CjM4NjAxczIKaWRzMTMKbG9jYWw6Ly8zODYwMHMxMApwYXJlbnRHVUlEczUKMzg2MDBzOApwYXJlbnRJRHMyMQpNaWRuaWdodCBpbiBDaGVybm9ieWxzNApuYW1lbnM0CnllYXJyMAo_' 2020-01-10 14:43:30,546 (6078) : DEBUG (runtime:924) - Response: [200] MediaContainer, 130 bytes 2020-01-10 14:43:32,743 (3dc0) : INFO (datakit:131) - Saved the dictionary file 2020-01-10 14:43:38,069 (3dfc) : DEBUG (runtime:717) - Handling request GET /system/:/prefs 2020-01-10 14:43:38,069 (3dfc) : DEBUG (runtime:814) - Found route matching /system/:/prefs 2020-01-10 14:43:38,072 (3dfc) : DEBUG (runtime:88) - Sending packed state data (99 bytes) 2020-01-10 14:43:38,072 (3dfc) : DEBUG (runtime:924) - Response: [200] MediaContainer, 418 bytes

Updating or changing Artist and Album titles after initial creation

Hey there, does anybody know of a way (within the plex framework) to change the artist or album title after it's search result has been chosen?

i.e. I have an [unknown artist] but a good match on the title - which of course, also gives me the author - however the only place I can seem to affect the artist name is when providing an initial hit in the artist search function (at which point I haven't got the album info!). And after that it's too late.

Similarly, I want to use basic book titles (without : some subtitle, , Book 1 of the blah blah or whatever) so can trim those off - but again, have to do so in the search function. It would be helpful to show those full titles for hints in the search results and then strip only them in the update function*.

  • related: I'd actually like to store the entire title in the title_sort field - which I can do fine. However, I'd still like it to serve it's purpose and be free of the "determiner" prefixes ('A|An|The') etc.

    Any ideas how to do this without a hardcoded list per language? I thought of reading the existing tag and adding to that, but like most apps, that is None unless explicitly defined (while still showing a sort value in the UI).

Cheers!

Cant Fetch meta data

Hi
First off thanks for the great work
please can you help me troubleshoot an error

When trying to refresh metadata or manually matching I get this

image

I have updated the plugin and restarted plex multiple time

MAybe cleanup the tags and add the narrators as the producers?

I noticed that sometimes the genres etc... can be a bit unclean, it helps to strip, them.
It is also a pretty standard convention to set the producer to the narrator, from what I can see so that probably doesn't hurt either.
e.g.`
metadata.genres.add(series.strip())
for c in narrator.split(','):
metadata.genres.add(c.strip())
metadata.genres.add(genre1.strip())
metadata.genres.add(genre2.strip())

    metadata.producers.clear()
    for c in narrator.split(','):
        metadata.producers.add(c.strip())
    
    # other metadata

`

MAJOR redesign of the audible site

They've changed everything, so it's all broken. Going to have to re-write all of the page searches to get the data. They're introduced a hidden 'toastMessage' that has everything in it. Could help to use that instead of scrapping the content throughout the page.

Anyway to have alexa resume position when playing via my dot? Anyway to skip ahead/back via voice interface?

Hey!

Thanks so much for what you've created... it does work great on my android devices... but now, I'd like to get Alexa Dot integration working. I can say

"Alexa, ask Plex to play the album "Norse Mythology"" and she'll do it... trouble is, Plex doesn't seem to remember where it was last playing, and I don't often have time to listen to the book all at once. I've also tried "Alexa, ask plex to resume the album Norse Mythology" with no dice Ideas?

  1. is there any way to skip ahead 5 minutes, 10 minutes go back 5 minutes etc via your dot skill?

Thanks again!!

plex is not able to find authors at all

my plex is not able to find any authors at all. as soon as I click search it says not found.
the books work just fine, but the authors cant be found. is there a way to fix that

Author > Series > Books, etc.

Hi there, love that someone is working on this. I have some minor nitpicks which I hope to contribute some time via PR, but one of a few main hurdles I’ve been trying to overcome is the lack of a “Series” level in the book hierarchy.

Looking at plugin and scanner sources it seems like it may be possible to “just” specify the author as a container of Series objects which display as collapsed until more than one book object is contained by it - kind of a marriage between film collections and tv series - but I don’t Python so good so I’m keen to know why that wouldn’t be doable.

Add to that the magic that would allow me to know which tracks I’ve “watched” and I wouldn’t shy away from starting my multi-file books only to keep losing my place!

Failing that - a much more possible way I’ve been looking into is the multi-part ability of Plex to treat several files as one. It seems the scanner could auto-magically join the files of each book into one virtual track, then rely on the position saving (which does seem to work reliably with multi-part audio) to replace most of the need for “watched” status. This would also obviate the need for an additional level for series as “tracks” would actually be books, so “albums” could be named after the book (if standalone) or series (which audible provides).

I’ve tried the above by manually tagging single book files and the layout (albums as series) works nicely but is burdensome to achieve by hand (as is the multi-part stuff).

Anyway, please let me know what you think?

Also, +1 for leaving genres alone if present, and not adding non-genre tags to. :)

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.