Commit graph

584 commits

Author SHA1 Message Date
JonnyWong16
fba0dbccf2
Add support for watchlists and streaming services (#922)
* Remove Plex news

* Replace requests with query method for online hubs

* Add myPlexAccount watchlist methods

* Add mixin for objects that can be added to watchlist

* Add tests for watchlist

* Always split ratingKey from guid for watchlist

* Add method to retrieve streaming service availability

* Add test for streaming service availability

* Add filtering and sorting for watchlists

* Fix watchlist tests

* Add method to check if an item is on a user's watchlist

* Update watchlist tests

* Make account optional for WatchlistMixin

* Add Discover search

* Use manuallyLoadXML method for Discover search results

* Remove webshows and podcasts

* Fix WatchlistMixin account AttributeError

* Add BadRequest exception when adding to/removing from watchlist

* Update watchlist tests for BadRequest

* Update watchlist doc strings
2022-05-18 11:04:18 -07:00
JonnyWong16
8303d6fa2c
Allow disabling auto-reloading when accessing missing attributes (#935)
* Rename _autoReload to _overwriteNone

* Allow disabling auto reloading

* Update test for disabling auto reloading

* Change autoReload to private attribute
2022-05-16 20:03:06 -07:00
JonnyWong16
6fc7d95266
Add support for Plex guid in LibrarySection.getGuid() (#926)
* Add support for Plex guid in `LibrarySection.getGuid()`

* Update getGuid test with Plex guid
2022-05-16 19:54:51 -07:00
JonnyWong16
2683655dcf
Get album track by track number without keyword argument (#918)
* Get album track by track number

* Update tests for `Album.track()`

* Also updates test for `Season.episode()`
2022-05-16 19:52:16 -07:00
JonnyWong16
153ef66df0
Add method to manually run butler tasks (#916)
* Add butler tasks

* Add tests for butler tasks
2022-05-16 19:51:39 -07:00
JonnyWong16
76caa1d95e
Fix episode writers test (#938) 2022-05-16 11:45:27 -07:00
JonnyWong16
26671ec0b1
Fix movie tagline test (#927) 2022-04-07 09:58:06 -07:00
JonnyWong16
d248f1418b
Fix test track ratingCount attribute (#898) 2022-03-17 14:57:25 -05:00
JonnyWong16
372e620d60
Add support for collection "filtering based on user" advanced setting (#894)
* Add collectionFilterBasedOnUser attribute

* Add filterUserUpdate method

* Check for smart collection for updateSort

* Update test collection filterUserUpdate
2022-02-26 22:50:04 -08:00
JonnyWong16
0cb8712896
Add missing Track.skipCount attribute (#893)
* Add track skipCount attribute

* Add track.skipCount to tests
2022-02-26 22:31:21 -08:00
JonnyWong16
87a7ec6ddf
Add Video.audioStreams() convenience method (#891)
* Add Video.audioStreams() convenience method

* Add test for Video.audioStreams()
2022-02-26 22:24:43 -08:00
JonnyWong16
870ba6664f
Refactor and cleanup tag methods (#875)
* Refactor tag functions into EditTagsMixin

* Fix test mixins tag use of _tagSingular

* Add kwargs to editTags

* Fix _tagSingular and _tagPlural if tag is already singular or plural

* Make editing tags chainable

* Add chaining example to doc string

* Update editTags doc string for batch editing
2022-02-26 21:50:48 -08:00
JonnyWong16
59638dc714
Add new methods to edit object fields (#876)
* Update Collection.edit() method

* Add new EditFieldMixin and subclasses

* Add EditFieldMixin to Plex objects

* Update PlexPartialObject.edit() doc string

* Cast Track parentIndex to int

* Add base _searchTypes property

* Add kwargs to editField

* Editing album title also requires the artist ratingKey

* Add tests for editing fields

* Deprecate Collection.edit()

* Make editing fields chainable

* Add chaining example to doc string

* Add batch editing mode

* Add test for batchEdits

* Clean up mixins imports

* Reorder mixins

* Fix tests for batch edit
2022-02-26 21:40:51 -08:00
JonnyWong16
a568819e1e
Add tests for theme mixin (#897)
* Add lockTheme and unlockTheme methods

* Change setTheme to raise NotImplementedError

* Add tests for theme mixins
2022-02-26 21:05:43 -08:00
ReenigneArcher
3917b335ca
Fix various typos (#880)
* Fix various typos

* Fix various typos in tests

* Fix typos in `tests`

* Fix more typos

* Fix hasScalingMatrix test

Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
2022-02-26 19:26:08 -08:00
meisnate12
2f101e3899
Add LabelMixin to Season, Episode, Artist, and Track objects (#872)
* Add LabelMixin to Episode class

* Add test_mixins.edit_label(episode) test

* Add Label Mixin to Season, Artist,and Track

* fix tests

* Load manual FilteringFields for labels

* Load manual FilteringFilters for labels

Co-authored-by: Elan Ruusamäe <glen@pld-linux.org>
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
2022-02-26 17:32:18 -08:00
JonnyWong16
158dd37e41
Fix language in library tests (#889)
* Fix language in library tests

* "Other Videos" library type uses `language="xn"`

* Log server version in bootstrap server
2022-02-19 17:16:37 -08:00
JonnyWong16
b89bd23652
Change MusicSection.stations() to return Playlist objects (#871)
* Fix library stations

* `LibrarySection.stations()` returns a list of `Playlist` station objects

* Add test for MusicSection stations
2022-01-23 20:40:04 -08:00
JonnyWong16
0620eb4bf0
Fix Agent object settings (#864)
* Fix mediaType argument for PlexServer.agents()

* Cleanup Agent and AgentMediaType attributes

* Add `DeprecationWarning` to `languageCode`

* Make Agent.settings() method public

* Add `DeprecationWarning` to `Agent._settings()`

* Fix parsing Setting.enumValues

* XML attribute for agent settings uses `values` instead of `enumValues`

* Add secure and option attributes to Setting

* Add test for server agents
2022-01-23 16:15:10 -08:00
JonnyWong16
d2c849fa5e
Improve getGuid method (#862)
* Improve getGuid method

* Update getGuid test
2022-01-23 16:13:30 -08:00
JonnyWong16
fcbea70549
Add methods to lock and unlock a field for all items in a library (#861)
* Add plex folder to .gitignore

* Add method to lock/unlock a field for all items in a library

* Add test to lock/unlock all posters in a library
2022-01-23 16:11:20 -08:00
blacktwin
07717186ee additional edit test with bad path 2022-01-05 22:54:03 -05:00
blacktwin
9302f0dea1 additional edit coverage 2022-01-05 22:53:41 -05:00
blacktwin
0f2029545c fix section call 2022-01-05 09:14:34 -05:00
blacktwin
050572d2ac remove isBrowseable(Path) check 2022-01-05 09:14:19 -05:00
blacktwin
c19fa9f2d0 removing testing with Path object 2022-01-05 09:04:00 -05:00
blacktwin
01ab5bddf0 add isBrowseable using path object 2022-01-04 22:51:34 -05:00
blacktwin
11ad27bf61 add edit kwargs test 2022-01-04 22:47:06 -05:00
blacktwin
26732f7c8d fix for movie_path 2022-01-03 17:11:34 -05:00
blacktwin
2f752d215e removeLocations with a Path object
addLocations with a Path object
2022-01-03 17:09:30 -05:00
blacktwin
d2c3fb1117 attempt to remove all locations 2022-01-03 17:02:12 -05:00
blacktwin
ebcadd2996 incorrect exception 2021-12-20 00:19:24 -05:00
blacktwin
5494c1e90d Change test to use Other Videos library type to prevent scanning
Tests:
 Create library with multiple paths with valid paths
 Create library with multiple paths with an invalid path
 Create library with no path
 Add path(s) to test library with an invalid path
 Remove path(s) to test library with an invalid path
 Remove path(s) to test library with valid paths
 Add path(s) to test library with valid paths
2021-12-20 00:12:51 -05:00
JonnyWong16
a9ffd1e738
Fix image mixins tests (#856)
* Unlock images after edit image test

* Enable playlist art mixins tests

* Mark all image mixins tests as xfail

* Changing images can fail randomly
2021-11-20 17:14:34 -08:00
JonnyWong16
a8136d2776
Change LibrarySection.reload() to reload in-place (#855)
* Fix LibrarySection reload in-place to mimic PlexObject reload

* Don't reload LibrarySection after edit

* Also mimics PlexObject.edit()

* Update library section edit test
2021-11-20 16:35:37 -08:00
JonnyWong16
8815cda444
Add totalDuration and totalStorage properties to LibrarySection (#851)
* Add LibrarySection properties totalDuration and totalStorage

* Add tests for LibrarySection totalDuration and totalStorage
2021-11-20 16:29:08 -08:00
JonnyWong16
777ea754be
Add methods for accepting and cancelling friend invites (#849)
* Add accepting and cancelling friend invites

* Add mocked tests for acceptInvite and cancelInvite

* Rename methods to pendingInvite
2021-11-20 16:16:01 -08:00
JonnyWong16
4e8a6133eb
Fix media delete (#848)
* Fix media delete

* Update media delete test
2021-11-20 16:02:34 -08:00
JonnyWong16
01131c95cf
Cleanup download methods (#847)
* Add utils.cleanFilename

* Refactor download methods

* Add option to download episodes, tracks, photos into subfolders

* Update download tests

* Test download keep_original_filename
2021-11-20 14:16:58 -08:00
JonnyWong16
34a42185ac
Update server transcodeImage method (#845)
* Update server transcodeImage method

* Update server transcodeImage tests
2021-11-20 13:53:00 -08:00
JonnyWong16
bf3f0c1392
Merge branch 'master' into feature/album_types 2021-10-04 14:13:39 -07:00
JonnyWong16
a3178f3ac3
Merge pull request #831 from JonnyWong16/feature/includeGuids
Automatically retrieve external guids from libraries using includeGuids
2021-10-04 13:56:11 -07:00
JonnyWong16
3fce24587d
Merge pull request #810 from JonnyWong16/feature/web_url
Add methods to retrieve the Plex Web URL
2021-10-04 12:38:24 -07:00
JonnyWong16
516c8ed02f
Update Plex Web URL tests 2021-09-26 15:23:35 -07:00
JonnyWong16
1efe0a908d
Update audio tests 2021-09-16 15:24:09 -07:00
JonnyWong16
046b2ec66d
Add test for getting and item using a guid 2021-09-15 15:47:21 -07:00
JonnyWong16
4d6cffdbd1
Add test for LibrarySection.all() returning guids 2021-09-15 15:38:54 -07:00
JonnyWong16
692a23586c
Add methods to lock and unlock artwork and posters (#825)
* Add private _edit method

* Add fields attribute to playlists

* Add lock and unlock methods to art, banner, and poster mixins

* Add tests for locking and unlocking art and posters
2021-09-12 19:56:21 -05:00
JonnyWong16
8a0b03c841
Merge branch 'master' into feature/web_url 2021-09-12 15:16:39 -07:00
JonnyWong16
3bebeaacd5
Add tests for Plex Web URLs 2021-08-25 18:10:11 -07:00
JonnyWong16
96a35dc379
Update Playlists test for posters 2021-08-25 18:10:02 -07:00
JonnyWong16
42260aa1b6
Add libtype argument for creating smart playlists (#799)
* Add libtype keyword argument for smart playlists

* Update docs, remove libtype collection from smart playlists/collections

* Cannot create a smart playlist or collection from other collections

* Update smart playlist filter test for libtype
2021-07-26 20:46:30 -05:00
JonnyWong16
6cacc4a55a
Add playlist title search and sorting (#782)
* Add title and sort arguments to server playlists method

* Raise NotFound when retrieving a playlist or collection

* Update tests for collection/playlist NotFound
2021-07-26 20:45:58 -05:00
JonnyWong16
2c540f69c8
Add producers, roles, and hasCommercialMarker to Episode objects (#797)
* Add producers and roles to Episode

* Add producers and roles to episode test

* Add hasCommercialMarker to Episode
2021-07-26 20:36:54 -05:00
JonnyWong16
456a8a53ab
Merge pull request #788 from JonnyWong16/feature/search_objects
Add ability to use FilterChoice and FilteringSort objects in library search
2021-07-16 09:21:55 -07:00
JonnyWong16
31de29d502
Merge pull request #783 from JonnyWong16/feature/custom_collection_order
Add ability to move items in a collection
2021-07-16 09:21:25 -07:00
JonnyWong16
82fa178952
Merge pull request #781 from JonnyWong16/feature/parse_smart_filter
Add ability to parse the smart filters from collections and playlists
2021-07-16 09:21:10 -07:00
JonnyWong16
b4314c1995
Add back custom sort to collection sort test authenticated only 2021-07-04 22:06:23 -07:00
JonnyWong16
b192e5eea9
Reset collection sort after move test to avoid corrupted XML 2021-07-04 21:45:34 -07:00
JonnyWong16
40c22711a6
Fix updateProgress and updateTimeline tests milliseconds 2021-07-04 21:32:58 -07:00
JonnyWong16
f7980e4a16
Update library search tests for FilterChoice and FilteringSort objects 2021-07-04 19:22:11 -07:00
JonnyWong16
ca0eb309c2
Update collection tests for moving items 2021-06-29 20:08:39 -07:00
JonnyWong16
663402ed74
Update tests 2021-06-18 15:26:24 -07:00
JonnyWong16
e51d8253f3
Add tests for smart collection/playlist filters 2021-06-18 14:34:53 -07:00
JonnyWong16
c111150666
Remove manual random sort test 2021-06-14 08:56:33 -07:00
JonnyWong16
b943bc61e5
Merge pull request #765 from JonnyWong16/feature/auto_reload
Allow overwriting attributes with None when manually reloading
2021-06-06 19:24:04 -07:00
JonnyWong16
c136c594ea
Mark online media sources tests with xfail
* Test account is missing online media sources?
2021-06-06 18:39:45 -07:00
JonnyWong16
8ef3d0ac35
Merge branch 'master' into feature/auto_reload 2021-06-06 18:05:08 -07:00
JonnyWong16
6405d226a4
Mark movies extras test only available for Plex Pass 2021-06-06 17:33:08 -07:00
JonnyWong16
0626334ed5
Add tests for movie augmentation, reviews, and extras 2021-06-06 17:23:49 -07:00
JonnyWong16
aaa902059f
Update account onlineMediaSources optOut test 2021-06-06 17:23:49 -07:00
JonnyWong16
fab55e1227
Merge branch 'master' into reviews_extras 2021-06-06 14:42:16 -07:00
JonnyWong16
2a514378d8
Update tests to use reload 2021-06-06 14:38:36 -07:00
JonnyWong16
f90698f69d
Merge pull request #764 from JonnyWong16/feature/rating_mixin
Add rating mixin
2021-06-06 14:32:57 -07:00
JonnyWong16
79fc578406
Fix createPlaylist and createCollection in sync tests 2021-06-06 14:19:57 -07:00
JonnyWong16
f39d9b78ad
Merge remote-tracking branch 'upstream/master' into bugfix/fix_tests 2021-06-06 14:18:26 -07:00
JonnyWong16
e965ebbbe6
Merge remote-tracking branch 'upstream/master' into feature/rating_mixin 2021-06-06 12:54:09 -07:00
JonnyWong16
ab7ed6dee6
Merge pull request #763 from JonnyWong16/feature/smart_playlists_collections
Fix smart playlists and add support for smart collections
2021-06-06 12:15:12 -07:00
JonnyWong16
eafdccaddc
Merge pull request #758 from JonnyWong16/feature/claim_server
Add method to claim and unclaim server
2021-06-06 12:14:46 -07:00
JonnyWong16
c31c5317b3
Update playlist tests for NotFound when removing or moving items 2021-06-02 09:27:35 -07:00
blacktwin
056b5cf342 flag onlineMediaSources required to be authenticated 2021-05-31 09:56:37 -04:00
JonnyWong16
dbd39abb65
pytest mark xfail show mixins image test 2021-05-30 18:31:31 -07:00
JonnyWong16
b269140943
Fix rating mixin tests 2021-05-30 16:22:54 -07:00
JonnyWong16
bd8cdb10b7 Update tests for ratings mixin 2021-05-30 15:49:45 -07:00
JonnyWong16
4458977988 Improve test coverage 2021-05-29 19:26:31 -07:00
JonnyWong16
7800e892ae
Add Playlist attrs test 2021-05-29 19:00:59 -07:00
JonnyWong16
6f2ef5c519
Fix collections and playlists tests 2021-05-29 18:05:42 -07:00
JonnyWong16
56abe38ef8
Add collection sync test 2021-05-29 16:57:43 -07:00
JonnyWong16
40e4413dde
Update collection tests 2021-05-29 16:57:42 -07:00
JonnyWong16
b19b469eb0
Update pytest fixtures 2021-05-29 16:57:42 -07:00
JonnyWong16
8cb2ea2f98
Update library collections and playlists tests 2021-05-29 16:57:41 -07:00
JonnyWong16
65db8c33f6
Add library search limit test 2021-05-29 16:57:40 -07:00
JonnyWong16
8397ab2145
Add test for library create playlist 2021-05-29 16:57:39 -07:00
JonnyWong16
b934228d8a
Update tests for retrieving playlists by type 2021-05-29 16:57:39 -07:00
JonnyWong16
82e71793b1
Update playlist tests 2021-05-29 16:57:38 -07:00
blacktwin
c0b6efc23c
Merge branch 'master' into reviews_extras 2021-05-24 07:21:34 -04:00
JonnyWong16
caafd14435
Update tests for library section recently added 2021-05-23 21:15:18 -07:00
JonnyWong16
598a6654ba Fix rating search test 2021-05-23 21:08:23 -07:00
JonnyWong16
c76b2d4027
Merge remote-tracking branch 'upstream/master' into feature/multi_sort 2021-05-23 20:39:08 -07:00
JonnyWong16
a9597a9008
Merge remote-tracking branch 'upstream/master' into feature/plex_tv 2021-05-23 19:12:38 -07:00