Commit graph

304 commits

Author SHA1 Message Date
JonnyWong16
f3e9425a2c
Update docstring from artBlurHash and thumbBlurHash 2020-11-21 21:25:24 -08:00
JonnyWong16
9fb3eaf41c
Add thumbBlurHash and artBlurHash attributes with includeFields 2020-11-21 20:02:31 -08:00
JonnyWong16
a5690579d5
Refactor includes to PlexPartialObject
* Allows includes to be used by Audio, Video, Photoalbum, Photo, Collections, and Playlist
2020-11-21 19:52:01 -08:00
JonnyWong16
fa4d8a45af
Collection mode default is -1 2020-11-21 17:35:33 -08:00
JonnyWong16
d59d199ee7
Always build default details key 2020-11-21 12:08:27 -08:00
JonnyWong16
0d27aa3f8e
Replace uses of details key in Show and Collection 2020-11-20 20:46:35 -08:00
JonnyWong16
b9c3a93c67
Add path parameter to library update 2020-11-20 17:05:57 -08:00
JonnyWong16
71904cca15
Clean Path and File docstring 2020-11-15 21:28:58 -08:00
JonnyWong16
4091a0b272
Make includeFiles optional in PlexServer.browse() 2020-11-15 21:21:08 -08:00
JonnyWong16
93280dd979
Allow PlexServer.browse() and .walk() using a Path object 2020-11-15 21:10:13 -08:00
JonnyWong16
7298b3c606
Add ability to browse and walk the Plex server system file directories 2020-11-15 17:54:48 -08:00
blacktwin
b8fbe7235f updating cleanBundles() and optimize() methods 2020-10-10 15:09:22 -04:00
Steffen Fredriksen
163d94d249
Merge pull request #507 from pkkid/show_advanced_setting
Edit Library and Show's Advanced Settings
2020-10-02 12:24:08 +02:00
blacktwin
4f96838b3d update sort field in library.ShowSection.recentlyAdded method 2020-09-28 13:51:53 -04:00
blacktwin
d5f9004e7b
Merge branch 'master' into library_hubs 2020-09-28 08:13:59 -04:00
blacktwin
56b6138ca7
Merge branch 'master' into show_advanced_setting 2020-09-28 08:12:39 -04:00
jjlawren
860ad7bc3e
Add Library timeline support (#573)
* Add Library timeline support

* Retry intentional failure with different canary test

* Temporarily disable activities tests

* Set tests for normal runs

* Add tests to validate library timeline attributes
2020-09-21 16:06:14 -05:00
blacktwin
58a432f176 flake fix 2020-09-09 15:25:38 -04:00
blacktwin
c6f60d231c flake fix 2020-09-09 15:25:07 -04:00
Steffen Fredriksen
d73cec3b7d
Fix some flake issues (#540) 2020-08-07 15:34:57 -05:00
blacktwin
7d97834b03
Merge branch 'master' into library_hubs 2020-08-02 23:44:11 -04:00
Steffen Fredriksen
07674a2c65
Merge pull request #512 from pkkid/optimize_update
Video optimize update
2020-08-02 16:11:05 +02:00
blacktwin
614108fb63 create allSubfolders method for library.Folder class 2020-07-30 10:33:58 -04:00
blacktwin
3c0fa04a12 create _locations method in library.LibrarySection to return the librar.Location objects 2020-07-24 14:09:58 -04:00
blacktwin
142448b4c8 return library.LibrarySection.locations to previous listAttrs that returns a str 2020-07-24 14:09:13 -04:00
blacktwin
83c4e64ed6 add library.Collection._preferences() method 2020-07-02 14:40:28 -04:00
blacktwin
2112f778db create library.folders method 2020-07-02 01:33:36 -04:00
blacktwin
a5b5438122 create library.Folder class 2020-07-02 01:33:18 -04:00
blacktwin
f079f7d061 library.FirstCharacter docstring 2020-07-02 00:43:21 -04:00
blacktwin
5c3695d223 library.FieldType docstring 2020-07-02 00:42:51 -04:00
blacktwin
6cad8c1eb0 library.Operator docstring 2020-07-02 00:42:28 -04:00
blacktwin
8aa492f195 library.FilterField docstring 2020-07-02 00:40:51 -04:00
blacktwin
bf5d8b8ba3 library.Sort docstring 2020-07-02 00:40:12 -04:00
blacktwin
1e58e9c5fd library.Field class rename to FilterField
update library.LibrarySection.filterFields() usage
2020-07-02 00:39:34 -04:00
blacktwin
8eadcb28aa library.LibrarySection.filterFields() docstring 2020-07-02 00:37:50 -04:00
blacktwin
257b7ae61e library.LibrarySection._sorts() docstring 2020-07-02 00:36:46 -04:00
blacktwin
23e641eaa3 change if to check both conditions at the same time.
thanks @hellowlol
2020-07-01 22:28:25 -04:00
blacktwin
ea6538f596 removal of all ALLOWED_FILTERS, ALLOWED_SORT, BOOLEAN_FILTERS instances and docstring references. 2020-06-30 09:39:16 -04:00
blacktwin
14c122c87b update library.LibrarySection._cleanSearchSort method to pull sort keys from LibrarySection._sorts() instead of using hardcoded ALLOWED_SORT. 2020-06-30 09:33:53 -04:00
blacktwin
a665d6f3ee update library.LibrarySection._cleanSearchFilter method to pull categories from LibrarySection.filterFields() instead of using hardcoded ALLOWED_FILTERS or BOOLEAN_FILTERS. 2020-06-30 09:32:58 -04:00
blacktwin
9ec2399b21 add filterFields method to library.LibrarySection 2020-06-30 09:24:12 -04:00
blacktwin
9936ee553d create Field, Operator, and FieldType classes 2020-06-30 09:23:18 -04:00
blacktwin
d0943a369e add firstCharacterKey attribute to library.Sort class 2020-06-30 09:21:44 -04:00
blacktwin
4a49ca97b0 add _sorts method 2020-06-30 09:19:53 -04:00
blacktwin
e5d79c7518 add Sort class 2020-06-30 09:06:26 -04:00
blacktwin
c1cef679cc add firstCharacter method to library.LibrarySection 2020-06-30 09:00:50 -04:00
blacktwin
847d21f79d add FirstCharacter class 2020-06-30 08:59:30 -04:00
blacktwin
6829bb2759 add _filter method to library.LibrarySection
referencing #209
2020-06-22 15:44:48 -04:00
blacktwin
ea88be39a0 add Filter class to library
referencing #209
2020-06-22 15:44:46 -04:00
blacktwin
c988f393a7 library.Station docstring update. 2020-06-22 15:27:45 -04:00
blacktwin
ee9cb7dc85 add hubs method to library.LibrarySection 2020-06-22 15:04:33 -04:00
blacktwin
bd536db7ac add stations method to library.MusicSection 2020-06-22 15:03:28 -04:00
blacktwin
c665546185 create library.Station class for stations found in music libraries 2020-06-22 15:02:48 -04:00
blacktwin
38b863b8da correction for library.librarySection.defaultAdvanced method 2020-06-18 10:03:47 -04:00
blacktwin
9685b57ad2 importing base.PlexPartialObject and applying it to library.Collections
this will allow collections to use the base.PlexPartialObject.edit method
2020-06-12 14:14:09 -04:00
blacktwin
81dcd58618 add art attrib to library.Collection
addressing #511
2020-06-12 13:22:13 -04:00
blacktwin
59fcdb4080 add defaultAdvanced method to library.LibrarySection 2020-06-09 23:32:22 -04:00
blacktwin
7474e7d28e add editAdvanced method to library.LibrarySection
addressing #450
2020-06-09 23:25:23 -04:00
blacktwin
ad55514be9 update library.LibrarySection locations attribute to use new Location class. 2020-06-09 15:56:59 -04:00
blacktwin
506a791260 create library.Location class 2020-06-09 15:56:21 -04:00
blacktwin
70dd6704be library EOF flake fix 2020-06-06 14:15:23 -04:00
blacktwin
78656ab2a4 update to library.Collection docstring 2020-06-06 14:01:16 -04:00
blacktwin
33955472c7 adding additional attributes to library.Collection class
thanks @jonnyWong16
2020-06-06 14:00:44 -04:00
blacktwin
db2a210f37 adding fields attribute to library.Collections
reordered attributes
docstring update
2020-06-05 15:43:05 -04:00
Hellowlol
940efc0013 first pass on compat. 2020-05-12 23:15:16 +02:00
Hellowlol
f6e311f056 2nd attempt to fix title bug 2020-05-11 23:12:15 +02:00
Hellowlol
42c83aa084 Fix for library title search when special chars is used
fix flaky test.
2020-05-11 15:14:38 +02:00
Steffen Fredriksen
437eea8dfc
Merge pull request #466 from pkkid/batchsearch
Make it easier to set a container size using search
2020-05-01 21:08:51 +03:00
Hellowlol
1e77e76fb0 Add log message
Add some test that verify that we cant get in a enless loop and handle container_start corrently.
2020-04-29 14:42:19 +03:00
Hellowlol
5a2f14e645 Update based on comments. 2020-04-27 19:22:10 +03:00
Hellowlol
1ba8fe77f7 Add misssing docstring
fix comment.
2020-04-27 00:29:28 +03:00
Hellowlol
0647c714a3 only update if all is in the url 2020-04-27 00:14:00 +03:00
Hellowlol
db1f9a9b39 use cast 2020-04-27 00:05:23 +03:00
Hellowlol
66df034023 add fetchItems to library
use totalSize so we dont do any more http requests then needed.
2020-04-26 23:51:57 +03:00
Hellowlol
91d76a5d94 Make it easier to set a container size using search 2020-04-26 23:34:13 +03:00
Hellowlol
93dda3c9e5 reduce loglevel 2020-04-26 22:55:54 +03:00
Steffen Fredriksen
6eea7cce0f
Allow pagination (#464)
Allow pagination on fetchItems
2020-04-26 21:18:52 +02:00
Hellowlol
b01d808dc9 fix bug 2020-04-16 01:01:45 +02:00
Hellowlol
e0d5a873e1 misc fixes 2020-04-16 00:30:00 +02:00
Hellowlol
cc71daeaba sync 2020-04-15 20:41:15 +02:00
blacktwin
3a95f55b7e
Merge pull request #410 from pkkid/new_hubs
new_hubs
2020-04-13 13:44:34 -04:00
blacktwin
319fe52d0a
Merge branch 'master' into poster_change 2020-04-12 23:04:19 -04:00
blacktwin
3215856eb5 add arts methods to library.Collections 2020-03-18 09:44:24 -04:00
blacktwin
d69760e3e5 fix Collection posters method's key 2020-03-18 09:39:44 -04:00
blacktwin
0b4b9c452e update setPoster method in base, library.Collection, playlist
use media.Poster select method instead
2020-03-18 09:26:09 -04:00
blacktwin
53a61561b1 fix filepath in uploadPoster for Collections 2020-03-18 01:16:26 -04:00
blacktwin
dedab2b5f5 posters methods for collections 2020-03-18 00:55:38 -04:00
blacktwin
98226c044b use server.agents() mediaType keyword to shorten code
Thanks @jonnywong16
2020-03-16 14:26:01 -04:00
blacktwin
cea4f1944e add agents method to library
allow the searching for available agents for specific library
2020-03-16 13:54:16 -04:00
blacktwin
4a7aac16be update LibrarySection's edit method to include agent if not provided
should allow for edits that are not agent changes to be easier
2020-03-16 11:56:16 -04:00
blacktwin
1d05304643 create settings method for LibrarySection
return current library settings
2020-03-16 11:12:28 -04:00
blacktwin
ee77bf2b9e add key attribute to Hub class 2020-02-06 13:02:14 -05:00
Steffen Fredriksen
2a6aaac1fe
Merge pull request #404 from zSeriesGuy/SpeedUpLibraryGet
Speed up Library Section Get
2019-11-28 23:15:54 +01:00
Steffen Fredriksen
0a7b3ed3b3
Merge pull request #403 from zSeriesGuy/PlayHistory
Support history for specific ratingKeys
2019-11-28 23:15:36 +01:00
zSeriesGuy
59ce923559 Add maxResults and mindate to all history methods 2019-11-20 06:50:25 -05:00
zSeriesGuy
442c55a03a Speed up Library Get
The original code pull a full list of all library items and then searched that list.
With this change, the library get uses the title as a search filter such that the returned list is much shorter.
2019-11-18 15:36:17 -05:00
zSeriesGuy
d9820775a6 Add additional histroy methods 2019-11-16 16:35:20 -05:00
blacktwin
3791708362 adding year to filters 2019-11-11 13:35:03 -05:00
blacktwin
7b7fa7a2c9 add tag filter for photos 2019-11-11 09:33:17 -05:00
Hellowlol
52833b1ebf Fix indent and a typo 2019-09-21 22:11:57 +02:00
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