Commit graph

401 commits

Author SHA1 Message Date
JonnyWong16
80fd90b687
Validate empty items explicitly (#1216) 2023-08-27 13:18:03 -07:00
JonnyWong16
ba0c27c6ef
Remove support for Python 3.7 (#1198)
* Remove support for Python 3.7

* Update CI workflow

* Manually update dependencies
2023-07-27 20:05:40 -07:00
JonnyWong16
c5108b1115
Add score and tagKey attribute to hub search results (#1186)
* Add `score` and `tagKey` attribute to hub search results

* Update tests for hub search result `score` and `tagKey` attributes
2023-07-27 18:08:46 -07:00
JonnyWong16
8298a61b64
Add search kwargs to LibrarySection.get() (#1191)
* Optimize methods to use library get/search

* Revert methods

* Fix reloading of episodes for missing parentRatingKey

* Add tests for LibrarySection.get with kwargs
2023-07-27 18:02:23 -07:00
JonnyWong16
9ede493f4c
Add LibrarySection methods to multi-edit items (#1184)
* Use generator for string join

* Group media type edit mixins

* Add UserRatingMixin

* Add LibrarySection methods to multi-edit items

* Remove deprecated banners

* Factor out resource lock/unlock mixins

* Update `fetchItems` to accept list of rating keys

* Add repr and helper methods to Common object

* Update tests
2023-07-27 14:45:23 -07:00
JonnyWong16
c8a555524e
Remove optional title argument from PhotoSection.searchAlbums() and PhotoSection.searchPhotos() (#1170)
* Remove optional `title` argument from `searchAlbums` and `searchPhotos`

* Update PhotoSection search tests
2023-07-27 14:35:02 -07:00
JonnyWong16
cde1e04495
Refactor fetchItems for pagination (#1143)
* Refactor base fetchItems for pagination

* Use base fetchItems for LibrarySection methods

* Use base fetchItems for MyPlexAccount watchlist

* Use base fetchItems for PlexServer history

* Fix imports
2023-05-24 14:50:30 -07:00
JonnyWong16
37b37f1af0
Fix code block doc string formatting (#1144) 2023-05-24 13:55:22 -07:00
JonnyWong16
b4c463aff8
Add support for Continue Watching hubs (#1131)
* Add methods to retrieve continue watching items

* Add methods to remove movies/episodes from continue watching

* Add tests for continue watching
2023-05-24 12:03:28 -07:00
JonnyWong16
f330d87d51
Fix getGuid doc string (#1068) 2022-12-21 11:52:29 -08:00
Elan Ruusamäe
7580fc84a9
Use cached_property decorator (#1065)
* Use @cached_property in PlexSession.user

* Use @cached_property in PlexServer.library

* Use @cached_property in PlexServer.settings

* Tests: Update clearing plex.settings cache

* Use @cached_property in LibrarySection.totalSize

* Add backports.cached-property==1.0.2; python_version<="3.7" dependency

* Import cached_property from dist or backports

* Add backports.cached-property to requirements_dev.txt

* Remove version pin for backports.cached-property in requirements.txt

Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>

Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
2022-12-21 11:51:45 -08:00
JonnyWong16
9dbb2e5169
Create music playlist from m3u file (#1055)
* Create music playlists from m3u files

* Add test for playlist m3u import

* Add createCollection examples
2022-12-21 11:32:43 -08:00
JonnyWong16
9b0c8e5fd3
More f-string changes (#1025) 2022-11-08 13:40:18 -08:00
JonnyWong16
2f52b300f1
Fix library guid search (#1024)
* Fix library guid search

* PMS 1.28.2.6151-914ddd2b3 no longer allows `guid!=` search

* Update library search operators doc string for guid
2022-09-08 14:58:04 -07:00
JonnyWong16
020a32f2b8
Update PlexAPI to f-strings (#1000)
* Update plexapi to f-strings

* Update tests to f-strings
2022-08-27 22:56:01 -07:00
JonnyWong16
d1211722c8
Use pagination for /all endpoints (#990) 2022-08-26 22:45:15 -07:00
JonnyWong16
c8854c64c9
Add return self to various methods to support chaining (#986)
* Add return self to various methods to support chaining

* Fix runButlerTask test
2022-08-26 14:44:50 -07:00
meisnate12
6b29307aa2
Add ManagedHub Object and methods (#785) 2022-08-26 10:43:47 -07:00
JonnyWong16
bf0ba67974
Update search operator docs (#993) 2022-08-05 19:52:51 -07:00
JonnyWong16
f62dcbc5a4
Fix Video.optimize() method (#965)
* Add PlexObjects for all library media tags

* Add method to return all library media tags

* Add test for Library.tags

* Update Video.optimize

* Update video optimize test

* Use TAGTYPE for LibraryMediaTags

* Accept LibraryMediaTag as a search filter

* Use ratingKey and id before key in repr
2022-07-20 20:07:39 -07:00
JonnyWong16
ecd0d9530c
Add collection label to search filters (#937) 2022-05-16 20:03:46 -07:00
JonnyWong16
6fc7d95266
Add support for Plex guid in LibrarySection.getGuid() (#926)
* Add support for Plex guid in `LibrarySection.getGuid()`

* Update getGuid test with Plex guid
2022-05-16 19:54:51 -07:00
jjlawren
caf3910057
Ignore whitespace in library section lookup (#888) 2022-02-26 20:31:54 -08:00
ReenigneArcher
3917b335ca
Fix various typos (#880)
* Fix various typos

* Fix various typos in tests

* Fix typos in `tests`

* Fix more typos

* Fix hasScalingMatrix test

Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
2022-02-26 19:26:08 -08:00
meisnate12
2f101e3899
Add LabelMixin to Season, Episode, Artist, and Track objects (#872)
* Add LabelMixin to Episode class

* Add test_mixins.edit_label(episode) test

* Add Label Mixin to Season, Artist,and Track

* fix tests

* Load manual FilteringFields for labels

* Load manual FilteringFilters for labels

Co-authored-by: Elan Ruusamäe <glen@pld-linux.org>
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
2022-02-26 17:32:18 -08:00
jjlawren
9b3b65bcaf
Support global hubs (#873)
* Get global hubs

* Add hub filtering arguments

* Simplify
2022-01-23 20:40:35 -08:00
JonnyWong16
b89bd23652
Change MusicSection.stations() to return Playlist objects (#871)
* Fix library stations

* `LibrarySection.stations()` returns a list of `Playlist` station objects

* Add test for MusicSection stations
2022-01-23 20:40:04 -08:00
JonnyWong16
0620eb4bf0
Fix Agent object settings (#864)
* Fix mediaType argument for PlexServer.agents()

* Cleanup Agent and AgentMediaType attributes

* Add `DeprecationWarning` to `languageCode`

* Make Agent.settings() method public

* Add `DeprecationWarning` to `Agent._settings()`

* Fix parsing Setting.enumValues

* XML attribute for agent settings uses `values` instead of `enumValues`

* Add secure and option attributes to Setting

* Add test for server agents
2022-01-23 16:15:10 -08:00
JonnyWong16
d2c849fa5e
Improve getGuid method (#862)
* Improve getGuid method

* Update getGuid test
2022-01-23 16:13:30 -08:00
JonnyWong16
fcbea70549
Add methods to lock and unlock a field for all items in a library (#861)
* Add plex folder to .gitignore

* Add method to lock/unlock a field for all items in a library

* Add test to lock/unlock all posters in a library
2022-01-23 16:11:20 -08:00
blacktwin
34f0125e12 docstring line 2022-01-05 22:54:57 -05:00
blacktwin
0882b8f9fc minor docstring update 2022-01-05 22:50:27 -05:00
blacktwin
624af2e4c5 remove use of Path objects for adding and removing locations 2022-01-05 09:06:35 -05:00
blacktwin
4f340d0ce4 var renaming for consistency 2022-01-03 16:57:29 -05:00
blacktwin
54897d2e9e This reloading was removed in #855. 2022-01-03 16:56:38 -05:00
blacktwin
f8e2b06998 unexpected unindent 2021-12-20 00:44:45 -05:00
blacktwin
55279799da
docstring indention fixes 2021-12-20 00:33:21 -05:00
blacktwin
7390a9ba0c copy/paste oops 2021-12-19 23:09:06 -05:00
blacktwin
9586d8f09d fix up for addLocations, only check paths that are being added not existing paths. 2021-12-19 23:09:06 -05:00
blacktwin
4c519c62dc remove underscores 2021-12-19 23:09:06 -05:00
blacktwin
c2facf0144
Merge branch 'master' into libraryEditUpdates 2021-12-19 22:20:13 -05:00
blacktwin
5cf95e53d0 we are unable to remove all locations from a library
the result of posting this request is nothing
to reduce confusion add a check for locations size after removals
2021-12-19 22:05:58 -05:00
blacktwin
d1b190375a fix up removeLocation method 2021-12-19 22:04:05 -05:00
blacktwin
d04bf034f7 Use .get() for kwargs location for when not editing library locations
build location list inside path checking loop
2021-12-19 22:03:32 -05:00
blacktwin
1aa704324e add paths inside valid path check loop 2021-12-19 21:20:30 -05:00
blacktwin
824be407d0 remove path check on str in add() method 2021-12-19 21:11:56 -05:00
blacktwin
d3b0d7b09b remove list check in add() method 2021-12-19 21:09:49 -05:00
blacktwin
7e14d2d315 check for valid paths in addLocation and removeLocation methods 2021-12-18 23:48:53 -05:00
blacktwin
ba490c7f67 refactor edit method for correcting location param 2021-12-18 23:47:11 -05:00
JonnyWong16
a8136d2776
Change LibrarySection.reload() to reload in-place (#855)
* Fix LibrarySection reload in-place to mimic PlexObject reload

* Don't reload LibrarySection after edit

* Also mimics PlexObject.edit()

* Update library section edit test
2021-11-20 16:35:37 -08:00