Commit graph

1452 commits

Author SHA1 Message Date
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
JonnyWong16
f0ed19c2fe
Add PlayedUnplayedMixin (#984)
* Add PlayedUnplayedMixin

* Deprecate Video isPlayed, markWatched, and markUnwatched

* Rename all deprecated methods

* Return self to enable method chaining

* Update tests for audio markPlayed / markUnplayed using history

* Remove duplicate video history tests
2022-08-26 12:14:24 -07:00
JonnyWong16
716d8edb52
Add ability to toggle account view state syncing (#983)
* Add method to enable/disable view state syncing

* Add tests for view state sync
2022-08-26 12:00:46 -07:00
meisnate12
6b29307aa2
Add ManagedHub Object and methods (#785) 2022-08-26 10:43:47 -07:00
JonnyWong16
b919c20e69
Release 4.12.1 2022-08-05 20:26:37 -07:00
JonnyWong16
bb860ef3d4
Remove timeout argument from preferred_connections (#1005) 2022-08-05 20:16:29 -07:00
JonnyWong16
db03046d2c
Fix resource mixins to use ratingKey instead of key (#992) 2022-08-05 19:53:06 -07:00
JonnyWong16
bf0ba67974
Update search operator docs (#993) 2022-08-05 19:52:51 -07:00
JonnyWong16
22dcd5dc5d
Remove unused timeout parameter from preferred_connections doc string (#987) 2022-08-05 19:52:34 -07:00
Rui Carmo
a7e87a583f
Expose callbackError parameter in PlexServer.startAlertListener() (#985)
* Expose callbackError

This makes it easier to catch errors without separately instantiating an AlertListener

* Update docstring.

* Fix docstring

Removed post-argument note, incorporated suggestion.
2022-08-05 19:52:09 -07:00
JonnyWong16
3a56c69078
Release 4.12.0 2022-07-20 20:56:58 -07:00
JonnyWong16
13282f157b
Use fetchItem for MyPlexAccount.userState() (#982) 2022-07-20 20:12:30 -07:00
JonnyWong16
71d11a4280
Fix Artists.matches() when searching by title (#981) 2022-07-20 20:10:25 -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
925f573ced
Create separate PlexSession objects (#931)
* Add base findItem method

* Create new PlexSession objects

* PlexSession objects are unique from their base media objects. These objects are built from `/status/sessions` instead of `/library/metadata/<ratingKey>`. This allows reloading data from sessions without overwriting them.

* Add some media and client attributes for sessions

* Add separater property to return the PlexSession user object

* This speeds up building the `PlexSession` object since it doesn't need to lookup the user.
* The user object is also cached for future lookups.

* Remove PlexSession attributes from tests

* Never auto reload a PlexSession object

* Rename PlexSession.usernames for backwards compatibility

Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>

* Don't cache myPlexAccount in PlexSession

* Move session stop method to PlexSession

Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2022-07-20 20:03:20 -07:00
JonnyWong16
d09cc47562
Use /related endpoint for hubs (#978) 2022-07-20 19:49:11 -07:00
JonnyWong16
f5673294c7
Remove check for playQueueType when adding items to a PlayQueue (#977)
* Remove check for playQueueType when adding items to a PlayQueue

* Fix PlayQueue doc strings
2022-07-20 19:49:02 -07:00
JonnyWong16
9f7f11ba9c
Add support for Plex OAuth (#974)
* Add method to return Plex OAuth url

* Add helper utils function for Plex OAuth
2022-07-20 19:48:52 -07:00
JonnyWong16
3107e25a0e
Fix searching and browsing Discover results (#970)
* Fix discover search results

* Plex API response changed to separate "Free on Demand" and "More Ways To Watch"

* Add test for searchDiscover

* Manually set watchlist and discover result to online metadata objects

* Replace all key format ratingKey with key

* Add libtype argument to searchDiscover

* Update tests for searchDiscover libtype

* Add includeUserState=1 parameter to Discover results details key

* Add method to return UserState object
2022-07-20 19:37:48 -07:00
JonnyWong16
117af58897
Add guids attribute to Artist, Album, and Track (#968)
* Add guids attribute to Artist, Album, and Track

* PMS 1.27.0.5897 adds `<Guid>` tags with MusicBrainz ID to artists, albums, and tracks.

https://forums.plex.tv/t/plex-media-server-forum-preview-for-music-metadata/785088
https://forums.plex.tv/t/plex-media-server/30447/510

* Update audio guid tests
2022-07-20 19:35:46 -07:00
JonnyWong16
caca24f10f
Add MediaPartStream.languageTag attribute (#959)
* Add `MediaPartStream.languageTag` attribute

* Add `languageTag` to tests
2022-07-20 19:06:06 -07:00
JonnyWong16
76240dc7a8
Add method to switch Plex Home users (#958)
* Add method to switch Plex Home users

* Update user parameter types in doc strings
2022-07-20 19:05:29 -07:00
Matt McDowall
188b4a4e7e
Define ratingCount attribute in doc (#955) 2022-07-20 19:03:00 -07:00
JonnyWong16
9e918a43a7
Release 4.11.2 2022-05-30 09:06:09 -07:00
Elan Ruusamäe
650fbac312
Remove extending from (object), not needed in Python 3 (#943) 2022-05-30 09:05:00 -07:00
JonnyWong16
f16058fa03
Minor improvements to fetching season/show (#950)
* Check parentIndex is an integer for Episode.seasonEpisode

* Saves an extra API call to `season()` for Season 0 (Specials)

* Use parentKey and grandparentKey to fetch show
2022-05-30 09:01:55 -07:00
JonnyWong16
f7f2b6b115
Make sure PlexObject private attributes are set before loading data (#946) 2022-05-30 08:53:27 -07:00
jjlawren
e78835b234 Release 4.11.1 2022-05-19 14:48:39 -05:00
jjlawren
8e099dd15c
Avoid overwriting auto-reloaded attributes with None (#944) 2022-05-19 14:48:01 -05:00
JonnyWong16
8d805968c4
Release 4.11.0 2022-05-18 11:12:54 -07:00
JonnyWong16
fba0dbccf2
Add support for watchlists and streaming services (#922)
* Remove Plex news

* Replace requests with query method for online hubs

* Add myPlexAccount watchlist methods

* Add mixin for objects that can be added to watchlist

* Add tests for watchlist

* Always split ratingKey from guid for watchlist

* Add method to retrieve streaming service availability

* Add test for streaming service availability

* Add filtering and sorting for watchlists

* Fix watchlist tests

* Add method to check if an item is on a user's watchlist

* Update watchlist tests

* Make account optional for WatchlistMixin

* Add Discover search

* Use manuallyLoadXML method for Discover search results

* Remove webshows and podcasts

* Fix WatchlistMixin account AttributeError

* Add BadRequest exception when adding to/removing from watchlist

* Update watchlist tests for BadRequest

* Update watchlist doc strings
2022-05-18 11:04:18 -07:00
JonnyWong16
ecd0d9530c
Add collection label to search filters (#937) 2022-05-16 20:03:46 -07:00
JonnyWong16
8303d6fa2c
Allow disabling auto-reloading when accessing missing attributes (#935)
* Rename _autoReload to _overwriteNone

* Allow disabling auto reloading

* Update test for disabling auto reloading

* Change autoReload to private attribute
2022-05-16 20:03:06 -07:00
JonnyWong16
b14a653a3b
Fix PlexServer.isBrowsable(path) when running Plex API on a different OS (#933) 2022-05-16 19:58:52 -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
JonnyWong16
2683655dcf
Get album track by track number without keyword argument (#918)
* Get album track by track number

* Update tests for `Album.track()`

* Also updates test for `Season.episode()`
2022-05-16 19:52:16 -07:00
JonnyWong16
153ef66df0
Add method to manually run butler tasks (#916)
* Add butler tasks

* Add tests for butler tasks
2022-05-16 19:51:39 -07:00
Karthikeyan Singaravelan
e0eb619561
Set daemon attribute instead of using setDaemon method that was deprecated in Python 3.10. (#913) 2022-05-16 19:46:21 -07:00
JonnyWong16
82aede202d
Use breadth-first search when using rtag (#912) 2022-05-16 19:46:10 -07:00
Kian-Meng Ang
398c058f18
Fix typos (#939) 2022-05-16 15:39:42 -05:00
jjlawren
8429cfd94d Release 4.10.1 2022-03-17 16:54:51 -05:00
jjlawren
d03a27450d
Allow exclusion keys in sharing settings (#908) 2022-03-17 16:54:27 -05:00
jjlawren
549e76b25a
Fix playMedia and goToMedia when using a different PMS (#907) 2022-03-17 15:49:33 -05:00
Zac West
ae30818ba5
Enable external media in responses, e.g. Tidal (#905) 2022-03-17 15:46:05 -05:00
JonnyWong16
bb4d0dbf1d
Release 4.10.0 2022-02-26 23:42:22 -08:00
JonnyWong16
49388558c3
Fix Artist.album() to return special albums (#896) 2022-02-26 23:16:48 -08:00
JonnyWong16
372e620d60
Add support for collection "filtering based on user" advanced setting (#894)
* Add collectionFilterBasedOnUser attribute

* Add filterUserUpdate method

* Check for smart collection for updateSort

* Update test collection filterUserUpdate
2022-02-26 22:50:04 -08:00
JonnyWong16
0cb8712896
Add missing Track.skipCount attribute (#893)
* Add track skipCount attribute

* Add track.skipCount to tests
2022-02-26 22:31:21 -08:00
JonnyWong16
87a7ec6ddf
Add Video.audioStreams() convenience method (#891)
* Add Video.audioStreams() convenience method

* Add test for Video.audioStreams()
2022-02-26 22:24:43 -08:00