Commit graph

216 commits

Author SHA1 Message Date
blacktwin
37e3f092ef Add pause option to conversions 2020-01-29 09:16:13 -05:00
blacktwin
bc316a6c9b add removeAll option to optimiziedItems 2020-01-29 09:15:45 -05:00
blacktwin
0a6a6d0a03 add currentBackgroundProcess method
uses TranscodeJob media class
2020-01-29 09:11:07 -05:00
Steffen Fredriksen
c3e16b2d36
Merge pull request #388 from pkkid/conversions
conversions
2020-01-28 17:12:41 +01:00
blacktwin
2da4d2bf68 use fetchItem and fetchItems instead of query 2020-01-27 14:17:23 -05:00
blacktwin
0fa9ced744 change conversions method to use fetchItems
assuming all server's conversion playQueue is 1
2020-01-27 14:16:12 -05:00
zSeriesGuy
d9820775a6 Add additional histroy methods 2019-11-16 16:35:20 -05:00
zSeriesGuy
481e55bbe4 Update docstring for added ratingKey arg. 2019-11-14 17:28:46 -05:00
zSeriesGuy
43a60f00f1 Support history for specific ratingKeys
Add history method to PlexPartialObject
Add ratingKey to server history method.
Add tests for movie, show, season, episode, artist, album, and track history.
2019-11-14 12:21:49 -05:00
blacktwin
45df6b57cf import new Conversion class and return active Conversions 2019-10-10 11:12:34 -04:00
blacktwin
dc6c1f1168 renaming correction 2019-10-10 10:43:52 -04:00
blacktwin
8b3d9db9b2 find background processing list key 2019-10-09 22:11:06 -04:00
blacktwin
a9f341169f import Conversion and create conversions function 2019-10-08 23:27:23 -04:00
Ty Hahn
1d663b9209 Lint 2019-08-07 05:55:03 +09:00
Hellowlol
4c04b76690 Update server.py
add a way to get a transit token. Dunno about the name.
2019-06-29 22:16:55 +02:00
Michael Shepanski
a13d17c838 track accountID in Playable 2019-06-03 00:50:02 -04:00
Michael Shepanski
6ade28868c Add minimal api to list system accounts 2019-06-03 00:44:21 -04:00
Michael Shepanski
dd8648b9de Add container size to plex.history.
Add filter options to plex.history.
2019-06-02 23:12:07 -04:00
Hellowlol
22d1c2011c rstrip baseurl for plex servers, new users seems
add / to the end.
2019-01-19 23:05:12 +01:00
Hellowlol
e6dbf833d4 inital smart playlist 2018-11-16 23:47:49 +01:00
Andrey Yantsen
7a67417615 fix docs for Raises clauses 2018-10-03 11:09:43 +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
Michael Shepanski
61ede66ad5 Dont include token in URLs unless show_secrets set in config; All functions that return a URL such as stream urls and thumbnails still include token 2018-01-04 21:44:35 -05:00
Hellowlol
b3a328261a fix installUpdate
i had forgotten a /
2017-09-30 08:44:24 +02:00
Michael Shepanski
52692316fd Merge pull request #175 from pkkid/zomg11
Fix bug for shared librarys.
2017-08-19 19:10:21 -04:00
Hellowlol
fdf79bc745 Fix bug for shared librarys. 2017-08-18 20:32:27 +02:00
Bryan Stitt
e4095816f9 Fix documentation for PlexServer attributes
I'm migrating from an old version and server and token aren't available like this anymore. They are only under their prefixed names now (which is already documented).
2017-08-16 14:59:34 -07:00
Michael Shepanski
08c42d7dd7 Merge pull request #167 from pkkid/plex_server_client_fix
remove depicated warn, add main token to server.clients()
2017-08-13 20:14:58 -04: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
Hellowlol
8b2780186c remove depicated warn, add main token to server.clients()
Abit more dry client.
2017-07-30 20:49:06 +02:00
Michael Shepanski
9c37679fb6 Fix Undefined name pms in server.py installUpdate() #165 2017-07-30 01:05:27 -04:00
Michael Shepanski
cf445ec47a Merge pull request #164 from pkkid/misc_fixes
fix https://github.com/pkkid/python-plexapi/issues/155
2017-07-30 00:55:44 -04:00
Michael Shepanski
765314c252 Cleanup doc strings 2017-07-30 00:43:54 -04:00
Hellowlol
06901f3742 fix https://github.com/pkkid/python-plexapi/issues/155 2017-07-28 22:20:30 +02:00
Hellowlol
498ac29106 add tests for islatest and check for update 2017-07-18 23:20:49 +02:00
Hellowlol
43cb60d440 more update shit 2017-07-18 17:59:23 +02:00
Hellowlol
67468578bf init check for update. 2017-07-18 01:34:28 +02:00
Michael Shepanski
215bf833fa Bug #144 Fix docs for private vars 2017-06-04 22:01:07 -04:00
Michael Shepanski
624afd7082 Move share into MyPlexAccount.inviteFriend; Add abilities inviteFriend, updateFriend, RemoveFriend 2017-05-26 22:35:33 -04:00
Michael Shepanski
a79bc44b7a Ability to get a MyPlexAccount object from the plexServer object A(using same token). Review code to lookup port if not available on the client listing (fixed a few bugs in it). 2017-05-18 23:04:57 -04:00
Michael Shepanski
35fc7718f5 Tests now passing on personal server 2017-04-29 01:47:21 -04:00
Michael Shepanski
109d7367f6 Rename tools to follow naming pattern 2017-04-27 21:21:40 -04:00
Michael Shepanski
decdc296b6 Merge branch 'generic-tests' 2017-04-25 23:11:25 -04:00
patrick
7487a41df7 Fixed regression involving invalid token requirement
Fixed regression in client constructor argument
2017-04-24 22:49:15 -04:00
Michael Shepanski
be2142f7ed Better logging when connecting to resources; Ability to specify timeout when connecting to resources; Update connect_to_resource test to be a bit more generic 2017-04-23 22:59:22 -04:00
Michael Shepanski
7bb39aa05c UPdating tests to work on second install 2017-04-14 20:47:59 -04:00
Hellowlol
421dcd7bcf Add share. works missing docs 2017-03-06 23:18:10 +01:00
Michael Shepanski
43444459e3 Tighten up download code a bit; downloadLogs and DownloadDatabases were reversed (oops) 2017-02-26 23:59:46 -05:00
Hellowlol
a4abc0e223 fixup 2017-02-27 01:35:22 +01:00
Hellowlol
53fab6239a fix tests for download logs/dbs
fix clients. Clients now tries to get info from plex.tv resources in the
port is missing.
add quote_plus to compat
2017-02-26 22:47:40 +01:00
Hellowlol
baeedcebbf add download log/db. 2017-02-26 21:01:54 +01:00
Michael Shepanski
4c83961cb4 Ability to delete device 2017-02-25 02:37:30 -05:00
Michael Shepanski
0b3ccc4c02 Add back noqa statments 2017-02-25 00:46:24 -05:00
Michael Shepanski
e66cc0a9c0 I was never happy with notifier being the name of the event listener. AlertListener is more boring, but also more clear what its doing. 2017-02-24 23:50:58 -05:00
Michael Shepanski
91a8ab4563 Checkpoint: Settings functionality works; Needs documentation 2017-02-23 01:33:30 -05:00
Michael Shepanski
08f1e4b83d Fix pulling server baseurl,token from config; Add option to auto connect to client from config options 2017-02-22 01:22:10 -05:00
Michael Shepanski
cd1a05d770 Make flake8 happy 2017-02-20 00:37:00 -05:00
Michael Shepanski
4b1a564409 All config options can be set with environment variables; Update all os.environ calls to use CONFIG.get; Finish documenting configuration options. 2017-02-19 22:18:23 -05:00
Michael Shepanski
85ea65b8a4 Cleanup doc strings 2017-02-14 23:29:22 -05:00
Hellowlol
5e18776ee2 add support to shuffle to createplayqueue and playlist.playqueue
See the tests for examples.
2017-02-14 22:12:56 +01:00
Michael Shepanski
c0958a0edc only auto-connect to clients is baseurl and token passed 2017-02-13 01:37:23 -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
3783f3c61b Add missing requirement for dev. Document that you need websocket-client installed in order to use PlexNotifier 2017-02-10 23:26:09 -05:00
Michael Shepanski
6b1ae844c5 Add PlexNotifier class; Ability to monitor plex notifications (current scan progress, transcode session updates, etc) 2017-02-10 23:08:36 -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
f676d4cbbf Most tests passing; Need to add better filters on fetchItems for watched / unwatched 2017-02-08 02:00:43 -05:00
Michael Shepanski
82bd1753e2 Changes from code review 2017-02-07 23:26:58 -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
4624512356 A few more updates to get plexattrs.py fully running 2017-02-06 01:28:58 -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
7c766337b6 Remove all references to NA 2017-02-04 12:43:50 -05:00
Michael Shepanski
065a753d77 Merge branch 'master' of github.com:mjs7231/python-plexapi 2017-02-04 03:09:04 -05:00
Michael Shepanski
6e893d8fbf Started work on script to analyze Plex attributes with what we defined in plexapi so we can easily find mismatches 2017-02-04 03:08:47 -05:00
Michael Shepanski
a2cdc97453 Fix tests; comment out a few that were breaking because of timezone aware datetimes; Perhaps converting datetimes to timestamps then comparing the int values will be more reliable. 2017-02-03 11:39:46 -05:00
Michael Shepanski
0a66414fcd Add ability to dig deeper in the MediaTag search results. For example: Genre.items() will return the list of items for that tag if the key attribute is available 2017-02-03 02:15:41 -05:00
Michael Shepanski
0e7a158836 Cleanup HubSearch code a bit (contribution is awesome); Add a whole bunch of new attributes to server.Server object; Finish documenting server.py 2017-02-03 01:29:19 -05:00
Michael Shepanski
f479b8453b Merge branch 'master' into hub 2017-02-02 22:23:46 -05:00
Michael Shepanski
16a55316f1 Bug #74 - getting error on clients 2017-02-02 01:42:12 -05:00
Michael Shepanski
b5e29fdb28 Add ability to put username, password, baseurl, token into config.ini (make sure you set proper permission on that file); Fix first example in README 2017-02-02 00:49:12 -05:00
Hellowlol
e06f6250a3 mroe cov 2017-02-01 20:55:08 +01:00
Hellowlol
5562108472 remove 2017-02-01 20:49:12 +01:00
Hellowlol
7e9bd51d55 testing testing, 1, 2, 3. 2017-02-01 20:41:20 +01:00
Michael Shepanski
d357b3e628 Hide secrets (X-PLEX-TOKEN) in logging by default; Set the config value logging.show_secrets = true in your config file to re-enable this 2017-01-26 01:33:01 -05:00
Hellowlol
1abb1456f8 Inital hub. 2017-01-04 00:00:28 +01:00
Hellowlol
3aa4208d8b fix rebase 2017-01-02 22:19:07 +01:00
Hellowlol
1075f65bb4 Moredocs (#84)
* Docs and speedups.
2017-01-02 22:06:40 +01:00
Hellowlol
740e7a5b9b f 2016-12-17 00:38:08 +01:00
Hellowlol
f0bf9117cc more 2016-12-16 00:55:48 +01:00
Hellowlol
42003d61bd fix a small bug, start on docs strings 2016-12-16 00:06:12 +01: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
09a7ae80db Basic support for photos complete 2016-04-09 23:59:47 -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
610bf16ce3 Client control via proxy working; Re-enable control via proxy tests 2016-04-05 23:32:49 -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
b10faf8560 Checkpoint: New implementation for search 2016-03-31 16:52:48 -04:00
Michael Shepanski
a0cfaafb68 Initial cleanup of playlist support; getStreamURL not working; Needs tests 2016-03-21 23:52:58 -04:00
Michael Shepanski
5763db2c4d Merge dev 2016-03-21 23:19:52 -04:00
Michael Shepanski
d4e8bdba70 Checkpoint: Adding Audio support; Cleanup attribute definitions to only include what the Plex objects actually include. 2016-03-21 00:26:02 -04:00
Michael Shepanski
2e2ea93982 Cleanup imports; force registration of audio/video libtypes 2016-03-17 01:14:31 -04:00
Michael Shepanski
276ba26b77 Create registry of library items we may see in xml; Cleanup how we handle build_item and list_items 2016-03-17 00:51:20 -04:00
Michael Shepanski
cc58b87c9b Default to always use a session 2016-03-15 23:53:04 -04:00
Michael Shepanski
fd83cbab8a Cleanup Audio/Video search at the server & library level. Start testing audio a bit more 2016-03-15 14:36:59 -04:00
Michael Shepanski
4399bc6190 Minor cleanup after merging pull request 2016-03-14 22:20:02 -04:00
Håvard Gulldahl
1299c1811f Add support for Plex Playlists to server.py. Introduces the method PlexServer.playlists() 2016-02-03 19:17:09 +01:00
Håvard Gulldahl
b6569dc6a3 Add preliminary session support 2016-01-30 00:13:57 +01:00
Håvard Gulldahl
0229226448 add .searchAudio method to PlexServer, to specifically search for audio 2016-01-28 13:09:36 +01:00
Håvard Gulldahl
f6a1f37a9a Be media agnostic in server.search()
In the long run we should probably merge the audio and video code paths
2016-01-19 11:59:00 +01:00
Toomas Uudisaru
a03d67cfb4 Python3 fixes / urllib, printing, dict access
Python 3 fixes (compatible with Python 2):
- use urllib.parse module for quote() and urlencode() instead of urllib
- printing using parenthesis
- dict access: items() instead of iteritems(), keys() converted to list
- filter(): convert results to list
2015-09-05 17:09:15 +03:00
Michael Shepanski
b2c9a29d1e Update timeline() to use server.query to include proper headers and timeout 2015-08-30 20:59:25 -04:00
Michael Shepanski
7daa127603 All example and tests working; A few minor changes in the api provided by plex required some rejiggering 2015-06-14 22:45:22 -04:00
Michael Shepanski
433e0a18b4 Add support for SSL 2015-06-08 12:41:47 -04:00
Michael Shepanski
edb29fa0d7 Include plex token on all urls 2015-02-23 22:42:29 -05:00
Michael Shepanski
699843f150 Updates to work with Python3 2015-02-17 15:35:17 -05:00
Michael Shepanski
352696147e Move from Bitbucket 2014-12-28 22:21:58 -05:00