Commit graph

539 commits

Author SHA1 Message Date
JonnyWong16
3107e25a0e
Fix searching and browsing Discover results (#970)
* Fix discover search results

* Plex API response changed to separate "Free on Demand" and "More Ways To Watch"

* Add test for searchDiscover

* Manually set watchlist and discover result to online metadata objects

* Replace all key format ratingKey with key

* Add libtype argument to searchDiscover

* Update tests for searchDiscover libtype

* Add includeUserState=1 parameter to Discover results details key

* Add method to return UserState object
2022-07-20 19:37:48 -07:00
JonnyWong16
117af58897
Add guids attribute to Artist, Album, and Track (#968)
* Add guids attribute to Artist, Album, and Track

* PMS 1.27.0.5897 adds `<Guid>` tags with MusicBrainz ID to artists, albums, and tracks.

https://forums.plex.tv/t/plex-media-server-forum-preview-for-music-metadata/785088
https://forums.plex.tv/t/plex-media-server/30447/510

* Update audio guid tests
2022-07-20 19:35:46 -07:00
JonnyWong16
caca24f10f
Add MediaPartStream.languageTag attribute (#959)
* Add `MediaPartStream.languageTag` attribute

* Add `languageTag` to tests
2022-07-20 19:06:06 -07:00
JonnyWong16
ae78557931
Fix show studio test (#979) 2022-07-20 17:00:55 -07:00
JonnyWong16
f361b29973
Fix movie year test (#967) 2022-06-20 09:01:27 -07:00
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