Commit graph

598 commits

Author SHA1 Message Date
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
Michael Shepanski
e81809464f
Merge pull request #345 from Tomme/ignore_negative_epoch_values
Ignore negative epoch values
2019-05-29 12:50:38 -04:00
Peter Brink
4339626800 added collection to show object for tagging 2019-05-29 02:52:50 -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
Tomme
bcd81e67c0 Ignore negative epoch values 2019-03-24 19:31:30 +00:00
gstacks13
77b1ee721d Get season from index instead of creating title 2019-02-21 11:56:51 -06:00
Michael Shepanski
7f351f4a57
Merge pull request #319 from hidaba/patch-1
Update library.py
2019-02-11 09:17:14 -05:00
Michael Shepanski
e6ca501610
Merge pull request #339 from gstacks13/fix_show_season_0
Fix Show.season(0) not returning 'Specials'
2019-02-11 09:16:39 -05:00
gstacks13
433e4c402a Fix show.episode() not allowing season 0 2019-02-10 14:45:13 -06:00
Andrey Yantsen
97e5383d54 fix few more flake8 warnings from recent PR 2019-02-07 11:09:07 +00:00
Andrey Yantsen
68868a6617 Merge remote-tracking branch 'root/master' into newer_oldest_plex 2019-02-07 11:06:43 +00:00
Andrey Yantsen
a28cbdc669 fix few more flake8 warnings 2019-02-07 10:25:50 +00:00
gstacks13
58862b74ba Fix Show.season(0) not returning 'Specials' 2019-02-07 02:24:00 -06:00
Michael Shepanski
99efddf49f
Merge pull request #336 from gstacks13/set_default_streams
Closes #334 - set default audio & subtitle stream
Thanks for the updates!
2019-02-06 19:03:36 -05:00
Michael Shepanski
6d135a7848
Remove unused import.
Flake8 caught this one.
2019-02-06 18:47:35 -05:00
gstacks13
e830f74436 Tidying up, as requested. 2019-02-06 17:22:28 -06:00
gstacks13
5270395b3a Only pass stream object to function 2019-02-04 20:07:22 -06:00
gstacks13
1c95e7165c Pass either stream or stream.id 2019-02-04 16:28:30 -06:00
Gabriel Stackhouse
a554aec872 Removed a space 2019-02-04 13:52:16 -06: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
Michael Shepanski
accb09202b
Merge pull request #325 from tijder/master
Function updated section all with sort
2019-02-04 14:45:51 -05:00
Gabriel Stackhouse
d2c7feeaac Closes #334 - set default audio & subtitle stream 2019-02-04 13:45:49 -06:00
Michael Shepanski
99003a1f8a
Merge pull request #329 from hmnd/fix_original_spelling
Fix spelling of "original"
2019-02-04 14:44:46 -05:00
Gabriel Stackhouse
14fdc51b37 Add 'forced' var to subtitleStream 2019-02-04 13:15:05 -06:00
Hellowlol
d227437054
Update utils.py
add a proper fix for the issue, TODO make it more fault tolerant
2019-01-21 22:14:53 +01:00
Hellowlol
99a8037959
Update utils.py
Ooobs
2019-01-21 21:50:42 +01:00
Hellowlol
b7914dd0d8
Merge pull request #332 from pkkid/fix_276
fix datetime issue on windows.
2019-01-21 20:23:50 +01:00
Hellowlol
bd8949eeeb fix datetime issue on windows. 2019-01-19 23:23:42 +01:00
Hellowlol
22d1c2011c rstrip baseurl for plex servers, new users seems
add / to the end.
2019-01-19 23:05:12 +01:00
David Roizenman
3719d4b599 Fix spelling of "original" 2019-01-07 08:04:53 -05:00
tijder
abac9173f8
Function updated section all with sort 2018-12-21 20:51:39 +01:00
Hellowlol
15827022f3
Merge pull request #318 from jmlw/master
Allow MusicSection search by track.userRating and sort by userRating
2018-12-05 21:45:35 +01:00
Hellowlol
5553b87539 Update playlist.py
Docs stuff.
2018-12-04 22:00:58 +01:00
Hellowlol
b5027e8341 Merge branch 'smart' 2018-12-04 21:20:43 +01:00
Hellowlol
3f6a69e562 Merge branch 'pmp_406' 2018-12-04 21:19:46 +01:00
hidaba
73d1eec5ef
Update library.py
add 'year' to filter, it works
2018-11-26 12:28:14 +01:00
Hellowlol
e5df09ca6c fix settings for py 2 2018-11-17 20:42:03 +01:00
Hellowlol
d9c87d8423 inital pmp workaround. 2018-11-17 01:46:42 +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
Josh Wood
7dbc02514c (feat): allow MusicSection search by track.userRating and sort by userRating 2018-11-11 10:32:15 -06:00
Michael Shepanski
1c79c4d9a3 Increase version number 2018-10-05 08:19:12 -04:00
Andrey Yantsen
7a67417615 fix docs for Raises clauses 2018-10-03 11:09:43 +01:00
blacktwin
60fe55e722
Update media.py
videoProfile doc
2018-10-02 10:52:32 -04:00
blacktwin
a394db6acc
additional attributes
target, title and video profile.  Optimizing items through Plex now allows for adding a title to the version. Target and title are the version name and seem to be the same value.
2018-09-20 09:56:12 -04:00
Andrey Yantsen
a0135f8190 fix flake 2018-09-14 23:26:14 +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
057967a8ae Library section id for all (#292)
* add librarySectionID for each item if MediaContainer had one

* fix getting section for photos which are not in album yet

* another approach
2018-09-14 20:27:24 +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
f26db5deab fix typo in header.platorm config param (#291) 2018-09-08 17:27:54 +02:00
Andrey Yantsen
b6c061afd6 Bootstrap test plex (#290)
* fix markup in tests/conftest.py

* add plex-bootstraptest
2018-09-08 17:27:34 +02:00
Andrey Yantsen
b18e186006 fix flake8 warnings on travis (#283) 2018-09-08 17:26:59 +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
250d3538c6
fix bug 2018-07-20 22:17:18 +02:00
tijder
8d4e062a0a
Add own duration when not given as parameter 2018-05-18 10:58:06 +02:00
tijder
16ed7451c9
Comment parameters 2018-05-13 11:40:15 +02:00
tijder
ace43732a4
updateTimeline with option duration
Without the option duration the video progres will not be updated.
2018-05-13 10:50:19 +02:00
tijder
00c21c6325
Function update timeline for base.py
Function to update the timeline for a payable item. With this the item will be showed in the now playing screen.
2018-05-12 21:29:17 +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
6238fa5fd2 fix bug so device returns a object as it should. 2018-04-03 23:08:17 +02:00
Hellowlol
4620e00af4
Merge pull request #263 from patzm/pr/259
added userRating property to Track
2018-04-03 01:54:17 +02:00
Hellowlol
b401ef3cc2
Merge pull request #258 from pkkid/chap
Chap
2018-04-03 01:53:54 +02:00
Martin Patz
e0e7f80b07 added userRating property to Track 2018-03-21 17:26:53 +01:00
shawnsethi
5696110b08
Add sourceVideoCodec to TranscodeSession 2018-03-20 11:30:07 -04:00
Hellowlol
f6aa27eb83 ffs 2018-03-02 20:13:51 +01:00
Hellowlol
a322574dc6 WTF. why is a key in history None?? 2018-03-02 20:13:38 +01:00
Hellowlol
4e404cb502 hopefully fix reload issue.
i really need to get add creds so i can test this locally.
2018-03-02 19:28:23 +01: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
Hellowlol
30ec806536 fix some docs. 2018-03-02 18:43:31 +01:00
Hellowlol
eb337ce585 Add support for similar for tvshows and movies. 2018-03-02 18:27:57 +01:00
Hellowlol
bb55a00f52 really need to sanity check on this one.. 2018-03-02 17:08:10 +01:00
Hellowlol
d0acf8191d bump to 3.0.6 2018-03-02 16:07:47 +01:00
Hellowlol
9d364e4860 init chapters. 2018-03-02 13:15:15 +01:00
daeks
fa7b53cbe5 added labels support for audio album 2018-03-01 20:39:33 +01:00
Hellowlol
a51d0225d1 Remove style error enforced by travis. 2018-02-22 12:36:31 +01:00
Hellowlol
807d833ceb move update progress so we can use it on music. 2018-02-22 12:29:39 +01:00
David Van Loon
f5af5d0e10
Add updateProgress function to Video 2018-02-17 23:32:29 -06:00
Hellowlol
c3dc913d81
Fix openpht bug. 2018-01-15 23:44:28 +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
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
68f73e151e bump to 3.0.5 2018-01-02 00:21:24 +01:00
Hellowlol
8666b53b6f Merge branch 'master' of https://github.com/pkkid/python-plexapi 2018-01-02 00:01:25 +01:00
Hellowlol
c1efa6f9c3 Lax missing protocol abilities. If its missing does not mean i dont work. 2018-01-02 00:01:05 +01:00
Hellowlol
480f5a2d52 empty trash is a put in plex web. 2017-11-25 00:48:32 +01:00
Hellowlol
d3e4c63dd4 add url method, artUrl
change reload waning to debug.
2017-11-08 22:01:53 +01:00
Hellowlol
eba25759fb Long time since a release lets make one. 2017-11-02 00:25:43 +01:00
Hellowlol
ceb3f03445 oops. 2017-11-01 23:36:03 +01:00
Hellowlol
0e2c7fb7e6 fixup
move delete to partial as not everything is deletable
fix library genre test
fix delete media.
2017-11-01 23:18:18 +01:00
Hellowlol
baf655b88b add split, unmatch, stop, installupdate 2017-10-29 00:40:35 +02:00
Hellowlol
0f16ea9cb7 fix invite and add editfriend. 2017-10-28 22:58:47 +02:00
Hellowlol
0594f24f8b mock delete properly 2017-10-26 23:55:59 +02:00
Hellowlol
9509683d28 Add pragmas to alert.py 2017-10-26 20:22:35 +02:00
Hellowlol
e137f610aa too long. 2017-10-26 19:51:46 +02:00
Hellowlol
6735ecc123 more more 2017-10-26 00:51:25 +02:00
Hellowlol
f0b869419c Ignore bars was that is only used by the plexapi cli tool 2017-10-26 00:24:54 +02:00
Hellowlol
168d94e67a Ignore download session images, isnt use my plexpai
it was a example for a users.
2017-10-26 00:23:24 +02:00
Hellowlol
26bf4ca010 zomg... 2017-10-26 00:01:42 +02:00
Hellowlol
807b6ebc3c add more tests to inc cov. 2017-10-25 21:53:52 +02:00
Hellowlol
f8e594ff3f Add test for a album inside a album 👍 2017-10-25 20:58:20 +02:00
Hellowlol
7682a04c7b remove reload since it interited. 2017-10-25 18:39:32 +02:00
Hellowlol
2d1e4f02fb Lint cov. 2017-10-25 18:34:59 +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
d4763dcda9 Merge pull request #216 from pkkid/add_ne
add ne and ne test.
2017-10-13 21:09:10 -04:00
Hellowlol
b5a3018c6b add ne and ne test. 2017-10-14 01:46:09 +02:00
Hellowlol
284a3b615a More hidden stuff.. 2017-10-14 00:29:52 +02:00
Hellowlol
367929a97e fix another bug that was hidden 2017-10-14 00:02:21 +02:00
Hellowlol
1fb4fcbed4 fix e303 2017-10-13 23:47:00 +02:00
Hellowlol
90217b060f missing attrs should raise attribute errors. 2017-10-13 23:47:00 +02:00
Michael Shepanski
bdee9ad1f1 Merge pull request #199 from pkkid/split
add opt out and split mediaitem.
2017-10-11 23:31:29 -04:00
Michael Shepanski
ae3e90e58d Update myplex.py 2017-10-11 23:30:58 -04:00
Michael Shepanski
973e5558ee Merge pull request #211 from pkkid/add_missing_label_tvshow
Add missing labels to cls show
2017-10-11 23:26:22 -04:00
Michael Shepanski
f533cb7450 Merge pull request #203 from pkkid/dunder
Dunders
2017-10-11 23:24:37 -04:00
Hellowlol
577c68ac7d add unmatch 2017-10-12 00:01:33 +02:00
Hellowlol
d7856e52ee fix split media item. add missing method put 2017-10-11 23:40:22 +02:00
Hellowlol
e48462cd9f rename to outOut, handle http 204 2017-10-11 23:31:05 +02:00
Hellowlol
f3a0a8f16e lint 2017-10-11 22:40:10 +02:00
Hellowlol
e402c3227b make media iterable.
they will yield the next lower level. so a show will iter a season a
season will yield a episode etc.
2017-10-09 16:07:09 +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
ef7b631e82 Add missing labels to cls show 2017-10-09 15:40:46 +02: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
ef0556f952 Add __hash__ so we can use sets to remove dupes etc. 2017-10-05 23:21:14 +02:00
Hellowlol
a39326fab8 inital dunder on Playlist 2017-10-05 22:24:49 +02:00
Hellowlol
a4443db64f add opt out. untested so dont merge. 2017-10-03 21:23:47 +02:00
Hellowlol
b385b7626b Find duplicates of episodes. 2017-10-03 20:41:44 +02:00
Hellowlol
c9d1e222a6 Merge branch 'master' into better_cli 2017-10-01 00:46:55 +02:00
Hellowlol
7752e983b6 f 2017-10-01 00:34:20 +02:00
Hellowlol
828b41e0ec delete should be part of the media not the media part 2017-09-30 23:16:40 +02:00
Hellowlol
e2f90ea81d add broken delete to parts. 2017-09-30 19:45:35 +02:00
Hellowlol
b3a328261a fix installUpdate
i had forgotten a /
2017-09-30 08:44:24 +02:00
Michael Shepanski
fd015439c4 Fix flake8 warnings 2017-09-29 19:49:13 -04:00
Hellowlol
ceada3c0b3 Fix suggestion bug... 2017-09-30 01:32:27 +02:00
Hellowlol
566107697a download improvements
- Add missing showstatus doc
- add name and total to tqdm so the bar is displayed properly
2017-09-29 23:55:41 +02:00
Michael Shepanski
74eae2acdb Merge pull request #192 from tdorsey/patch-1
Fix TypeError when viewCount is not set
2017-09-29 12:11:30 -04:00
Michael Shepanski
8507c603b4 Update video.py 2017-09-29 12:11:14 -04:00