jurialmunkey / plugin.video.themoviedb.helper

GNU General Public License v3.0
200 stars 95 forks source link

[BUG] without_genres won't work #910

Closed roidy closed 1 year ago

roidy commented 1 year ago

Describe the bug

I'm trying this discover path:-

plugin://plugin.video.themoviedb.helper/?info=discover&tmdb_type=tv&with_watch_providers=337&watch_region=US&sort_by=release_date.desc&with_original_language=en&without_genres=99

This should return TV Shows from Disney+ (337) sorted by release date descending while excluding Documentaries (99)

However the the second and third returned items are both documentaries.

If I then try to filter out multiple genres using:-

plugin://plugin.video.themoviedb.helper/?info=discover&tmdb_type=tv&with_watch_providers=337&watch_region=US&sort_by=release_date.desc&with_original_language=en&without_genres=99/10763/10764/10767&with_separator=OR

To filter out Documentaries (99), News (10763), Reality (10764) and Talk (10767) I get back a list that just looks like random items.

If I then goto themoviedb api site and use this api request:-

https://api.themoviedb.org/3/discover/tv?api_key=xxxxxxx&with_original_language=en&region=US&sort_by=release_date.desc&include_adult=false&include_video=false&page=1&without_genres=99%2C10763%2C10764%2C10767&with_watch_providers=337&watch_region=US

I get a perfect date ordered list of Disney+ shows that excludes all the genres I listed.

Is this a bug or just user error on my part?

Checklist

jurialmunkey commented 1 year ago

You're missing with_id=True

If you don't set with_id then tmdbhelper assumes you've passed text and will try to search an id first before making the request.

roidy commented 1 year ago

Thanks, but after adding with_id=True filtering out a single genre:-

without_genres=99

Works perfectly, however filtering out multiple genres:-

without_genres=99/10763/10764/10767&with_separator=OR

Still doesn't work, I get back a list with all the Genres I want to remove, still there.

jurialmunkey commented 1 year ago

You need spaces around your separator just like it was a text label from Kodi. The separator Kodi uses is " / " not "/"

roidy commented 1 year ago

Brilliant that works perfectly. Your support is top notch, Thanks.

I realise now you've made it that way so you can pass in a correctly formatted info label ie. ListItem.Genres and it will just work.

Just a side note the spaces around the separator aren't shown in the wiki, it just shows "/"

https://github.com/jurialmunkey/plugin.video.themoviedb.helper/wiki/Lists-Discover

jurialmunkey commented 1 year ago

I realise now you've made it that way so you can pass in a correctly formatted info label ie. ListItem.Genres and it will just work.

Exactly. Otherwise I wouldn't bother with the space but this way it allows for dropping the infolabel in.

Just a side note the spaces around the separator aren't shown in the wiki, it just shows "/"

Ah thanks. Fixed now.