Commit graph

215 commits

Author SHA1 Message Date
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
JonnyWong16
121d54d86c
Retrieve device using clientIdentifier 2020-12-06 17:42:44 -08:00
JonnyWong16
966ac5515b
Allow custom headers for MyPlexPinLogin 2020-12-06 17:42:44 -08:00
JonnyWong16
9adf29f2c6
Update MyPlexPinLogin for Plex API v2
* Also adds method to link a device using the pin
2020-12-06 17:42:44 -08:00
Steffen Fredriksen
ad7709611e
Merge pull request #608 from JonnyWong16/bugfix/doc_build
Update building documentation using napoleon
2020-12-05 14:12:21 +01:00
jjlawren
f4229050d4
Allow setting token env in tests (#610)
* Allow setting token env for test runs

* Use existing config option

* Use token in CI tests
2020-12-04 11:37:19 -06:00
JonnyWong16
b451b22bb8
Fix doc building 2020-11-23 12:20:56 -08:00
JonnyWong16
274b05e913
Fix raise exception docs 2020-11-22 20:43:59 -08:00
JonnyWong16
7f7d03236b
Fix docstrings 2020-11-22 19:06:30 -08:00
blacktwin
bb9a1b2573 flake fix 2020-08-31 21:12:36 -04:00
blacktwin
132e37995d
Merge branch 'master' into reviews_extras 2020-08-30 02:21:51 -04:00
blacktwin
de83d245c8 add updateOptOut method for MyAccount.AccountOptOut class 2020-08-30 02:02:07 -04:00
blacktwin
1316d4ae43 spacing 2020-08-30 01:18:26 -04:00
blacktwin
998ed04a6c update docstrings for AccountSettings and AccountOptOut 2020-07-16 21:21:26 -04:00
blacktwin
b917a33131 create settings method and myplex.AccountSettings class 2020-07-16 21:05:35 -04:00
blacktwin
120dbc5f1c create AccountOptOut class 2020-07-16 21:01:49 -04:00
blacktwin
50515730b0 create onlineMediaSources method
pulls in opt in/out status of Online Media Sources
2020-07-16 21:00:45 -04:00
blacktwin
fd89bacba2 add SETTINGS endpoint for user settings 2020-07-16 20:59:27 -04:00
Jason Lawrence
4c8fef144e Fix ElementTree warnings 2020-06-29 17:31:05 -05:00
jjlawren
4a24d50036
Reduce timeout to expire Sonos resource cache (#500) 2020-05-27 09:36:55 -05:00
jjlawren
4193012bc2
Improve Sonos ID lookup (#496) 2020-05-26 15:09:39 -05:00
Jason Lawrence
735e26f257 Sonos lookup fixes and tests 2020-05-15 08:45:46 -05:00
Hellowlol
940efc0013 first pass on compat. 2020-05-12 23:15:16 +02:00
Jason Lawrence
95188b0f72 Add Sonos cache & speaker lookup methods, set X-Plex-Client-Identifier 2020-04-28 15:19:18 -05:00
Jason Lawrence
55b335ee7c Add lookup & control of linked Sonos speakers 2020-04-28 14:06:26 -05:00
Sascha Montellese
62cb7585ca Add myplex.MyPlexPinLogin 2020-04-20 23:14:15 +02:00
Jason Lawrence
a6cfe4225a Raise NotFound on 404 errors 2020-04-15 17:09:27 -05:00
blacktwin
ba1559dcdc flake fix
line too long
2020-04-13 13:30:54 -04:00
blacktwin
4cbccabee8
Merge branch 'master' into new_hubs 2020-04-12 22:40:15 -04:00
jjlawren
dd91ae41f4
Use Unauthorized exception (#447)
* Use Unauthorized exception in server, myplex, client
2020-04-09 15:56:26 -05:00
Hellowlol
18afdc2ec8 some linting 2020-03-14 15:52:54 +01:00
blacktwin
3ca655b9a8 update news method with correct url 2020-02-10 11:18:42 -05:00
blacktwin
11a1b6e449 remove 'hubs/' from global vars and append to methods
setting global var without hubs for future reference
2020-02-10 11:13:53 -05:00
blacktwin
0dfae68830 update NEWS endpoint 2020-02-06 13:23:07 -05:00
blacktwin
0259eeacbe correct new tidal method 2020-02-06 13:06:39 -05:00
blacktwin
25431b0e9a correct new podcasts method 2020-02-06 13:06:26 -05:00
blacktwin
6469e68070 correct new news method 2020-02-06 13:06:11 -05:00
blacktwin
e399e54d6a correct new webShows method 2020-02-06 13:05:50 -05:00
blacktwin
88b5016fb8 correct new videoOnDemand method 2020-02-06 13:05:19 -05:00
blacktwin
206fa231c7 update tidal to use batchingItems 2019-12-06 00:39:15 -05:00
blacktwin
fdc8c9ec93 update podcasts to use batchingItems 2019-12-06 00:39:00 -05:00
blacktwin
688f78a4ec update news to use batchingItems 2019-12-06 00:38:48 -05:00
blacktwin
320a99cc4d update webShows to use batchingItems 2019-12-06 00:38:31 -05:00
blacktwin
f849693646 update videoOnDemand to use batchingItems 2019-12-06 00:38:09 -05:00
blacktwin
0e69be702e remove Hub import 2019-12-06 00:37:31 -05:00
blacktwin
9b84b0deae import library Hub class 2019-12-05 13:03:27 -05:00
blacktwin
d6f7ad7e10 Adding music/tidal url and function 2019-12-05 13:02:22 -05:00
blacktwin
f7938cf06e Adding podcasts url and function 2019-12-05 13:00:29 -05:00
blacktwin
922845d7b6 Adding news url and function 2019-12-05 12:57:27 -05:00
blacktwin
bd2519b35b Adding webshows url and function 2019-12-05 12:55:39 -05:00
blacktwin
3caf0dab42 Adding videoOnDemand url and function 2019-12-05 12:54:18 -05:00
zSeriesGuy
59ce923559 Add maxResults and mindate to all history methods 2019-11-20 06:50:25 -05:00
zSeriesGuy
d9820775a6 Add additional histroy methods 2019-11-16 16:35:20 -05:00
Hellowlol
810b469add lint myplex 2019-09-21 23:22:54 +02:00
blacktwin
654f25b3f8
Add removeHomeUser
Add ability to remove a Home User. If Home User is an Existing Plex User then User will go back into Sharing/Friends with sections and settings carrying over. Any Home User settings (LiveTV) are removed.
2019-07-25 08:33:56 -04:00
blacktwin
a7df2a9ed8
adding createExistingUser
Add ability to create an Existing Plex User. If User already exists in Sharing/Friends, sections and settings carry over. If User does not already exist in Sharing/Friends, sections and settings can be assigned.
2019-07-25 08:25:32 -04:00
blacktwin
c719c90a7a
adding createHomeUser
add ability to create a Home User with sections and settings
2019-07-25 08:14:21 -04:00
blacktwin
d71ce739c0
update docstring
update docstrings for usage of `inviteFriend` and `updateFriend`. Previous doc suggested that if `None` then all sections were selected. If `None` no sections will be selected.
2019-07-22 15:37:37 -04:00
Nate Harris
fab1010066
Updated attributes documentation 2019-07-16 13:21:56 -04:00
Paulus Schoutsen
9498d1d751
Don't warn when also raising exception
We should not log warnings if we are also raising exceptions. It is up to the caller to decide how to handle the error and if they should notify the user. 

This was triggered because I got logs for bad requests for 401 Unauthorized.
2019-05-21 20:32:00 -07:00
Andrey Yantsen
7a67417615 fix docs for Raises clauses 2018-10-03 11:09:43 +01:00
Andrey Yantsen
12a318a8e2 Add a method to request a claim token (#287)
* add MyPlexAccount.claimToken()

* improve docstring for MyPlexAccount.claimToken()
2018-09-14 20:52:26 +02:00
Andrey Yantsen
93ec86d746 add enable_fast_connect configuration parameter (#288) 2018-09-14 20:28:35 +02:00
Andrey Yantsen
68fc970d7a Improvements in tests process (#297)
* lets begin

* skip plexpass tests if there is not plexpass on account

* test new myplex attrubutes

* bootstrap: proper photos organisation

* fix rest of photos tests

* fix myplex new attributes test

* fix music bootstrap by setting agent to lastfm

* fix sync tests

* increase bootstrap timeout

* remove timeout from .travis.yml

* do not create playlist-style photoalbums in plex-bootstraptest.py

* allow negative filtering in LibrarySection.search()

* fix sync tests once again

* use sendCrashReports in test_settings

* fix test_settings

* fix test_video

* do not accept eula in bootstrap

* fix PlexServer.isLatest()

* add test against old version of PlexServer

* fix MyPlexAccount.OutOut

* add flag for one-time testing in Travis

* fix test_library onDeck tests

* fix more tests

* use tqdm in plex-bootstraptest for media scanning progress

* create sections one-by-one

* update docs on AlertListener for timeline entries

* fix plex-bootstraptest for server version 1.3.2

* display skip/xpass/xfail reasons

* fix tests on 1.3

* wait for music to be fully processed in plex-bootstraptest

* fix misplaced TEST_ACCOUNT_ONCE

* fix test_myplex_users, not sure if in proper-way

* add pytest-rerunfailures; mark test_myplex_optout as flaky

* fix comment

* Revert "add pytest-rerunfailures; mark test_myplex_optout as flaky"

This reverts commit 580e4c95a7.

* restart plex container on failure

* add conftest.wait_until() and used where some retries are required

* add more wait_until() usage in test_sync

* fix managed user search

* fix updating managed users in myplex

* allow to add new servers to existent users

* add new server to a shared user while bootstrapping

* add some docs on testing process

* perform few attemps when unable to get the claim token

* unlock websocket-client in requirements_dev

* fix docblock in tools/plex-teardowntest

* do not hardcode mediapart size in test_video

* remove cache:pip from travis

* Revert "unlock websocket-client in requirements_dev"

This reverts commit 0d536bd06d.

* remove debug from server.py

* improve webhook tests

* fix type() check to isinstance()

* remove excessive `else` branch due to Hellowlol advice

* add `unknown` as allowed `myPlexMappingState` in test_server
2018-09-14 20:03:23 +02:00
Andrey Yantsen
afd4e24420 fix myplexaccount initialization (#296) 2018-09-08 19:59:10 +02:00
Andrey Yantsen
9e04a4f999 Populate subscription related fields in MyPlexAccount (#289)
* populate subscription related fields in MyPlexAccount

* improve reading with .iter()
2018-09-08 17:28:26 +02:00
Andrey Yantsen
54b26fdc25 Sync support (#282)
* [sync] initial commit

* fix populating of `state` field in sync.Status

* [connection] add posibliity to return first established connection faster

* [base] add timeout argument to PlexObject.fetchItems()

* [sync] add timeout arg to SyncItem.getMedia()

When you have multiple media within one SyncItem it takes a lot of time
to get all the info for this media (on my machine it takes about a
second for each movie).

* [sync] fix marking media as downloaded

* [sync] pass clientIdentifier to created SyncItem()

* [sync] override __repr__() for sync.Status

* fix after @mikes-nasuni`s review

* fix python2 compatibility

* get rid of sync.init()

* use list comprehension

* remove timeout from PlexObject.fetchItems()

* fix SyncItem under python 2.7

* fix __doc__ in sync module

* revert myplex._connect() back to it`s original state

* improve sync docs

* get rid of PlexObjects where not needed

* add X-Plex-Sync-Version=2 to headers

* add sync() method into Video, LibrarySection and MyPlexAccount

* add SyncItem.delete()

* add sync.Policy.create()

* use self._default_sync_title instead of _prettyfilename as default title

* let the tests begin

* add items for refreshing synclists to PlexServer

* fix sync tests

* sync for everybody!

* add TODO doctring for Audio._defaultSyncTitle()

* SyncItems tag may be presented only once, there is no need for loop

* add more TODO docstrings

* hello docs

* remove relative import

* remove unused variable from tests/test_sync.py
2018-09-08 17:25:16 +02:00
Hellowlol
6238fa5fd2 fix bug so device returns a object as it should. 2018-04-03 23:08:17 +02:00
Hellowlol
b111e2490e add more missing stuff from /resources. 2018-03-02 19:11:43 +01:00
Hellowlol
3af2a5af59 Add support for relay 2018-03-02 19:02:22 +01:00
ninthwalker
c091c39c3c
update plexurl
It appears plex is doing away with the plexapp.com url.
It no longer has a valid SAN cert for that domain as it redirects to plex.tv now.
Update myplex.py to reflect new signin URL.
2018-01-11 13:48:23 -08:00
Hellowlol
0f16ea9cb7 fix invite and add editfriend. 2017-10-28 22:58:47 +02:00
Hellowlol
807b6ebc3c add more tests to inc cov. 2017-10-25 21:53:52 +02:00
Hellowlol
0e4d53a74c fix python 2, bug, dunno why the last didnt work. 2017-10-25 18:22:10 +02:00
Hellowlol
419437e58b Merge branch 'shareinfo' 2017-10-24 21:41:40 +02:00
Hellowlol
63d76f3d03 fix section.
see https://github.com/pkkid/python-plexapi/pull/220 for more info.
2017-10-24 21:41:07 +02:00
Hellowlol
68d8eeebac Lets see if this is enoght. 2017-10-23 00:45:56 +02:00
Michael Shepanski
ae3e90e58d Update myplex.py 2017-10-11 23:30:58 -04:00
Hellowlol
e48462cd9f rename to outOut, handle http 204 2017-10-11 23:31:05 +02:00
Hellowlol
a4443db64f add opt out. untested so dont merge. 2017-10-03 21:23:47 +02:00
Michael Shepanski
fd015439c4 Fix flake8 warnings 2017-09-29 19:49:13 -04:00
Hellowlol
25cf962470 Merge branch 'pr/184' 2017-09-24 00:21:29 +02:00
Hellowlol
9765f381e6 remove a unused method. 2017-09-24 00:14:47 +02:00
Hellowlol
e87fb484e4 More explisit 2017-09-23 23:11:34 +02:00
blacktwin
375907744a is True 2017-09-14 16:53:11 -04:00
blacktwin
f9f4b80b2b camelCase formating
removeSections instead of remove_sections. update the doc string.
2017-09-11 22:43:52 -04:00