Agent turning no results even on properly tagged content
Jakesparrow opened this issue · 3 comments
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?
Best guess is a Plex update broke something. I'm getting errors now like:
2019-11-02 12:24:44,502 (7fe622b7d700) : INFO (__init__:101) - /********************************************************************************/
2019-11-02 12:24:44,502 (7fe622b7d700) : INFO (__init__:303) - ---------------------------------------ALBUM SEARCH-----------------------------------------------
2019-11-02 12:24:44,503 (7fe622b7d700) : INFO (__init__:304) - * ID: None
2019-11-02 12:24:44,503 (7fe622b7d700) : INFO (__init__:305) - * Title: The Reckoning
2019-11-02 12:24:44,504 (7fe622b7d700) : INFO (__init__:306) - * Name: None
2019-11-02 12:24:44,504 (7fe622b7d700) : INFO (__init__:307) - * Album: None
2019-11-02 12:24:44,505 (7fe622b7d700) : INFO (__init__:308) - * Artist: None
2019-11-02 12:24:44,505 (7fe622b7d700) : INFO (__init__:309) - --------------------------------------------------------------------------------------------------
2019-11-02 12:24:44,505 (7fe622b7d700) : INFO (__init__:359) - You clicked 'fix match'. This may have returned no useful results because it's searching using the title of the first track.
2019-11-02 12:24:44,506 (7fe622b7d700) : INFO (__init__:359) - There's not currently a way around this initial failure. But clicking 'Search Options' and entering the title works just fine.
2019-11-02 12:24:44,506 (7fe622b7d700) : INFO (__init__:359) - This message will appear during the initial search and the actual manual search.
2019-11-02 12:24:44,507 (7fe622b7d700) : CRITICAL (agentkit:1014) - Exception in the search function of agent named 'Audiobooks', called with keyword arguments {'title': 'The Reckoning', 'parentGUID': 'local://186679', 'year': None, 'id': '188940', 'parentID': '186679'} (most recent call last):
File "/volume1/@appstore/Plex Media Server/Resources/Plug-ins-0f4abfbcc/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 1007, in _search
agent.search(*f_args, **f_kwargs)
File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Audiobooks.bundle/Contents/Code/__init__.py", line 359, in search
searchUrl = ctx['AUD_SEARCH_URL'].format((String.Quote((normalizedName).encode('utf-8'), usePlus=True)), (String.Quote((media.artist).encode('utf-8'), usePlus=True)))
TypeError: cannot concatenate 'str' and 'NoneType' objects
This is a known issue and we have an issue opened for it. We're waiting on Plex to fix something they broke.
see here. I'm going to close this one.
Hi I ended up here trying to figure out why the agent fails to search .m4b ... I am still unable to figure that out, I'd like to report that if I convert the files to .m4a, then it has no problems!
ffmpeg -i abook.m4b -map 0 -c copy abook.m4a
Then the resulting book gets matched. I it is not a simple extension change... here's some output of mediainfo from a file that failed:
Format profile : Apple audio with iTunes position
Codec ID : M4B (M4B /mp42/isom)
then after telling ffmpeg to change container:
Format profile : Apple audio with iTunes info
Codec ID : M4A (isom/iso2)
Logs would state this before the conversion to m4a:
2019-12-10 21:31:45,005 (7fb05effd700) : INFO (agentkit:957) - Searching for matches for {'album': '[Unknown Album]', 'index': '1', 'openSubtitlesHash': '010d743b2908dc7a', 'name': "Don't Know Jack", '
artist': '[Unknown Artist]', 'title': None, 'filename': '%2Fdados%2FAudiobooks%2FDiane%20Capri%2FHunt%20for%20Jack%20Reacher%2FHuntReacher%2001%20Don%27t%20Know%20Jack%2Em4b', 'plexHash': '769a86f814483
ca0cf68d1fa5f5ba0c3257f62cd', 'duration': '-1', 'id': '27311'}
2019-12-10 21:31:45,005 (7fb05effd700) : DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/library/metadata/27311/tree'
2019-12-10 21:31:45,008 (7fb05effd700) : DEBUG (preferences:258) - Loaded preferences from DefaultPrefs.json
2019-12-10 21:31:45,009 (7fb05effd700) : DEBUG (preferences:178) - Loaded the user preferences for com.plexapp.agents.audiobooks
2019-12-10 21:31:45,009 (7fb05effd700) : INFO (sandbox:19) - ---------------------------------ARTIST SEARCH--------------------------------------------------
2019-12-10 21:31:45,009 (7fb05effd700) : INFO (sandbox:19) - * Album: [Unknown Album]
2019-12-10 21:31:45,009 (7fb05effd700) : INFO (sandbox:19) - * Artist: [Unknown Artist]
2019-12-10 21:31:45,009 (7fb05effd700) : INFO (sandbox:19) - ****************************************Not Ready For Artist Search Yet*************************
2019-12-10 21:31:45,010 (7fb05effd700) : INFO (sandbox:19) - ------------------------------------------------------------------------------------------------