Commit graph

304 commits

Author SHA1 Message Date
blacktwin
df546046d8
doctstring update 2019-09-05 08:54:07 -04:00
blacktwin
830b9ed91f
fix for modeUpdate()
was checking the wrong variable.
corrected raise output.
2019-07-31 16:06:49 -04:00
blacktwin
1587aa7bab
python3 compatibility for raise
python3 compatibility for raise
2019-07-25 15:23:51 -04:00
blacktwin
b201df061c
docstrings and better handling
added docstring and better handling of the parameters.
2019-07-25 15:20:27 -04:00
blacktwin
02026cc65b
Adding collection sorting
collectionSort to data and sortUpdate function.
2019-07-25 14:46:41 -04:00
blacktwin
9149d999e0
Add collectionMode data and modeUpdate
Added collectionMode to collection data. 
modUpdate acts like webUI, `collection.modeUpdate(mode="default")`
2019-07-25 14:30:48 -04:00
blacktwin
baabcbceb1
update for ALLOWED_FILTERS
updated ALLOWED_FILTERS for Movies, Shows, and Photos sections.
2019-07-24 08:06:44 -04:00
Michael Shepanski
7f351f4a57
Merge pull request #319 from hidaba/patch-1
Update library.py
2019-02-11 09:17:14 -05:00
Andrey Yantsen
a28cbdc669 fix few more flake8 warnings 2019-02-07 10:25:50 +00:00
Michael Shepanski
3f6eede667
Merge branch 'master' into patch-1 2019-02-04 14:48:06 -05:00
Michael Shepanski
b9d163ab2a
Missing space. 2019-02-04 14:46:47 -05:00
tijder
abac9173f8
Function updated section all with sort 2018-12-21 20:51:39 +01:00
hidaba
73d1eec5ef
Update library.py
add 'year' to filter, it works
2018-11-26 12:28:14 +01:00
Josh Wood
7dbc02514c (feat): allow MusicSection search by track.userRating and sort by userRating 2018-11-11 10:32:15 -06: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
Hellowlol
725bea090f Minor stuff. 2018-04-15 21:05:05 +02:00
Nicholas Totsch
b06c417706 Added cast/todatetime and missing minYear 2018-04-10 13:58:51 -05:00
Nicholas Totsch
4e27f6d8a8 Flake8 Fix 2018-04-10 12:24:39 -05:00
Nicholas Totsch
981e965e1f Added class/libtype for collections and library search function 2018-04-10 12:14:57 -05:00
Hellowlol
480f5a2d52 empty trash is a put in plex web. 2017-11-25 00:48:32 +01:00
Craig Hamilton
d8368f769e Add label to the list of acceptable filters for MovieSection and ShowSection
This allows searching using the sharing labels.
2017-10-08 21:45:58 +11:00
Hellowlol
b385b7626b Find duplicates of episodes. 2017-10-03 20:41:44 +02:00
adam
17532a8f7d Add guid to LibrarySection filters for Movie, Show 2017-09-29 17:45:57 +02:00
Bryan Stitt
5c7e138b2e Add mood to MusicSection.ALLOWED_FILTERS 2017-08-29 15:37:48 -07:00
Michael Shepanski
1159edc422 Fix but in plex-markwatched script 2017-08-14 22:55:54 -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
6bb18843d7 Fix a few tests 2017-04-29 02:21:20 -04:00
Michael Shepanski
7ec909dce6 Finish generic tests; a few things to polish before merge 2017-04-23 01:18:53 -04:00
Michael Shepanski
0e220f2e7d Cleanup long doc string long lines 2017-03-21 23:04:23 -04:00
Hellowlol
421dcd7bcf Add share. works missing docs 2017-03-06 23:18:10 +01:00
Hellowlol
9d0126f808 add docs 2017-03-05 23:16:06 +01:00
Hellowlol
70fce72f44 more dosc. 2017-03-03 23:32:16 +01:00
Hellowlol
167939173f flake fixes 2017-02-28 22:30:34 +01:00
Hellowlol
cfae507471 Fix test. 2017-02-27 23:20:10 +01:00
Hellowlol
db3b729360 one step closer with the test. 2017-02-27 23:16:02 +01:00
Hellowlol
ff4b1010a9 Add edit/add library. 2017-02-27 22:04:37 +01:00
Hellowlol
cb66c93354 inital lib 2017-02-27 13:23:35 +01:00
Michael Shepanski
cd1a05d770 Make flake8 happy 2017-02-20 00:37:00 -05:00
Michael Shepanski
228f049190 Pluralize function name; Its more clear more than one thing is being deleted 2017-02-19 22:51:17 -05:00
Hellowlol
73109d0e9e add deleteMediaPreview 2017-02-18 22:12:43 +01:00
Michael Shepanski
db9c8f42f7 Cleanup docstrings 2017-02-14 23:22:57 -05:00
Michael Shepanski
e74c79d344 Merge branch '3.0.0' into fixds 2017-02-14 23:16:58 -05:00
Hellowlol
9dc7c30e5f refresh now correctly redownload all metadata from the interwebz
update scans the library for new media files.
2017-02-14 23:36:21 +01:00
Michael Shepanski
de69ace19f Go over documentation a bit more; This will never end. 2017-02-13 23:32:27 -05:00
Michael Shepanski
c0958a0edc only auto-connect to clients is baseurl and token passed 2017-02-13 01:37:23 -05:00
Michael Shepanski
44677e59a6 Merge dev 2017-02-12 22:38:56 -05:00
Michael Shepanski
4b8f82291b Remove findLocations util function 2017-02-12 22:15:47 -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
Hellowlol
b37e7fefeb Fix test_video.py::test_video_Show_section
remove untrue comment
2017-02-11 00:32:51 +01:00
Hellowlol
b995deab05 forgot a pragma 2017-02-11 00:16:34 +01:00
Hellowlol
6be7fa8a29 Add delete
Supports media elements and librarys
2017-02-11 00:16:23 +01:00
Michael Shepanski
08e61960e7 Move common methods to PlexPartialObject; More documentation 2017-02-09 15:01:23 -05:00
Michael Shepanski
6fa7c12c48 Implement fetchItem filters; All tests passing? 2017-02-09 01:54:38 -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
76c0cb55a1 Rename variable to kwargs 2017-02-08 23:08:25 -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
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
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
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
cec0ab07e8 Cleanup formatting 2017-02-01 22:53:05 -05:00
Hellowlol
d19d602455 revert NA to _NA so its still compat with the tests.
- this allows for casting str and check for __NA__ in addition to is
instance.
- some indentation fixes
2017-02-01 22:32:00 +01:00
Hellowlol
e06f6250a3 mroe cov 2017-02-01 20:55:08 +01:00
Hellowlol
7e9bd51d55 testing testing, 1, 2, 3. 2017-02-01 20:41:20 +01:00
Michael Shepanski
5f9c230dce Add missing swigglies 2017-01-30 23:48:21 -05: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
Michael Shepanski
355f4686c9 Finish documenting utils.py 2017-01-26 00:25:13 -05:00
Michael Shepanski
b61d1888b4 Finished documenting library.py 2017-01-25 23:21:13 -05:00
Hellowlol
1abb1456f8 Inital hub. 2017-01-04 00:00:28 +01:00
Hellowlol
e94c92bada fix my mess. 2017-01-02 23:38:19 +01:00
Hellowlol
3aa4208d8b fix rebase 2017-01-02 22:19:07 +01:00
Hellowlol
42003d61bd fix a small bug, start on docs strings 2016-12-16 00:06:12 +01:00
Michael Shepanski
3d28b5309e Recently added is missing from LibrarySection #58 2016-05-23 21:41:02 -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
09a7ae80db Basic support for photos complete 2016-04-09 23:59:47 -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
7bb700d395 New test for client.timeline(); Fix bug in missing proper headers for timeline 2016-03-31 23:39:09 -04:00
Michael Shepanski
7bce1c4b32 Add note to library.search() that its basically not tested. 2016-03-31 18:39:08 -04:00
Michael Shepanski
d63339bd24 Cleanup search a bit; Get existing tests passing and add a few new search tests 2016-03-31 18:36:54 -04:00
Michael Shepanski
b10faf8560 Checkpoint: New implementation for search 2016-03-31 16:52:48 -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
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
668d5f67f1 Flesh out a .search() method for the MusicSection
This is more of a hack than a long run solution. We really should merge
the video and audio search code paths.
2016-01-19 11:58:10 +01:00
Håvard Gulldahl
9896965efa Remember to import new audio class in libary.py 2016-01-19 11:57:20 +01:00
Håvard Gulldahl
a50c9457af Rename .search() to .searchVideo, but keep the API for now
getting ready to add code to search both video and audio, but keep old
functionality intact for now
2016-01-19 10:53:10 +01:00
Håvard Gulldahl
9ca97c5fac Add searchAudio() method to Library
It will only search for audio content (Track, Album, Artist)
2016-01-19 10:50:31 +01:00
Håvard Gulldahl
1e28eebbf6 Add MusicSection,
with .search(), .searchAlbums() and .searchTracks() methods
2016-01-19 10:41:12 +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
433e0a18b4 Add support for SSL 2015-06-08 12:41:47 -04:00
Michael Shepanski
43e99e94ef Read all headers, logging, and core settings from config file; Add Show.refresh() method 2015-06-01 22:28:50 -04: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