Taxel / PlexTraktSync

A python script that syncs the movies, shows and ratings between trakt and Plex (without needing a PlexPass or Trakt VIP subscription)
MIT License
1.57k stars 101 forks source link

Plex Discover Service Error: Missing required param searchProviders #2002

Closed TDWillingham closed 2 months ago

TDWillingham commented 3 months ago

Confirmation

The problem

I have Plex Discover turned off on my server. Is there a way to disable this part of the program? I am getting this error currently:

2024-06-25 19:06:07,840 INFO[plextraktsync.sync.WatchListPlugin]:Skipping xxxxxxxx from Trakt watchlist because not found in Plex Discover 2024-06-25 19:06:08,058 ERROR[plextraktsync.plex.PlexApi]:xxxxxxxx: Searching Plex Discover error: (400) bad_request; https://discover.provider.plex.tv/library/search?query=xxxxxxxxxxd&limit=30&searchTypes=tv&includeMetadata=1 {"Error":{"error":"Bad Request","message":"Missing required param searchProviders!","statusCode":400}}

Or am I misunderstanding what is going on here?

Steps to reproduce the behavior

  1. plextraktsync sync

Error trace / logs

No response

Expected behavior

Skip using Plex Disoverer

Inspect of problematic items

No response

Workarounds

No response

Config file contents

No response

Install method

docker-compose

Version

0.31.4

Python Version

3.12.4

Plex Server Version

4.15.14

Operating System and Version

Unraid

glensc commented 3 months ago

The Error comes from WatchListPlugin.

You can try to disable it, i.e disable watchlist cloud syncing, i.e use playlists, or disable it completely.

glensc commented 3 months ago

I have Plex Discover turned off on my server

how it's done?

TDWillingham commented 3 months ago

I have Plex Discover turned off on my server

how it's done?

Settings -> Online Media Sources -> Disable all of them

I'm still not exactly sure what this setting is doing. My fault for sure. Is it something I actually need to keep things in sync with Trakt? Because the error message makes me thing it's related to the Discover service, which I don't like/need. It's part of Plex's monetization efforts, which I understand, just don't like it cluttering it up on the server for inexperienced users.

glensc commented 3 months ago

Settings -> Online Media Sources -> Disable all of them

Not related to syncing of PlexTraktSync. Did enabling prove your otherwise? You didn't respond to other workaround either.

glensc commented 3 months ago

Above settings link:

TDWillingham commented 3 months ago

I'm not sure how to edit the script inside of a container. I'd have to fork it and change it there, wouldn't I? Then pull it again?

If the error isn't related to those settings, wonder why mine is having the error? That was all I could think of causing it.

glensc commented 3 months ago
  1. edit what script? why?
  2. read readme and contributing, they describe how to build, including how to use version from pr
  3. make the changes and re-run, only you can confirm that (not reproducible)
TDWillingham commented 3 months ago

Well that's the strangest thing. I just ran it again a few times to see if it was still occurring and it's not having any errors now. Guess I can mark it as closed now unless you have any more thoughts. No idea what was causing it, that's frustrating.

glensc commented 3 months ago

Since it's third party site, it could be anything ranging from they deployed new code and it was broken or some other temporary anomaly. But since you obfuscated the URL, it's impossible to say what the required parameter might had been. or what there actual query was. From PlexTraktSync debug log might find more details. you need to enable debug logging first.

TDWillingham commented 3 months ago

It was just the file names that I obfuscated. I'll keep an eye on it and see if it pops up again. I'll close it for now. Thanks for your help!

TDWillingham commented 3 months ago

Error resolved itself. Will monitor for further developments.

glensc commented 3 months ago

This url (literal) still gives 400:

jakeclements commented 3 months ago

@glensc, not sure if this helps but it looks like it's missing searchProviders=discover as a required param.

https://discover.provider.plex.tv/library/search?query=test&limit=30&searchTypes=tv&includeMetadata=1&searchProviders=discover is returning a 200 and data for me. I checked this through the plex watchlist UI and discovery is the same searchProviders value they're using there.

jakeclements commented 3 months ago

Looks like there's a PR open to fix it in python-plexapi already over here: https://github.com/pkkid/python-plexapi/pull/1437.

HomerBeer commented 3 months ago

Is this problem solved with a new update?

jakeclements commented 3 months ago

I expect it will be once that PR is merged and a new version published. Looks like it's yet to be merged currently.

glensc commented 3 months ago

@HomerBeer what new update? add references to your claims.

glensc commented 3 months ago

Reproduced myself too

WARNING  HTTPSConnectionPool(host='metadata.provider.plex.tv', port=443): Read timed out. (read timeout=30) for                                        
         plextraktsync.plex.PlexLibraryItem.get_guids(), retrying after 1 seconds (try: 1/5)                                                           
Processing Plex watchlist 100% ERROR    Freeway: Searching Plex Discover error: (400) bad_request;                                                                                    
         https://discover.provider.plex.tv/library/search?query=Freeway&limit=30&searchTypes=movies&includeMetadata=1 {"Error":{"error":"Bad           
         Request","message":"Missing required param searchProviders!","statusCode":400}}                                                               
INFO     Skipping Freeway (1996) from Trakt watchlist because not found in Plex Discover    
HomerBeer commented 3 months ago

Yes, the same error.. i thought that jakeclements had the solution for this.

glensc commented 2 months ago

Fixed by https://github.com/Taxel/PlexTraktSync/pull/2008