If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Audiobook Agent(audible).

dethrophesdethrophes Posts: 4Validating, Plex Pass Plex Pass

There is a new Audiobook Agent hosted here
https://github.com/macr0dev/Audiobooks.bundle

My fork of which is here.
https://github.com/dethrophes/Audiobooks.bundle

This gets the meta data from audible.com or if the language is French, German or Italian it gets the info from audible.fr, audible.de, or audible.it.

Tagged:
«1

Comments

  • JakeReindlJakeReindl Posts: 85Members, Plex Pass Plex Pass
    edited July 6

    Is this an addon for Plex?
    Edit I see, a metadata agent. I got a little excited for a second. Was hoping for some (semi) native support of audiobooks in plex lol

  • cheveguerra@gmail.comcheveguerra@gmail.com Posts: 6Members ✭✭
    edited July 18

    @JakeReindl said:
    Is this an addon for Plex?
    Edit I see, a metadata agent. I got a little excited for a second. Was hoping for some (semi) native support of audiobooks in plex lol

    Well, it actually gives you (semi)native support of audiobooks in Plex, it allows you to create a library of audiobooks, it gets the metadata from audible and it lets you play the audiobook and keep track of the position when playing ... the only thing I miss is variable playback speed (1.2, 1.3, 1.x), but that is all!

  • cheveguerra@gmail.comcheveguerra@gmail.com Posts: 6Members ✭✭

    Good morning,

    I have installed Version 1.5.7.4016 on a windows PC.

    I am having problems with the plugin, I ma getting an exception in the update function when getting metadata of any book:

    2017-07-18 10:21:40,709 (16f8) : DEBUG (networking:161) - Fetching 'http://www.audible.com/pd/Health-Fitness' from the HTTP cache
    2017-07-18 10:21:40,763 (16f8) : INFO (logkit:16) - ---------------------------------------XPATH SEARCH HIT-----------------------------------------------
    2017-07-18 10:21:40,765 (16f8) : INFO (logkit:16) - date: None
    2017-07-18 10:21:40,766 (16f8) : INFO (logkit:16) - title:
    2017-07-18 10:21:40,766 (16f8) : INFO (logkit:16) - author:
    2017-07-18 10:21:40,769 (16f8) : INFO (logkit:16) - series:
    2017-07-18 10:21:40,769 (16f8) : INFO (logkit:16) - narrator:
    2017-07-18 10:21:40,772 (16f8) : INFO (logkit:16) - studio:
    2017-07-18 10:21:40,773 (16f8) : INFO (logkit:16) - thumb: None
    2017-07-18 10:21:40,773 (16f8) : INFO (logkit:16) - genres: ,
    2017-07-18 10:21:40,776 (16f8) : INFO (logkit:16) - synopsis:
    2017-07-18 10:21:40,776 (16f8) : CRITICAL (core:574) - Exception in the update function of agent named 'Audiobooks', called with guid 'com.plexapp.agents.audiobooks://Health-Fitness?lang=xn' (most recent call last):
    File "C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-25d94bad9\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py", line 1076, in _update
    agent.update(obj, media, lang, **kwargs)
    File "C:\Users\Cheve\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-25d94bad9\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'

    2017-07-18 10:21:40,779 (16f8) : DEBUG (model:229) - Serializing to C:\Users\Cheve\AppData\Local\Plex Media Server\Metadata\Albums\5\2a65eca4d8d5050fadf02c0c26f541bb1d32703.bundle\Contents\com.plexapp.agents.audiobooks\Info.xml
    2017-07-18 10:21:40,785 (16f8) : DEBUG (runtime:88) - Sending packed state data (110 bytes)
    2017-07-18 10:21:40,785 (16f8) : DEBUG (runtime:924) - Response: [200] str, 16 bytes

    I tried with a lot of different audiobooks and always get the same error, it doesn't update any metadata.

    Maybe audible changed something in their page that broke the parser!

    Best Regards

  • cheveguerra@gmail.comcheveguerra@gmail.com Posts: 6Members ✭✭
    edited July 18

    Ok, I think I found the problem,

    In line 314 of _init_.py we have: " itemId = url.split('/', 5)[4]"
    I changed it to: ""itemId = url.split('/', 7)[6]"

    I guess Audible changed the format of its URLs and it broke the code!

    The problem is that just refreshing the metadata does not fix the metadata, I have to manualley Fix Match for every audiobook to get the right metadata ... or maybe recreate the library :(

    Regards

  • andrewjheadandrewjhead Posts: 34Members, Plex Pass Plex Pass

    Change have been made to the main branch for the recent url changes. Additions have been made to allow users outside of north america to use the plugin. Thanks to dethrophes for working that one out.

  • SilverlinSilverlin Posts: 5Members, Plex Pass Plex Pass

    Hi - This is a great agent that I have been using but I am finding that a single tag includes multiple people. Picture attached. Is it possible that when the agent scrapes Audibles that it creates a individual tag for each entry? Thanks.

  • andrewjheadandrewjhead Posts: 34Members, Plex Pass Plex Pass

    Good catch. Hadn't really noticed since the vast majority of my books are single narrator. Shouldn't be too hard to parse that field, check for commas and separate them as different tags.

    I've added it as an issue on github and to my list of things to do.

  • SilverlinSilverlin Posts: 5Members, Plex Pass Plex Pass

    Thanks for the fast response.

  • andrewjheadandrewjhead Posts: 34Members, Plex Pass Plex Pass

    Done. It's available in the unsupported appstore now also. You can update directly from there. Once the new version is in place, all you need to do is a quick metadata refresh on the titles that have multiple narrators. They'll update and re-tag correctly now.

  • SilverlinSilverlin Posts: 5Members, Plex Pass Plex Pass

    Just tested and working great. Thanks!

  • daeksdaeks Posts: 128Members, Plex Pass Plex Pass

    Great addon but anyhow I have a small problem. As long as I have added this agent it also fetches data from last.fm? Is there a way to disable that behavior?

  • andrewjheadandrewjhead Posts: 34Members, Plex Pass Plex Pass

    Nope. Plex is doing this on its own. Perhaps when I get around to writing something for scraping author data from somewhere it will override what it's doing. But right now there is no known way to stop it. By all accounts it shouldn't be. But... there it is.

  • daeksdaeks Posts: 128Members, Plex Pass Plex Pass

    I have observed a strange behavior but I am a bit unsure how to report it. I have added a test library with 51 audiobooks. They are all listed correctly but as soon as I start refreshing metadata some albums are getting lost and the library displays only 50 instead of 51. How does that happen?

  • andrewjheadandrewjhead Posts: 34Members, Plex Pass Plex Pass

    There's a lot of unknowns here. Are you saying that the library adds all the books, downloads metadata for each one - THEN you're clicking "refresh metadata"?

    Do you know which book is disappearing? Is it similar in title to another book? Is it possible that the title isn't specific enough that both books are getting grouped together and being cataloged as one book?

  • daeksdaeks Posts: 128Members, Plex Pass Plex Pass

    Thanks for the hint! I nailed it down and It looks like that the audiobook is grouped together with a similar one as two results are returned from audible during the search.

  • andrewjheadandrewjhead Posts: 34Members, Plex Pass Plex Pass

    Okham's razor wins again! :)

  • daeksdaeks Posts: 128Members, Plex Pass Plex Pass
    edited July 29

    I have tried to debug it and collected one example... -removed-
    Just as a note, I have added some split to normalizedName to search for proper album name and had to modify AUD_SEARCH_URL to search for advsearchKeywords instead searchAuthor cause of my embedded tags.

    Is there a way to disable that merging??

  • andrewjheadandrewjhead Posts: 34Members, Plex Pass Plex Pass

    That's a lot of log. Want to narrow it down with an example?

    So you're using a modified version? I'm not sure how I can troubleshoot that for you. But I'll give it a shot. Gonna need a lot more specific details though.

  • andrewjheadandrewjhead Posts: 34Members, Plex Pass Plex Pass

    Also, which version did you modify? My current release? Or a past one? There's been a lot of changes in the last two weeks.

  • daeksdaeks Posts: 128Members, Plex Pass Plex Pass

    It is already reduced to 2 files which are merged to one album.

    I used the current version from github https://github.com/macr0dev/Audiobooks.bundle
    As far as I narrowed it down it looks like that the score for both examples is the same. Unfortunately it tooks the second one (which is the wrong one) for merging. I "workarounded" it by adding a break here, but thats not a solution. Basically if I understood it correctly it should only use the first result provided by audible if the score is the same.

«1
Sign In or Register to comment.