Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter parsing returns unknown keys group and having #1285

Closed
Dr-Blank opened this issue Nov 6, 2023 · 0 comments · Fixed by #1286
Closed

Filter parsing returns unknown keys group and having #1285

Dr-Blank opened this issue Nov 6, 2023 · 0 comments · Fixed by #1286

Comments

@Dr-Blank
Copy link
Contributor

Dr-Blank commented Nov 6, 2023

Describe the Bug

plexapi.exceptions.NotFound: Unknown filter field "group" for libtype "track". Available filter fields: ['track.mood', ...

similar error is raised for key "having".

these two keys are part of the content url form pms when the playlist is the default smart playlist built by the server, namely "❤️ Tracks" and "Fresh ❤️"

Code Snippets

playlist_filters = playlist.filters()  # parse filters
Playlist.create(
                swerver,
                playlist.title,
                smart=playlist.smart,
                filters=playlist_filters["filter"],  # use the parsed filters
                section=section,
            )  # will raise above error

Expected Behavior

no errors when the parsed filters are reused to build the playlist

Additional Context

the keys are as below
{'group': 'guid'}, {'having': 'min(album.originallyAvailableAt)'}

Operating System and Version

Windows 10 64-bit

Plex Media Server Version

1.32.7.7621

Python Version

3.11.0b1

PlexAPI Version

4.15.5

Dr-Blank added a commit to Dr-Blank/python-plexapi that referenced this issue Nov 6, 2023
JonnyWong16 added a commit that referenced this issue Nov 13, 2023
* Add support for 'group' and 'having' keys in
SmartFilterMixin

- fixes #1285

* Add `group` and `having` fields to `additionalFields` list in `FilteringType` class

- This should allow passing the parsed filters back into `search()`.

Co-Authored-By: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>

---------

Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant