seanap / Audiobooks.bundle

Audiobook metadata agent for Plex

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handle 'special' releases

djdembeck opened this issue · comments

Some Audible releases are formatted differently, with background images. This specifically breaks genre extraction.

Test case: https://www.audible.com/pd/Herbie-Audiobook/B07X1TGC2Z

error:

2021-08-28 06:01:18,393 (154ebc22bb38) :  CRITICAL (agentkit:1095) - Exception in the update function of agent named 'Audiobooks', called with guid 'com.plexapp.agents.audiobooks://B07X1TGC2Z?lang=en' (most recent call last):
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-1a38e63c6/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 1093, in _update
    agent.update(obj, media, lang, **kwargs)
  File "/config/Library/Application Support/Plex Media Server/Plug-ins/Audiobooks.bundle/Contents/Code/__init__.py", line 258, in update
    self.date_missing(update_helper, html)
  File "/config/Library/Application Support/Plex Media Server/Plug-ins/Audiobooks.bundle/Contents/Code/__init__.py", line 612, in date_missing
    helper.re_parse_with_date_published(json_data)
  File "/config/Library/Application Support/Plex Media Server/Plug-ins/Audiobooks.bundle/Contents/Code/update_tools.py", line 54, in re_parse_with_date_published
    data['itemListElement'][2]['item']['name']
  File "/usr/lib/plexmediaserver/Resources/Plug-ins-1a38e63c6/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/code/sandbox.py", line 108, in <lambda>
    _getitem_           = lambda x, y: x.__getitem__(y),
IndexError: list index out of range