Commit graph

43 commits

Author SHA1 Message Date
Hellowlol
5553b87539 Update playlist.py
Docs stuff.
2018-12-04 22:00:58 +01:00
Hellowlol
c5083c311c fix test.. 2018-11-17 00:33:56 +01:00
Hellowlol
a1292173c8 docs. 2018-11-17 00:06:33 +01:00
Hellowlol
e6dbf833d4 inital smart playlist 2018-11-16 23:47:49 +01: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
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
26bf4ca010 zomg... 2017-10-26 00:01:42 +02:00
Hellowlol
f3a0a8f16e lint 2017-10-11 22:40:10 +02:00
Hellowlol
f52957f099 fix E261 2017-10-09 15:58:44 +02:00
Hellowlol
8910a307f9 Fix tests
Should we just remove the cache and require that the user reloads this?
or i can reload in the tests.
2017-10-09 15:57:37 +02:00
Hellowlol
a39326fab8 inital dunder on Playlist 2017-10-05 22:24:49 +02:00
Michael Shepanski
943aa02e69 Rename playlist.share to playlist.copyToUser; Make plex.myPlexSubscription a bool; Fix a few tests with updated attrs; Skip test_copyToUser if no subscription 2017-08-11 15:14:32 -04:00
Michael Shepanski
48bc16b01c Cleanup doc strings 2017-07-30 00:35:52 -04:00
Hellowlol
a0f030e353 Add a test for share playlist. 2017-07-28 22:29:14 +02:00
Michael Shepanski
cd1a05d770 Make flake8 happy 2017-02-20 00:37:00 -05:00
Michael Shepanski
de69ace19f Go over documentation a bit more; This will never end. 2017-02-13 23:32:27 -05:00
Michael Shepanski
9b791b95e7 Add TAG constant to PlexObjects; Better method to save and build PLEXOBJECTS; All objects in media.py are now registered and can be looked up; Remove __len__ on Library class (it was causing URL to load twice). 2017-02-12 21:55:55 -05:00
Michael Shepanski
5443711b90 Make _query and _url public methods since we use it as such 2017-02-08 23:29:17 -05:00
Michael Shepanski
83a8c5733e Rename _root back to _server but keep it private 2017-02-08 23:13:54 -05:00
Michael Shepanski
bc421490db myplex tests passing 2017-02-07 01:58:29 -05:00
Michael Shepanski
8212ca9c46 Much more stability from yesterday; Easier to use fetchItem funtions; Common __repr__ for all plexobjects; Fix all uses if listItems 2017-02-07 01:20:49 -05:00
Michael Shepanski
6a35f50a43 CHECKPOINT: Lots going on; Added new base class PlexObject that everything inherits from, this ensures all constructors are similar; Lots of work on new tool plexattrs that parses a full Plex library to find differences in attributes plexapi implements and what the Plex XML API offers up; Tests will most definetly be broken at this point, but I wanted to save my work. 2017-02-05 23:52:10 -05:00
Michael Shepanski
fc28f7c1e6 Move Playable and PlexPartialObject to new plexapi.base module 2017-02-04 14:46:51 -05:00
Michael Shepanski
7c766337b6 Remove all references to NA 2017-02-04 12:43:50 -05:00
Michael Shepanski
2a680a18d5 Rollback last pull request 2017-02-02 09:09:34 -05:00
Michael Shepanski
a32f447d13 Merge pull request #94 from mjs7231/Hellowlol-patch-1
fixup after ratingkey was changed to int.
2017-02-02 01:48:38 -05:00
Hellowlol
7e9bd51d55 testing testing, 1, 2, 3. 2017-02-01 20:41:20 +01:00
Michael Shepanski
04251d3805 Finish documenting Photo; Monkey-patch sphinx to not auto-link to unknown types; Remove links to ElementTree (not our code) 2017-01-30 23:44:03 -05:00
Hellowlol
114cb1dc89 fixup after ratingkey was changed to int. 2017-01-17 08:48:57 +01:00
Hellowlol
1075f65bb4 Moredocs (#84)
* Docs and speedups.
2017-01-02 22:06:40 +01:00
Hellowlol
7c04305b29 Fix bug after ratingKey was made int. 2016-12-21 14:17:28 +01:00
Michael Shepanski
ba9eab0229 Minor bugfixes 2016-04-12 23:52:47 -04:00
Michael Shepanski
1a679411dc Ability to list all albums; Fix setting object values when not found (NA) and we know its the full object 2016-04-12 22:47:46 -04:00
Michael Shepanski
748fc68406 Cleanup playlist support; Fix UUID on URLs; Better method to store listTypes; Cache section IDs in library 2016-04-11 22:43:21 -04:00
Michael Shepanski
3138ad1087 Added playlist support 2016-04-10 23:49:23 -04:00
Michael Shepanski
81e22147c0 Get examples working again; Add new examples most_streamed_titles and most_active_users 2016-04-07 22:48:45 -04:00
Michael Shepanski
80529a21c7 Rename MyPlexUser to MyPlexAccount; Add support for real MyPlexUsers; Add api for history; New tests for sessions() and history() 2016-04-07 01:39:04 -04:00
Michael Shepanski
50ac2f55e5 Create Playable object to put function specific to media that is playable like getStreamURL etc.. 2016-04-03 23:55:29 -04:00
Michael Shepanski
84a6999ed7 Ability to directly create a PlexClient object (without needing a PlexServer object); Cleaned up MyPlex code; Removed duplicated Client navigation code from myplex (everything uses PlexClient now) 2016-04-02 02:19:32 -04:00
Michael Shepanski
bcf01fdcdf Move getStreamURL to PlexPartialObject; Remove duplicated code; Add getStreamURL tests (doesnt actualy test the stream works tho) 2016-03-22 23:38:06 -04:00
Michael Shepanski
a0cfaafb68 Initial cleanup of playlist support; getStreamURL not working; Needs tests 2016-03-21 23:52:58 -04:00
Håvard Gulldahl
42364b09b9 add list_items() method to list playlists and return Playlist objects 2016-02-03 19:16:39 +01:00
Håvard Gulldahl
6a99e1ef49 Add initial support for Plex Playlists 2016-02-03 19:07:53 +01:00