* Disallow using smart playlist with items
* Change exception message
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
* Also check for state when creating collections
---------
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
* Add sonicAdventure method to MusicSection
* satisfy flake8
* sonicAdventure accepts Track as param
* test with both types for sonicAdventure
* Add authentication to recently added music test
* Fix test_library.py to include missing newline character
* Add sonicAdventure method to Track class
* fix doc as suggested
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
* fix bound on sonicAdventure method
- add type to docstr
* Apply suggestions from code review
- pass in plexpass account to tests
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
* make tests pass on bootstrap
- still asserts it is an iterable
- still checks all elements are tracks
- in case no adventure found, does not fail
---------
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
* Change regex/iregex to use re.search instead of re.match
This is BREAKING CHANGE
* Also cast to bool.
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
---------
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
* Add source property to Video
A Playlist entry if added a remote server item has field "source" initialized with value like `server://<server_id>/com.plexapp.plugins.library`
* Add source to Episode
* Fix flake8 error
E261 at least two spaces before inline comment
* Add source to Track
* Add source to Photo
* Rename the field to sourceURI
* Update plexapi/audio.py
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
* Update plexapi/photo.py
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
* Update plexapi/video.py
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
* Update plexapi/video.py
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
* Fix flake line length issue
---------
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
* Update imdb guid filter with full agent name
it does not work otherwise like "^" anchor is used in the filter
* Add legacy imdb tt* for imdb to guid filter
* Add new agent Guid tag filtering example
* Add themoviedb prefix as well
* Simplify MediaPart._buildStreams
* Remove isChildOf check for photo and track attributes
* Add parent object when automatically building PlexObject
* Remove check of track only attribute in tests
* Add support for on-demand subtitle search
* Clean up uploadSubtitles and removeSubtitles methods
* Add test for on-demand subtitles
Account is required for on-demand subtitles
* Add hearingImpaired and perfectMatch to SubtitleStream attributes
* Update subtitle score doc string
The score is the OpenSubtitles download count
Ref: https://forums.plex.tv/t/subtitle-search-update-opensubtitles/862746
* Move videoStreams, audioStreams, lyricStreams to Playable
* Add lyricStreams to Playable
* Simplify returning list of streams
* Add test for track.lyricStreams()
* Add sonicallySimilar method to Audio class
closes#1183
* Add type hinting for method
- fixes import error
* Apply review suggestions
Co-Authors @JonnyWong16
* Add optional parameters to sonicallySimilar method
- makes it so that params can be None and use the server default
* add test for `sonicallySimilar`
* Refactor test to check type of elements
* Apply suggestions
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
* Add authentication to sonicallySimilar test in
test_audio.py
* fix flake8
---------
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
* 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>
* Fix minor typo
* Update algorithm for parsing #1274
* Match style guide of the module
* Fix Edge Cases
- `and` is now considered the default operation instead of raising error
- fix algorithm so that the reserved keys are parsed in the filters dictionary instead of filters group when located later in the feed.
- removed some code repetition
* Join multiple filters by default
If multiple filter groups are parsed they are joined by `and` instead of raising error.
* fix `==` operator parsing
transfers "=" from the value to key
* fix typehinting
* Add new test for smart Filters
this test would fail on old algorithm despite it being logically the exact same filter.
* add test for deeply nested filters
* combine filters test for playlist
* combine filters test for collections
* fix typo
* add test to check parsed fitlers as it is
* edited test to be independent of the server
* Apply suggestions from code review
adhere to style guide of the project
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
---------
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>