Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
438 commits
Select commit Hold shift + click to select a range
11ddd23
pausing conversion after creation to ensure job doesn't complete.
blacktwin Feb 17, 2020
d9e3b9f
dropping quote_via for backwards compatibility
blacktwin Feb 18, 2020
7fb01a5
Lookup episode/season show() with RatingKeys
jjlawren Feb 25, 2020
ba75935
create _allowMediaDeletion method in server.py
blacktwin Feb 25, 2020
8f96c34
add test for checking _allowMediaDeletion method.
blacktwin Feb 25, 2020
4f6ee3c
indention correction found in Flake test
blacktwin Feb 25, 2020
ecefdbb
remove unused import of quote
blacktwin Feb 25, 2020
945f14f
is instead of == None
blacktwin Feb 25, 2020
6cf1814
toggle keyword default to False
blacktwin Feb 26, 2020
9cfbeb9
docstring update showing default
blacktwin Feb 26, 2020
59bca99
adding logging for toggle and redundant toggle
blacktwin Feb 26, 2020
ec8491c
update test
blacktwin Feb 26, 2020
f40d1da
add urlencode
blacktwin Mar 4, 2020
95114c4
create SearchResult class
blacktwin Mar 4, 2020
4c9aef2
add unmatch, matches, and fixMatches methods for movies
blacktwin Mar 4, 2020
39bb93f
add unmatch, matches, and fixMatches methods for shows
blacktwin Mar 4, 2020
0edca72
mark test as broken and skip.
blacktwin Mar 6, 2020
b296cc4
create Agent media class
blacktwin Mar 10, 2020
3418acf
create agents method in server
blacktwin Mar 10, 2020
96cb0eb
add shortIdentifier attribute to Agent
blacktwin Mar 10, 2020
f6fb3f4
add quote import for titles in matches method
blacktwin Mar 10, 2020
ac2955b
update Movie matches for manual searching
blacktwin Mar 10, 2020
3f9dbd6
update Show matches for manual searching
blacktwin Mar 10, 2020
dea8493
cast SearchResult score attribute to an int
blacktwin Mar 10, 2020
1f74368
minor docstring edits
blacktwin Mar 10, 2020
e62992a
add compat to import listing
blacktwin Mar 12, 2020
4623a54
create select method for Poster class
blacktwin Mar 12, 2020
b7c9e31
minor docstring update
blacktwin Mar 12, 2020
06ae469
create uploadPoster
blacktwin Mar 12, 2020
6ce9917
adding setPoster in Video class instead of or in combination to Poste…
blacktwin Mar 12, 2020
1abcff8
remove poster related methods
blacktwin Mar 13, 2020
4795020
moved poster related methods to base PlexPartialObject class
blacktwin Mar 13, 2020
20160b9
Merge pull request #431 from jjlawren/lookup_show_with_rating_key
Hellowlol Mar 14, 2020
c72cc24
fix for setPoster returning the new selected posters thumb path
blacktwin Mar 14, 2020
c2c13fb
removing unmatch/match methods from video:Movie and video:Show classes
blacktwin Mar 14, 2020
38b0fee
adding unmatch/match methods from video:Movie and video:Show classes …
blacktwin Mar 14, 2020
4dfdf78
drop python 3.4 and 2.7 tests.
Hellowlol Mar 14, 2020
06ca74d
Some lint and silence the error
Hellowlol Mar 14, 2020
c0f2c05
Merge pull request #433 from pkkid/allowMediaDeletion
Hellowlol Mar 14, 2020
18afdc2
some linting
Hellowlol Mar 14, 2020
dc5d147
update fixMatch to allow for auto fixmatch
blacktwin Mar 15, 2020
86c722f
docstring updates
blacktwin Mar 15, 2020
07cf7d1
fixMatch rework not so not-y
blacktwin Mar 15, 2020
30974f8
fixMatch docstring update
blacktwin Mar 15, 2020
8d334ce
allow for casting str to bool
blacktwin Mar 11, 2020
1d05304
create settings method for LibrarySection
blacktwin Mar 16, 2020
46e8b8e
update Setting _cast method
blacktwin Mar 16, 2020
cfbde38
create _settings method to capture agent setting information
blacktwin Mar 16, 2020
4a7aac1
update LibrarySection's edit method to include agent if not provided
blacktwin Mar 16, 2020
322c342
use fetchItems instead, reduce redundancy
blacktwin Mar 16, 2020
1b6e16e
add mediaTypes to capture additional Agent data
blacktwin Mar 16, 2020
07e3d66
server agents method docstring minor update
blacktwin Mar 16, 2020
99bfdb8
add __repr__ to Agent and AgentMediaType classes
blacktwin Mar 16, 2020
af586fa
cast AgentMediaType mediaType to int
blacktwin Mar 16, 2020
cea4f19
add agents method to library
blacktwin Mar 16, 2020
b54f61d
only allow sections available agents to be used.
blacktwin Mar 16, 2020
c061986
update SeachResults __repr__ to show name and score.
blacktwin Mar 16, 2020
2ab3b61
add mediaType keyword to agents method
blacktwin Mar 16, 2020
98226c0
use server.agents() mediaType keyword to shorten code
blacktwin Mar 16, 2020
a9b1497
change code attribute to languageCode
blacktwin Mar 16, 2020
54a88da
if mediaType is in initpath call is from library
blacktwin Mar 16, 2020
165c19f
if mediaType is in initpath also capture name
blacktwin Mar 17, 2020
54c871f
create getAgentIdentifier method in utils
blacktwin Mar 17, 2020
e44513c
update matches method to operate more closely to webui
blacktwin Mar 17, 2020
28d8b86
detailed example for using matches method
blacktwin Mar 17, 2020
623c304
setPoster docstring
blacktwin Mar 18, 2020
dedab2b
posters methods for collections
blacktwin Mar 18, 2020
9651f77
add posters methods to playlist
blacktwin Mar 18, 2020
53a6156
fix filepath in uploadPoster for Collections
blacktwin Mar 18, 2020
7190d9c
Merge remote-tracking branch 'origin/poster_change' into poster_change
blacktwin Mar 18, 2020
8320359
Revert "fix for setPoster returning the new selected posters thumb pa…
blacktwin Mar 18, 2020
0b4b9c4
update setPoster method in base, library.Collection, playlist
blacktwin Mar 18, 2020
d69760e
fix Collection posters method's key
blacktwin Mar 18, 2020
91a08c6
add arts methods to base.PlexPartialObject
blacktwin Mar 18, 2020
cd934c0
docstring minor update
blacktwin Mar 18, 2020
3215856
add arts methods to library.Collections
blacktwin Mar 18, 2020
1bdba21
add arts methods to playlist.Playlist
blacktwin Mar 18, 2020
87c147c
Workarounds for Android & Samsung clients
jjlawren Mar 29, 2020
cdcdfa8
Merge pull request #442 from jjlawren/more_client_workarounds
Hellowlol Mar 29, 2020
f07766f
Fix bad indents in media.py
jjlawren Mar 31, 2020
7ed812b
Merge pull request #444 from jjlawren/fix_flake8_indents
Hellowlol Mar 31, 2020
2af8974
Add GDM implementation from netdisco
jjlawren Apr 1, 2020
e97a39b
Add support to scan for Plex clients
jjlawren Apr 1, 2020
ee5983f
Remove type hinting for compatibility
jjlawren Apr 2, 2020
807aaea
Merge pull request #445 from jjlawren/add_gdm_scanning
Hellowlol Apr 3, 2020
839a9da
Merge branch 'master' into conversion_actions
blacktwin Apr 7, 2020
dd91ae4
Use Unauthorized exception (#447)
jjlawren Apr 9, 2020
cbdf5ec
Fix playMedia() calls with a PlayQueue (#446)
jjlawren Apr 10, 2020
e9ecb59
Raise exception when empty key passed to fetchItem* (#432)
jjlawren Apr 11, 2020
0a77c74
Merge pull request #426 from pkkid/conversion_actions
blacktwin Apr 13, 2020
2a198f5
flake fix
blacktwin Apr 13, 2020
fb1ea67
flake fix
blacktwin Apr 13, 2020
d7d2d5a
flake fix
blacktwin Apr 13, 2020
bef40a7
Merge branch 'master' into unmatch_match
blacktwin Apr 13, 2020
4cbccab
Merge branch 'master' into new_hubs
blacktwin Apr 13, 2020
2235caf
Merge branch 'master' into poster_change
blacktwin Apr 13, 2020
83a292a
Merge pull request #436 from pkkid/unmatch_match
blacktwin Apr 13, 2020
319fe52
Merge branch 'master' into poster_change
blacktwin Apr 13, 2020
f371061
Merge pull request #437 from pkkid/poster_change
blacktwin Apr 13, 2020
efad7eb
flake fix
blacktwin Apr 13, 2020
a47f67d
Merge remote-tracking branch 'origin/new_hubs' into new_hubs
blacktwin Apr 13, 2020
ba1559d
flake fix
blacktwin Apr 13, 2020
3a95f55
Merge pull request #410 from pkkid/new_hubs
blacktwin Apr 13, 2020
6741be0
fix tests
Hellowlol Apr 14, 2020
cc71dae
sync
Hellowlol Apr 15, 2020
ed3d16d
som pytest 4 compat
Hellowlol Apr 15, 2020
a6cfe42
Raise NotFound on 404 errors
jjlawren Apr 15, 2020
e0d5a87
misc fixes
Hellowlol Apr 15, 2020
b01d808
fix bug
Hellowlol Apr 15, 2020
350f437
fix test_settinngs_get
Hellowlol Apr 15, 2020
049791c
Add server NotFound test
jjlawren Apr 16, 2020
a133243
Fix docstrings for tests, remove unused param
jjlawren Apr 16, 2020
a1b9cc2
Delete man.py
Hellowlol Apr 16, 2020
e56bb29
Merge pull request #453 from pkkid/tests
Hellowlol Apr 16, 2020
0da9e39
Merge pull request #451 from jjlawren/raise_notfound
Hellowlol Apr 16, 2020
06e6386
Minor test fixes
jjlawren Apr 16, 2020
e914456
Merge pull request #457 from jjlawren/minor_test_fixes
Hellowlol Apr 16, 2020
6e1fac7
Fix client control on unclaimed servers (#456)
jjlawren Apr 16, 2020
9baff74
Fix example
jjlawren Apr 16, 2020
37b4c87
Merge pull request #452 from jjlawren/fix_docstrings
blacktwin Apr 16, 2020
34c5061
update travis build
Hellowlol Apr 16, 2020
70d93ad
Only test important client attributes (#458)
jjlawren Apr 17, 2020
74ae49e
Bump to 3.4.0 for release (#459)
jjlawren Apr 17, 2020
30ab858
Remove redundant travis conditional (#460)
jjlawren Apr 17, 2020
62cb758
Add myplex.MyPlexPinLogin
Montellese Dec 6, 2019
772c41d
Merge pull request #411 from Montellese/feature/myplex_pinlogin
Hellowlol Apr 20, 2020
6eea7cc
Allow pagination (#464)
Hellowlol Apr 26, 2020
93dda3c
reduce loglevel
Hellowlol Apr 26, 2020
91d76a5
Make it easier to set a container size using search
Hellowlol Apr 26, 2020
66df034
add fetchItems to library
Hellowlol Apr 26, 2020
db1f9a9
use cast
Hellowlol Apr 26, 2020
0647c71
only update if all is in the url
Hellowlol Apr 26, 2020
1ba8fe7
Add misssing docstring
Hellowlol Apr 26, 2020
5a2f14e
Update based on comments.
Hellowlol Apr 27, 2020
819292b
add some tests
Hellowlol Apr 27, 2020
967702f
Update README.rst
Hellowlol Apr 27, 2020
55b335e
Add lookup & control of linked Sonos speakers
jjlawren Apr 28, 2020
95188b0
Add Sonos cache & speaker lookup methods, set X-Plex-Client-Identifier
jjlawren Apr 28, 2020
1e77e76
Add log message
Hellowlol Apr 29, 2020
1275f7c
Format with black
jjlawren Apr 29, 2020
c4c90ac
Remove f-string for py2 compatibility
jjlawren Apr 29, 2020
2683c77
first pass on static media
Hellowlol Apr 18, 2020
4d4f712
update location path for docker
Hellowlol Apr 29, 2020
4736729
Fix some audio test
Hellowlol Apr 29, 2020
0520ca7
Update test_audio.py
Hellowlol Apr 29, 2020
c9052ef
fix audio test
Hellowlol Apr 29, 2020
6358f05
Update test_navigation.py
Hellowlol Apr 29, 2020
89a1ae0
Remove some unused
Hellowlol Apr 29, 2020
22763c2
Update README.rst
Hellowlol Apr 29, 2020
517c9fb
change if statement to caught any not None keywords
blacktwin Apr 30, 2020
911fb7e
add agent keyword to fixMatch method
blacktwin Apr 30, 2020
25ae83c
add agent to fixMatch docstring
blacktwin Apr 30, 2020
64e935c
Merge pull request #470 from pkkid/static_media
Hellowlol May 1, 2020
c4091b5
Merge pull request #469 from pkkid/more-badges
Hellowlol May 1, 2020
b8135d5
Merge pull request #465 from pkkid/remove_warning
Hellowlol May 1, 2020
437eea8
Merge pull request #466 from pkkid/batchsearch
Hellowlol May 1, 2020
9617e16
Update toc.rst
Hellowlol May 1, 2020
e3dc61d
add merge method
Hellowlol May 1, 2020
c5fc907
add merge test
Hellowlol May 1, 2020
6a3e7a0
fix bug
Hellowlol May 1, 2020
201466a
Allow failure
Hellowlol May 1, 2020
c78c3f1
Create gdm.rst
Hellowlol May 1, 2020
c466b09
Allow int to pass aswell
Hellowlol May 1, 2020
187550e
fix docstrings.
Hellowlol May 1, 2020
d9442f3
Update gdm.py
Hellowlol May 1, 2020
280c768
Update gdm.py
Hellowlol May 1, 2020
9c4b98a
Merge pull request #475 from pkkid/merge
Hellowlol May 1, 2020
337cb29
Merge pull request #474 from pkkid/add_docs
Hellowlol May 1, 2020
8ac2edb
reduce deps
Hellowlol Apr 27, 2020
5911597
forgot one file.
Hellowlol Apr 27, 2020
7905ff0
Merge pull request #468 from pkkid/less_deps
Hellowlol May 1, 2020
95e52b5
error catch for zero results when using fixMatch(auto=True)
blacktwin May 2, 2020
608433b
making sure `?manual=1` is included in key
blacktwin May 2, 2020
2af1452
if agent is the only keyword then only add language and agent to params
blacktwin May 2, 2020
17adcd1
Document Sonos controls in README
jjlawren May 2, 2020
03c8946
Doc fix, black reformat
jjlawren May 2, 2020
430113d
add key to initpath
blacktwin May 4, 2020
f058668
creation of test_video_Movie_match
blacktwin May 5, 2020
f55b8a1
Add mocked tests for Sonos
jjlawren May 6, 2020
771d051
Add requests-mock as testing dependency
jjlawren May 6, 2020
2267378
Merge pull request #472 from pkkid/matching_fix
Hellowlol May 10, 2020
6daaa85
Merge pull request #471 from jjlawren/sonos_controls
Hellowlol May 10, 2020
fd08036
Bump to 3.5.0
jjlawren May 11, 2020
f782f52
Merge pull request #484 from jjlawren/bump_3.5.0
jjlawren May 11, 2020
2df2a05
Update sonos.py
Hellowlol May 11, 2020
42c83aa
Fix for library title search when special chars is used
Hellowlol May 11, 2020
f6e311f
2nd attempt to fix title bug
Hellowlol May 11, 2020
5f3fb89
Update README.rst
Hellowlol May 11, 2020
8439451
Update test_server.py
Hellowlol May 11, 2020
60e40bb
pos
Hellowlol May 11, 2020
723c594
add readthedocs
Hellowlol May 11, 2020
530c6d6
burn
Hellowlol May 11, 2020
709daba
Merge pull request #485 from pkkid/fix-title-bug
Hellowlol May 11, 2020
6886dd3
Merge pull request #486 from pkkid/Hellowlol-patch-1
Hellowlol May 11, 2020
3d2fcad
Merge pull request #487 from pkkid/tocs
Hellowlol May 11, 2020
873d6af
Update toc.rst
Hellowlol May 11, 2020
65abf1c
Merge pull request #488 from pkkid/misssing_module
Hellowlol May 11, 2020
5f9697a
Update .readthedocs.yml
Hellowlol May 11, 2020
4fa26c4
Merge branch 'master' of https://github.com/pkkid/python-plexapi
Hellowlol May 11, 2020
a5ee061
bump
Hellowlol May 11, 2020
5fe5109
Remove 'timeline/subscribe' calls
jjlawren May 12, 2020
7261f10
Fix modname
Hellowlol May 12, 2020
19168c6
Update .travis.yml
Hellowlol May 12, 2020
940efc0
first pass on compat.
Hellowlol May 12, 2020
6138c70
first pass on tools and tests
Hellowlol May 12, 2020
cf75bb9
add some f401 stop flake from failing
Hellowlol May 12, 2020
2c4f215
Merge pull request #490 from pkkid/doc_fixx
Hellowlol May 13, 2020
c31db74
add coveralls webhook (#467)
Hellowlol May 13, 2020
a0c5eec
Delete compat.py
Hellowlol May 13, 2020
f8823d4
Merge pull request #492 from pkkid/drop-py2
Hellowlol May 13, 2020
1ffefb1
Merge pull request #491 from pkkid/travis-secret-change
Hellowlol May 13, 2020
275f4ba
Revert change to default timeline argument
jjlawren May 13, 2020
735e26f
Sonos lookup fixes and tests
jjlawren May 15, 2020
6a9ecc4
Merge pull request #495 from jjlawren/sonos_lookup_fixes
Hellowlol May 15, 2020
61c0669
create Marker class
blacktwin May 23, 2020
65271c3
update episodes _include to include markers
blacktwin May 23, 2020
f6fcf95
create Preferences class
blacktwin May 24, 2020
a771fea
import settings
blacktwin May 24, 2020
4db38e6
add _include to show
blacktwin May 24, 2020
6a69fe4
create preferences method
blacktwin May 24, 2020
81339cc
import library and create hubs method
blacktwin May 24, 2020
ce3fcc9
update hubs method
blacktwin May 24, 2020
1cfc986
create ondeck method for shows
blacktwin May 24, 2020
8a744f8
correcting onDeck docstring
blacktwin May 25, 2020
5e3dff4
update analyze docstring to include new intro video marker
blacktwin May 25, 2020
a2ef4a5
create hasIntroMarker method to quickly identify if an episode has an…
blacktwin May 25, 2020
4193012
Improve Sonos ID lookup (#496)
jjlawren May 26, 2020
4a24d50
Reduce timeout to expire Sonos resource cache (#500)
jjlawren May 27, 2020
660a665
only check for intro markers in case Plex decides to add different ma…
blacktwin May 27, 2020
558eafa
no need for double bool
blacktwin May 27, 2020
2d4a919
resolving conflict
blacktwin May 28, 2020
1d8d76e
Merge branch 'master' into intro_marker
blacktwin May 28, 2020
3834d3c
Add issue templates
blacktwin May 28, 2020
9594129
Create pull_request_template.md
blacktwin May 28, 2020
6c230e5
Merge pull request #501 from pkkid/add-issue-template
Hellowlol Jun 2, 2020
785a2f0
Merge pull request #489 from jjlawren/timeline_do_not_subscribe
Hellowlol Jun 2, 2020
b98d2e9
Merge pull request #498 from pkkid/intro_marker
Hellowlol Jun 2, 2020
f2f6d8b
forgot to bump
Hellowlol Jun 2, 2020
1f396ca
remove field attribute
blacktwin Jun 5, 2020
faeee7d
import timedelta to utils
blacktwin Jun 14, 2020
3852ed5
create millisecondToHuman method in utils
blacktwin Jun 14, 2020
881a4fc
use utils.millisecondToHuman for media.Marker.__repr__
blacktwin Jun 14, 2020
d7c215b
Small change to the repr and add test.
Hellowlol Jun 14, 2020
37c8575
Merge pull request #505 from pkkid/intro_update
Hellowlol Jun 14, 2020
4c8fef1
Fix ElementTree warnings
jjlawren Jun 29, 2020
4b2e38d
Fixes #527: Added BSD license information to package metadata
andy-maier Jul 12, 2020
7c346f9
chore(utils): fix typo
tdorsey Jul 18, 2020
6d82aba
Merge pull request #528 from andy-maier/andy/add-license-to-package
Hellowlol Jul 24, 2020
65fa780
Merge pull request #520 from jjlawren/fix_elementtree_warnings
Hellowlol Jul 24, 2020
6573b8b
Merge pull request #531 from tdorsey/patch-2
Hellowlol Jul 24, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[run]
omit = */site-packages/plexapi/*



[report]
exclude_lines =
pragma: no cover
Expand Down
16 changes: 16 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Flake8 configuration
# Copy or symlink this file to ~/.flake8
# --------------------------------------
# E128: continuation line under-indented for visual indent
# E701: multiple statements on one line (colon)
# E702: multiple statements on one line (semicolon)
# E731: do not assign a lambda expression, use a def
# W293: blank line contains whitespace
# W503: line break before binary operator
# W605: invalid escape sequence
[flake8]
ignore=E128,E701,E702,E731,W293,W503,W605
exclude=compat.py
max-complexity = -1
max-line-length = 125
show-source = True
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: bug_report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the issue**
A clear and concise description of what the issue is.

**Code snipppets**
Add code snippet to help explain your problem.
- please use markdown [Code and Syntax Highlighting](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code-and-syntax-highlighting) for code snippet

**Expected behavior**
A clear and concise description of what you expected to happen.

**Enviroment (please complete the following information):**
- OS: [e.g. Linux, Windows, Docker]
- Plex version [eg. version 1.19.3.2852]
- Python Version [e.g. 2.7.15, 3.6]
- PlexAPI version [e.g. 3.6.0]

**Additional context**
Add any other context about the issue here.
23 changes: 23 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Description

Please include a summary of the change and which issue is fixed.

Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update


## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have added or updated the docstring for new or existing methods
- [ ] I have added tests when applicable
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ config.ini
ipython_config.py
dist
docs/_build/
docs/src/
htmlcov
include/
lib/
pip-selfcheck.json
pyvenv.cfg
pyvenv.cfg
MANIFEST
21 changes: 21 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# .readthedocs.yml

version: 2

build:
image: latest

sphinx:
configuration: docs/conf.py

formats: all

python:
version: 3.7
install:
- requirements: requirements_dev.txt
- method: pip
path: .

system_packages: true

19 changes: 11 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@ language: python

stages:
- test
- name: deploy
if: tag = present
- deploy

sudo: required
services:
- docker

python:
- 2.7
- 3.4
- 3.6

env:
Expand All @@ -23,8 +20,10 @@ env:
before_install:
- pip install --upgrade pip
- pip install --upgrade setuptools
- pip install --upgrade pytest pytest-cov coveralls
install:
- pip install .
- python -c "import plexapi; print('installation ok')"
- pip install --upgrade pytest pytest-cov coveralls
- pip install -r requirements_dev.txt
- '[ -z "${PLEXAPI_AUTH_MYPLEX_USERNAME}" ] && PYTHONPATH="$PWD:$PYTHONPATH" python -u tools/plex-bootstraptest.py
--destination plex --advertise-ip=127.0.0.1 --bootstrap-timeout 540 --docker-tag $PLEX_CONTAINER_TAG --unclaimed ||
Expand All @@ -43,6 +42,10 @@ after_success:
after_script:
- '[ -z "${PLEXAPI_AUTH_MYPLEX_USERNAME}" ] || PYTHONPATH="$PWD:$PYTHONPATH" python -u tools/plex-teardowntest.py'


notifications:
webhooks: https://coveralls.io/webhook

jobs:
include:
- python: 3.6
Expand All @@ -56,7 +59,7 @@ jobs:
- stage: test
python: 3.6
env:
- PLEX_CONTAINER_TAG=1.10.1.4602-f54242b6b
- PLEX_CONTAINER_TAG=latest
- TEST_ACCOUNT_ONCE=1
- stage: test
python: 3.6
Expand All @@ -73,8 +76,8 @@ jobs:
- PLEX_CONTAINER_TAG=latest
deploy:
provider: pypi
user: mjs7231
user: hellowlol
password:
secure: UhuEN9GAp9zMEXdVTxSrbhfYf4HjTcj47l093Qh1HYKmZACxJM/+JkQCm7+oHPJpo7YDLk2we9oEsQ41maZBr9WgZI1lwR6m590M12vPhPI7NCVzINxJqebc0uZhCFsAFFKA3kzpRQbDfsBUG4yL/AzeMcvJMgIg3m07KRVhBywnnRhQ77trbBI0Io5MBzfW9PYDeGJqlNDBM7SbB4tK0udGZQT9wmFwvIoJODPDnM15Ry4vpkVNww/vVgyHklmnYlPzQgvhSMOXk0+MWlYtaKmu6uuLAiRccT1Fsmi1POKuFEq8S0Z7w4LmwxCVRaCvsZdNW5eXWgPDhZXNcLrKMwjgJt9Vj3VcD+NCywux/C1hTq7tecBocA13kzbgg4fd2sATOjQT5iaRPGrDtKm8e00hxr125n0StDxXdYGl2W5sH0LCkZE6Vq1GjXYjKFXZeTk3Fzav/3N8IxHBX3CliJB/vbloJ2mpz1kXL4UTORl9pghPyGOOq2yJPYSSWly/RsAD7UDrL1/lezaPSJGKbZJ0CMyfA83kd82/hgZflOuBuTcPHCZSU3zMCs0fsImZZxr6Qm1tbff+iyNS/ufoYgeVfsWhlEl9FoLv1g4HG6oA+uDHz+jKz9uSRHcGqD6P4JJK+H+yy0PeYfo7b6eSqFxgt8q8QfifUaCrVoCiY+c=
secure: cwMf16s+PxIUjt6/pKE7KeQPsWg4Atf9JvipkLTjx1VrVBilSjrZ7fkSDDjglkz4sCynw5/fzQRkBWqLdyqPigwKICYbpc6QWwvR+WWQLfe04zl+d4AmDljN2rtNkThlpH2qKNaFX7Up3AAcTf+GtQ7weAAyjMyJaiWBTFcgc2eBMDgEkS3bhiF4qdbfdAYbHVurJwCWXfHjkIiBJxDHA15cQRhJpkqQGIYzAst6ZwEr/Aw9FwqfC3lvFM3uIQ7sfFa/UdIesQZ50IT//roI1bvTg2T4gAMRYMs09jFm1E5mnPn4qxvK2hzsiNNesw3wSXhCehJFym8cO5jX+EYnfNJuWJtappIZeJGKldVC2g2v3PNWhmqbbKnyc446rkPtjVQqrSSUjPNOhTG61n872JVnizopo8ISDAtceSoC/mySItzjRQnRDrelkhHdV33WSyOsJKTw0H2LzjZDQRxxTqABmmCwzn7h+ycQ2Xk2INu9gt0hgIOco6Lt6VeoDMXhD6wAGDAaD7XBQwD/JSbGZns3VIgoLMxyHda9S6UeDmwwoAWhHM0mbzt0L618R+7CK0E+3vQ2k2Ee23tKIOq7DvZMpmLLjUE3wlckoKCPDrgP7Tuf5nUoz6kWv3Hxsb0wZCuVO0npSCFx+JOSQ6/7ONU4eh3hvjnnb6vqAgKqQ80=
on:
tags: true
96 changes: 65 additions & 31 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ Python-PlexAPI
:target: https://travis-ci.org/pkkid/python-plexapi
.. image:: https://coveralls.io/repos/github/pkkid/python-plexapi/badge.svg?branch=master
:target: https://coveralls.io/github/pkkid/python-plexapi?branch=master
.. image:: https://img.shields.io/github/tag/pkkid/python-plexapi.svg?label=github+release
:target: https://github.com/pkkid/python-plexapi/releases
.. image:: https://badge.fury.io/py/PlexAPI.svg
:target: https://badge.fury.io/py/PlexAPI
.. image:: https://img.shields.io/github/last-commit/pkkid/python-plexapi.svg
:target: https://img.shields.io/github/last-commit/pkkid/python-plexapi.svg


Overview
Expand All @@ -15,7 +21,7 @@ Plex Web Client. A few of the many features we currently support are:

* Navigate local or remote shared libraries.
* Perform library actions such as scan, analyze, empty trash.
* Remote control and play media on connected clients.
* Remote control and play media on connected clients, including `Controlling Sonos speakers`_
* Listen in on all Plex Server notifications.


Expand Down Expand Up @@ -118,48 +124,76 @@ Usage Examples

.. code-block:: python

# Example 8: Get a URL to stream a movie or show in another client
die_hard = plex.library.section('Movies').get('Elephants Dream')
print('Run running the following command to play in VLC:')
print('vlc "%s"' % die_hard.getStreamURL(videoResolution='800x600'))
# Example 8: Get audio/video/all playlists
for playlist in plex.playlists():
print(playlist.title)


.. code-block:: python

# Example 9: Get audio/video/all playlists
for playlist in plex.playlists():
print(playlist.title)
# Example 9: Rate the 100 four stars.
plex.library.section('TV Shows').get('The 100').rate(8.0)


Controlling Sonos speakers
--------------------------

To control Sonos speakers directly using Plex APIs, the following requirements must be met:

1. Active Plex Pass subscription
2. Sonos account linked to Plex account
3. Plex remote access enabled

Due to the design of Sonos music services, the API calls to control Sonos speakers route through https://sonos.plex.tv
and back via the Plex server's remote access. Actual media playback is local unless networking restrictions prevent the
Sonos speakers from connecting to the Plex server directly.

.. code-block:: python

from plexapi.myplex import MyPlexAccount
from plexapi.server import PlexServer

baseurl = 'http://plexserver:32400'
token = '2ffLuB84dqLswk9skLos'

account = MyPlexAccount(token)
server = PlexServer(baseurl, token)

# List available speakers/groups
for speaker in account.sonos_speakers():
print(speaker.title)

# Obtain PlexSonosPlayer instance
speaker = account.sonos_speaker("Kitchen")

album = server.library.section('Music').get('Stevie Wonder').album('Innervisions')

# Speaker control examples
speaker.playMedia(album)
speaker.pause()
speaker.setVolume(10)
speaker.skipNext()


Running tests over PlexAPI
--------------------------

In order to test the PlexAPI library you have to prepare a Plex Server instance with following libraries:

1. Movies section (agent `com.plexapp.agents.imdb`) containing both movies:
* Sintel - https://durian.blender.org/
* Elephants Dream - https://orange.blender.org/
* Sita Sings the Blues - http://www.sitasingstheblues.com/
* Big Buck Bunny - https://peach.blender.org/
2. TV Show section (agent `com.plexapp.agents.thetvdb`) containing the shows:
* Game of Thrones (Season 1 and 2)
* The 100 (Seasons 1 and 2)
* (or symlink the above movies with proper names)
3. Music section (agent `com.plexapp.agents.lastfm`) containing the albums:
* Infinite State - Unmastered Impulses - https://github.com/kennethreitz/unmastered-impulses
* Broke For Free - Layers - http://freemusicarchive.org/music/broke_for_free/Layers/
4. A Photos section (any agent) containing the photoalbums (photoalbum is just a folder on your disk):
* `Cats`
* Within `Cats` album you need to place 3 photos (cute cat photos, of course)
* Within `Cats` album you should place 3 more photoalbums (one of them should be named `Cats in bed`,
names of others doesn't matter)
* Within `Cats in bed` you need to place 7 photos
* Within other 2 albums you should place 1 photo in each

Instead of manual creation of the library you could use a script `tools/plex-boostraptest.py` with appropriate
Use:

.. code-block:: bash

tools/plex-boostraptest.py

with appropriate
arguments and add this new server to a shared user which username is defined in environment veriable `SHARED_USERNAME`.
It uses `official docker image`_ to create a proper instance.

For skipping the docker and reuse a existing server use

.. code-block:: bash

python plex-boostraptest.py --no-docker -username USERNAME --password PASSWORD --server-name NAME-OF-YOUR-SEVER

Also in order to run most of the tests you have to provide some environment variables:

* `PLEXAPI_AUTH_SERVER_BASEURL` containing an URL to your Plex instance, e.g. `http://127.0.0.1:32400` (without trailing
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def new_resolve_xref(*args):
# You can specify multiple suffix as a list of string:
# source_suffix = ['.rst', '.md']
# source_suffix = '.rst'
source_parsers = {'.md': CommonMarkParser}
source_suffix = ['.rst', '.md']
# source_parsers = {'.md': CommonMarkParser} # deprecated
# source_suffix = ['.rst', '.md'] # deprecated

# The encoding of source files.
# source_encoding = 'utf-8-sig'
Expand Down
7 changes: 7 additions & 0 deletions docs/modules/gdm.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. include:: ../global.rst

Gdm :modname:`plexapi.gdm`
--------------------------------
.. automodule:: plexapi.gdm
:members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/modules/sonos.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. include:: ../global.rst

Sonos :modname:`plexapi.sonos`
--------------------------------
.. automodule:: plexapi.sonos
:members:
:show-inheritance:
3 changes: 3 additions & 0 deletions docs/toc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
modules/client
modules/config
modules/exceptions
modules/gdm
modules/library
modules/media
modules/myplex
Expand All @@ -25,6 +26,8 @@
modules/playqueue
modules/server
modules/settings
modules/sonos
modules/sync
modules/utils
modules/video

5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"scripts": {
"pypi": "python setup.py sdist upload"
}
}
5 changes: 3 additions & 2 deletions plexapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
import os
from logging.handlers import RotatingFileHandler
from platform import uname
from uuid import getnode

from plexapi.config import PlexConfig, reset_base_headers
from plexapi.utils import SecretsFilter
from uuid import getnode

# Load User Defined Config
DEFAULT_CONFIG_PATH = os.path.expanduser('~/.config/plexapi/config.ini')
Expand All @@ -14,7 +15,7 @@

# PlexAPI Settings
PROJECT = 'PlexAPI'
VERSION = '3.1.0'
VERSION = '4.0.0'
TIMEOUT = CONFIG.get('plexapi.timeout', 30, int)
X_PLEX_CONTAINER_SIZE = CONFIG.get('plexapi.container_size', 100, int)
X_PLEX_ENABLE_FAST_CONNECT = CONFIG.get('plexapi.enable_fast_connect', False, bool)
Expand Down
Loading