Commit graph

2436 commits

Author SHA1 Message Date
JonnyWong16
8b3235445f
Release 4.13.2 2022-12-21 14:00:56 -08:00
JonnyWong16
a314caf861
Add pin parameter to switchHomeUser (#1076) 2022-12-21 13:57:23 -08:00
JonnyWong16
9b8c7d522d
Properly close file object in mixin uploads (#1074)
* Properly close file object in mixin uploads

* Also support a file-like object as the upload `filepath` parameter

* Update image upload tests for file-like object
2022-12-21 13:56:02 -08:00
Elan Ruusamäe
e1e9a6995e
Fix: Remove bogus space from limit parameter (#1073) 2022-12-21 13:10:48 -08:00
Elan Ruusamäe
668fdbbe56
Allow overriding includeUserState for _toOnlineMetadata (#1071)
* Allow overriding includeUserState for _toOnlineMetadata

* Pass kwargs from watchlist to _toOnlineMetadata

Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
2022-12-21 13:10:09 -08:00
Elan Ruusamäe
c3d2a56a80
Use totalSize attribute for watchlist walking (#1070) 2022-12-21 13:02:02 -08:00
Elan Ruusamäe
b056e9d60b
Fix: Inherit session when creating internal PlexServer objects (#1069)
* Make myPlexAccount inherit session

* Pass session to _toOnlineMetadata PlexServer
2022-12-21 13:01:37 -08:00
JonnyWong16
73f8a8be36
Fix parsing requirements in setup.py (#1075) 2022-12-21 12:40:00 -08:00
JonnyWong16
f330d87d51
Fix getGuid doc string (#1068) 2022-12-21 11:52:29 -08:00
Elan Ruusamäe
7580fc84a9
Use cached_property decorator (#1065)
* Use @cached_property in PlexSession.user

* Use @cached_property in PlexServer.library

* Use @cached_property in PlexServer.settings

* Tests: Update clearing plex.settings cache

* Use @cached_property in LibrarySection.totalSize

* Add backports.cached-property==1.0.2; python_version<="3.7" dependency

* Import cached_property from dist or backports

* Add backports.cached-property to requirements_dev.txt

* Remove version pin for backports.cached-property in requirements.txt

Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>

Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
2022-12-21 11:51:45 -08:00
JonnyWong16
ac41fbf4fb
Add 2FA code parameter for MyPlexAccount (#1063) 2022-12-21 11:44:34 -08:00
JonnyWong16
955c697549
Add Rating media tag (#1059)
* Add tagKey for Role

* Simplify Guid tag

* Sort tag attributes and update doc strings

* Add media Rating tag

* Add tests for Rating tag
2022-12-21 11:43:52 -08:00
JonnyWong16
be42435ed3
Factor out playQueue() method to PlexPartialObject (#1058)
* Factor out `playQueue` to `PlexPartialObject`

* Update `PlayQueue.create()`

* Fix playqueue tests
2022-12-21 11:43:26 -08:00
JonnyWong16
e5d3ebe273
Fix parsing settings enum (#1057)
* Assume key and value are equal when missing `key:value` pair
2022-12-21 11:34:50 -08:00
JonnyWong16
9dbb2e5169
Create music playlist from m3u file (#1055)
* Create music playlists from m3u files

* Add test for playlist m3u import

* Add createCollection examples
2022-12-21 11:32:43 -08:00
ReenigneArcher
b5110722fd
Add timeout parameter to uploadTheme (#1039)
Since themes may take a while to upload, it may be beneficial to have a separate `timeout` option for uploading themes, instead of using the default `config.TIMEOUT`.
2022-12-21 11:32:07 -08:00
JonnyWong16
3d3f9da501
Release 4.13.1 2022-11-08 18:02:59 -08:00
JonnyWong16
c4bab34474
Patch deprecated set-output in CI workflow (#1053) 2022-11-08 18:01:42 -08:00
dependabot[bot]
f1ec77c77f
Bump websocket-client from 1.4.0 to 1.4.2 (#1051)
Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 1.4.0 to 1.4.2.
- [Release notes](https://github.com/websocket-client/websocket-client/releases)
- [Changelog](https://github.com/websocket-client/websocket-client/blob/master/ChangeLog)
- [Commits](https://github.com/websocket-client/websocket-client/compare/v1.4.0...v1.4.2)

---
updated-dependencies:
- dependency-name: websocket-client
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-08 17:44:19 -08:00
dependabot[bot]
96d5dff693
Bump sphinx-rtd-theme from 1.0.0 to 1.1.1 (#1050)
Bumps [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme) from 1.0.0 to 1.1.1.
- [Release notes](https://github.com/readthedocs/sphinx_rtd_theme/releases)
- [Changelog](https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/changelog.rst)
- [Commits](https://github.com/readthedocs/sphinx_rtd_theme/compare/1.0.0...1.1.1)

---
updated-dependencies:
- dependency-name: sphinx-rtd-theme
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-08 17:33:32 -08:00
dependabot[bot]
800510c55e
Bump pillow from 9.2.0 to 9.3.0 (#1047)
Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.2.0 to 9.3.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/9.2.0...9.3.0)

---
updated-dependencies:
- dependency-name: pillow
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-08 17:28:50 -08:00
dependabot[bot]
5933c5eab7
Bump pytest from 7.1.2 to 7.2.0 (#1045)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.1.2 to 7.2.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.1.2...7.2.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-08 17:22:52 -08:00
dependabot[bot]
15aa9adc8a
Update pytest-mock requirement from <3.8.3 to <3.10.1 (#1040)
Updates the requirements on [pytest-mock](https://github.com/pytest-dev/pytest-mock) to permit the latest version.
- [Release notes](https://github.com/pytest-dev/pytest-mock/releases)
- [Changelog](https://github.com/pytest-dev/pytest-mock/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-mock/compare/v0.1.0...v3.10.0)

---
updated-dependencies:
- dependency-name: pytest-mock
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-08 17:16:29 -08:00
dependabot[bot]
5508f4b6cd
Bump pytest-cov from 3.0.0 to 4.0.0 (#1034)
Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 3.0.0 to 4.0.0.
- [Release notes](https://github.com/pytest-dev/pytest-cov/releases)
- [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-cov/compare/v3.0.0...v4.0.0)

---
updated-dependencies:
- dependency-name: pytest-cov
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-08 16:52:21 -08:00
dependabot[bot]
817e0cddac
Bump tqdm from 4.64.0 to 4.64.1 (#1022)
Bumps [tqdm](https://github.com/tqdm/tqdm) from 4.64.0 to 4.64.1.
- [Release notes](https://github.com/tqdm/tqdm/releases)
- [Commits](https://github.com/tqdm/tqdm/compare/v4.64.0...v4.64.1)

---
updated-dependencies:
- dependency-name: tqdm
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-08 16:52:04 -08:00
dependabot[bot]
d945181dbc
Bump requests-mock from 1.9.3 to 1.10.0 (#1020)
Bumps [requests-mock](https://github.com/jamielennox/requests-mock) from 1.9.3 to 1.10.0.
- [Release notes](https://github.com/jamielennox/requests-mock/releases)
- [Commits](https://github.com/jamielennox/requests-mock/compare/1.9.3...1.10.0)

---
updated-dependencies:
- dependency-name: requests-mock
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-08 16:51:50 -08:00
Michael Cramer
1d5eb8a883
"repeat" should not be a boolean: 0, 1 or 2 (#1046)
* "repeat" should not be a boolean: 0, 1 or 2

* cast to int
2022-11-08 16:36:56 -08:00
JonnyWong16
c3af2d88c6
Fix MyPlexAccount.removePin() test (#1052) 2022-11-08 16:29:15 -08:00
JonnyWong16
3216acfb41
Add methods to change Plex Home PIN (#1044)
* Add methods to change Plex Home PIN

* Add tests for changing Plex Home PIN
2022-11-08 15:57:54 -08:00
Sebastian Noel Lübke
f97b1c48c8
fix typo (#1041) 2022-11-08 15:57:30 -08:00
JonnyWong16
01c8ff269d
Fix initializing metadata.provider.plex.tv multiple times (#1027) 2022-11-08 15:57:16 -08:00
JonnyWong16
9b0c8e5fd3
More f-string changes (#1025) 2022-11-08 13:40:18 -08:00
Rick Getz
52b3abfe69
Add container size to seasons request to allow more than 20 to be pulled (#1019)
* Add container size to seasons request to allow more than 20 to be pulled

* Add child count as container_size argument as requested.

* Spacing typo
2022-11-08 13:39:53 -08:00
dependabot[bot]
d95aea013f
Bump codecov/codecov-action from 3.1.0 to 3.1.1 (#1029)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3.1.0...v3.1.1)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-08 13:17:16 -08:00
dependabot[bot]
1d64724aa9
Bump actions/cache from 3.0.8 to 3.0.11 (#1042)
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.8 to 3.0.11.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3.0.8...v3.0.11)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-08 13:16:18 -08:00
JonnyWong16
1e92061d20
Remove sync tests from CI (#1028) 2022-11-08 13:08:23 -08:00
JonnyWong16
2f52b300f1
Fix library guid search (#1024)
* Fix library guid search

* PMS 1.28.2.6151-914ddd2b3 no longer allows `guid!=` search

* Update library search operators doc string for guid
2022-09-08 14:58:04 -07:00
JonnyWong16
356ce8bf7e
Release 4.13.0 2022-08-27 23:09:16 -07:00
JonnyWong16
020a32f2b8
Update PlexAPI to f-strings (#1000)
* Update plexapi to f-strings

* Update tests to f-strings
2022-08-27 22:56:01 -07:00
Joshua Peek
fbc124aa57
Fix searchDiscover handling invalid results (#1013)
* Filter out bad discover search results

An stub object is sometimes returned from the API that is marked as
`'external'` but has has no `'SearchResults'` key.

    {'id': 'external', 'title': 'More Ways To Watch', 'size': 0}

* Wrap line to fit 127c

* Ensure empty array for SearchResult
2022-08-27 06:24:10 -07:00
JonnyWong16
4d9e1d4f14
Add edition support for movies (#1010)
* Add editionTitle to Movie attributes

* Add EditionTitleMixin to Movie

* Add tests for movie editionTitle

* Add `editions()` method to Movie

* Add test for movie editions method
2022-08-27 06:17:33 -07:00
JonnyWong16
02e3ddf3c1
Add maxresults parameter to MyPlexAccount.watchlist() (#1009)
* Add `maxresults` parameter to watchlist

* Test watchlist maxresults
2022-08-27 00:20:11 -07:00
JonnyWong16
e640f57319
Add utils.toJson(obj) function to convert an object to a JSON string (#998)
* Add `utils.toJson(obj)` function to convert an object to a JSON string

* Add test for utils.toJson()
2022-08-27 00:13:41 -07:00
JonnyWong16
ef12e64a6f
Add support for using MediaTag objects when editing tags (#994)
* Support using MediaTag objects when editing tags

* Update tests for editing tags with MediaTag objects
2022-08-26 22:52:50 -07:00
JonnyWong16
d1211722c8
Use pagination for /all endpoints (#990) 2022-08-26 22:45:15 -07:00
JonnyWong16
c8854c64c9
Add return self to various methods to support chaining (#986)
* Add return self to various methods to support chaining

* Fix runButlerTask test
2022-08-26 14:44:50 -07:00
JonnyWong16
f0ed19c2fe
Add PlayedUnplayedMixin (#984)
* Add PlayedUnplayedMixin

* Deprecate Video isPlayed, markWatched, and markUnwatched

* Rename all deprecated methods

* Return self to enable method chaining

* Update tests for audio markPlayed / markUnplayed using history

* Remove duplicate video history tests
2022-08-26 12:14:24 -07:00
JonnyWong16
716d8edb52
Add ability to toggle account view state syncing (#983)
* Add method to enable/disable view state syncing

* Add tests for view state sync
2022-08-26 12:00:46 -07:00
meisnate12
6b29307aa2
Add ManagedHub Object and methods (#785) 2022-08-26 10:43:47 -07:00
JonnyWong16
20a6b3c06f
Ensure watchlist is cleared before tests (#1016) 2022-08-26 10:31:27 -07:00