Commit graph

200 commits

Author SHA1 Message Date
JonnyWong16
01c8ff269d
Fix initializing metadata.provider.plex.tv multiple times (#1027) 2022-11-08 15:57:16 -08:00
JonnyWong16
9b0c8e5fd3
More f-string changes (#1025) 2022-11-08 13:40:18 -08: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
Joshua Peek
fbc124aa57
Fix searchDiscover handling invalid results (#1013)
* Filter out bad discover search results

An stub object is sometimes returned from the API that is marked as
`'external'` but has has no `'SearchResults'` key.

    {'id': 'external', 'title': 'More Ways To Watch', 'size': 0}

* Wrap line to fit 127c

* Ensure empty array for SearchResult
2022-08-27 06:24:10 -07:00
JonnyWong16
02e3ddf3c1
Add maxresults parameter to MyPlexAccount.watchlist() (#1009)
* Add `maxresults` parameter to watchlist

* Test watchlist maxresults
2022-08-27 00:20:11 -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
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
JonnyWong16
bb860ef3d4
Remove timeout argument from preferred_connections (#1005) 2022-08-05 20:16:29 -07:00
JonnyWong16
22dcd5dc5d
Remove unused timeout parameter from preferred_connections doc string (#987) 2022-08-05 19:52:34 -07:00
JonnyWong16
13282f157b
Use fetchItem for MyPlexAccount.userState() (#982) 2022-07-20 20:12:30 -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
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
Elan Ruusamäe
650fbac312
Remove extending from (object), not needed in Python 3 (#943) 2022-05-30 09:05:00 -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
Kian-Meng Ang
398c058f18
Fix typos (#939) 2022-05-16 15:39:42 -05:00
jjlawren
d03a27450d
Allow exclusion keys in sharing settings (#908) 2022-03-17 16:54:27 -05: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
JonnyWong16
777ea754be
Add methods for accepting and cancelling friend invites (#849)
* Add accepting and cancelling friend invites

* Add mocked tests for acceptInvite and cancelInvite

* Rename methods to pendingInvite
2021-11-20 16:16:01 -08:00
jjlawren
3b1dce7a8d
Decouple resource address sorting from connection attempts (#800)
* Decouple resource address sorting from connection attempts

* Fix lint

* Move defaults to class
2021-07-26 20:38:16 -05:00
JonnyWong16
753a67ffcd
Remove Content-type header from sync 2021-07-16 10:14:25 -07:00
blacktwin
54ce61b006 use rtag for roles and entitlements 2021-06-14 00:58:13 -04:00
JonnyWong16
4d60101ab7
Remove Account settings
* Settings are only for Plex Web specific settings like remembering selected tab, poster size, etc.
2021-06-06 17:23:48 -07:00
JonnyWong16
f8c7fefd2f
Cleanup Account onlineMediaSources OptOut methods 2021-06-06 17:23:44 -07:00
JonnyWong16
8f2ad955ab
Merge branch 'master' into reviews_extras 2021-06-06 15:02:03 -07:00
blacktwin
5013028344 SETTINGS url change and OPTOUT url creation 2021-05-31 09:46:46 -04:00
blacktwin
ca97c60dcb replace eval with json.loads 2021-05-31 09:20:19 -04:00
blacktwin
70ad8ba10c updateOptOut docstring 2021-05-28 11:59:02 -04:00
blacktwin
226b9834f7 MyPlex.settings slight clean up and property 2021-05-28 11:57:52 -04:00
blacktwin
277f2ea717 onlineMediaSources further clean up 2021-05-28 11:57:46 -04:00
blacktwin
76719d9c70 onlineMediaSources clean up 2021-05-28 11:57:40 -04:00
blacktwin
aa0596d2a1 SETTINGS url string substitution update %s instead of .format() 2021-05-28 11:56:22 -04:00
JonnyWong16
0095e83f75
Cleanup utils imports 2021-05-26 19:45:12 -07:00
JonnyWong16
f81456d3b6 Refactor usage of listAttrs 2021-05-24 17:37:46 -07:00
JonnyWong16
3fc69a3709
Refactor usage of findItems 2021-05-24 17:28:11 -07:00
blacktwin
c0b6efc23c
Merge branch 'master' into reviews_extras 2021-05-24 07:21:34 -04:00
JonnyWong16
a40063630d
Add method to switch users for a PlexServer 2021-05-11 16:38:50 -07:00
blacktwin
f92878d75f
Merge branch 'master' into reviews_extras 2021-04-12 13:08:29 -04:00
JonnyWong16
1c521308e2
Add totalViewSize method to LibrarySection and search bug fixes (#712)
* Fix more library section ID cast to int

* Add method to return library size for specific libtypes

* Add test for library totalViewSize

* Fix totalViewSize test episode count

* Don't need to use library _totalSize cache

* Validate title search arg as a filter kwarg

* Only validate search title if it is a list

* Update doc string for totalViewSize
2021-03-24 20:58:12 -05:00
JonnyWong16
f92d9d5e8c
Fix myplex share section ID cast to int (#708)
* Fix myplex share section ID cast to int

* Fix typo in search doc string
2021-03-22 14:31:54 -05:00
blacktwin
9d2ec9546e
Merge branch 'master' into reviews_extras 2021-03-09 08:26:52 -05:00
JonnyWong16
92490a2cdb
Update sharing doc strings 2021-02-26 22:51:22 -08:00
JonnyWong16
a263f49b10
Fix sorting of resource connections (#653)
* Fix sorting of resource connections

* Update resource connect doc strings

* flake8 single variable name connection
2021-02-01 21:59:34 -05:00
blacktwin
82e62644f5
Merge branch 'master' into reviews_extras 2021-01-25 10:07:08 -05:00
jjlawren
4da40789ea
Reduce log level of MyPlex resource connection attempts (#647) 2021-01-20 13:07:03 -05:00
blacktwin
35fb440cc1 update REMOVEINVITE string (#584) 2021-01-19 12:35:35 -05:00
blacktwin
ddbd07e571
Merge branch 'master' into reviews_extras 2021-01-18 15:53:40 -05:00
JonnyWong16
eeda5dfd67
Fix exception doc strings 2021-01-02 16:44:18 -08:00
JonnyWong16
f8c325ce2f
Add server dashboard bandwidth and resources 2021-01-02 16:44:02 -08:00
JonnyWong16
9d23ec072e
Fix race condition in create MyPlexDevice from #620 (#625)
* Make test Plex Pass entitlements a subset

* Fix create MyPlexDevice race condition

* Rename to clientId to be consistent

* Move link method to MyPlexAccount
2020-12-15 22:41:04 -06:00