Commit graph

92 commits

Author SHA1 Message Date
JonnyWong16
add406bcd4
Fix artist ultraBlurColors test (#1458) 2024-08-18 13:00:48 -07:00
JonnyWong16
1a0eb3cb9a
Add UltraBlurColors objects (#1454)
* Add UltraBlurColors

* Test UltraBlurColors

* Test UltraBlurColors attributes

* Fix tests
2024-08-18 12:25:18 -07:00
JonnyWong16
075e7d7e12
Add support for artist popular tracks (#1453)
* Add artist popular tracks

* Test artist popular tracks
2024-08-17 14:26:11 -07:00
JonnyWong16
2142514955
Add support for editing audience ratings and critic ratings (#1417)
* Add support for editing audience ratings and critic ratings

* Note: Not all types of ratings are supported/shown in the Plex UIs. However they can be edited/updated and stored in the Plex Media Server database.

* Add tests for editing audience rating and critic rating
2024-05-18 12:16:49 -07:00
Dr.Blank
7802b79d30
feat: Add sonicAdventure method to MusicSection (#1361)
* Add sonicAdventure method to MusicSection

* satisfy flake8

* sonicAdventure accepts Track as param

* test with both types for sonicAdventure

* Add authentication to recently added music test

* Fix test_library.py to include missing newline character

* Add sonicAdventure method to Track class

* fix doc as suggested

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

* fix bound on sonicAdventure method

- add type to docstr

* Apply suggestions from code review

- pass in plexpass account to tests

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

* make tests pass on bootstrap

- still asserts it is an iterable
- still checks all elements are tracks
- in case no adventure found, does not fail

---------

Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
2024-03-16 15:03:36 -07:00
JonnyWong16
284a5773e3
Add genres attribute to Track (#1318)
* Add genres attribute to Track

* Test track genres

* Add GenreMixin to Tracks

* Add test for editing track genre
2024-02-17 14:11:07 -08:00
Dr.Blank
fe648f6382
bugfix: pass existing filters for albums method of Artist (#1347)
* bugfix: pass existing filters for `albums` method of `Artist`

* add test for bugfix
2024-02-04 11:23:56 -08:00
JonnyWong16
f7522afd6b
Add lyricStreams() convenience method (#1303)
* Move videoStreams, audioStreams, lyricStreams to Playable

* Add lyricStreams to Playable

* Simplify returning list of streams

* Add test for track.lyricStreams()
2023-12-22 12:33:27 -08:00
ReenigneArcher
0708821566
test: fix test_audio_Audio_sonicallySimilar authenticated test (#1298)
* test: fix test_audio_Audio_sonicallySimilar authenticated test

* Update tests/test_audio.py

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

---------

Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
2023-11-14 16:15:30 -08:00
Dr.Blank
9e8fcb5fa6
Add sonicallySimilar method to Audio class (#1288)
* Add sonicallySimilar method to Audio class

closes #1183

* Add type hinting for method

- fixes import error

* Apply review suggestions

Co-Authors @JonnyWong16

* Add optional parameters to sonicallySimilar method

- makes it so that params can be None and use the server default

* add test for `sonicallySimilar`

* Refactor test to check type of elements

* Apply suggestions

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

* Add authentication to sonicallySimilar test in
test_audio.py

* fix flake8

---------

Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
2023-11-13 10:47:48 -08:00
ReenigneArcher
799e5c690b
tests: improve audio tests (#1294) 2023-11-13 10:35:36 -08:00
Elan Ruusamäe
e466af58ee
test_audio: Add missing assert (#1245) 2023-09-17 15:36:45 -07:00
JonnyWong16
58e279b837
Create separate PlexHistory objects (#1185)
* Create new PlexHistory object

* Add test for PlexHistory object
2023-07-27 17:45:51 -07:00
JonnyWong16
9ede493f4c
Add LibrarySection methods to multi-edit items (#1184)
* Use generator for string join

* Group media type edit mixins

* Add UserRatingMixin

* Add LibrarySection methods to multi-edit items

* Remove deprecated banners

* Factor out resource lock/unlock mixins

* Update `fetchItems` to accept list of rating keys

* Add repr and helper methods to Common object

* Update tests
2023-07-27 14:45:23 -07:00
JonnyWong16
3c64bdb11c
Add support for editing addedAt field (#1107)
* Add AddedAtMixin

* Add tests for AddedAtMixin
2023-03-09 15:22:56 -08:00
JonnyWong16
925f573ced
Create separate PlexSession objects (#931)
* Add base findItem method

* Create new PlexSession objects

* PlexSession objects are unique from their base media objects. These objects are built from `/status/sessions` instead of `/library/metadata/<ratingKey>`. This allows reloading data from sessions without overwriting them.

* Add some media and client attributes for sessions

* Add separater property to return the PlexSession user object

* This speeds up building the `PlexSession` object since it doesn't need to lookup the user.
* The user object is also cached for future lookups.

* Remove PlexSession attributes from tests

* Never auto reload a PlexSession object

* Rename PlexSession.usernames for backwards compatibility

Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>

* Don't cache myPlexAccount in PlexSession

* Move session stop method to PlexSession

Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2022-07-20 20:03:20 -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
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
d248f1418b
Fix test track ratingCount attribute (#898) 2022-03-17 14:57:25 -05: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
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
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
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
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
bf3f0c1392
Merge branch 'master' into feature/album_types 2021-10-04 14:13:39 -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
1efe0a908d
Update audio tests 2021-09-16 15:24:09 -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
3bebeaacd5
Add tests for Plex Web URLs 2021-08-25 18:10:11 -07:00
JonnyWong16
bd8cdb10b7 Update tests for ratings mixin 2021-05-30 15:49:45 -07:00
JonnyWong16
c76b2d4027
Merge remote-tracking branch 'upstream/master' into feature/multi_sort 2021-05-23 20:39:08 -07:00
JonnyWong16
c4522d9c6b
Merge pull request #746 from JonnyWong16/feature/properties
Add episodeNumber, trackNumber, and hasPreviewThumbnails helper properties
2021-05-23 19:02:20 -07:00
JonnyWong16
85e58feb33
Update tests for lastRatedAt 2021-05-15 22:38:54 -07:00
JonnyWong16
ac7becd27f
Add tests for episodeNumber and trackNumber properties 2021-05-10 18:13:31 -07:00
JonnyWong16
71e7ee2660
Add tests for media tags 2021-05-09 20:03:12 -07:00
JonnyWong16
e877b0039b
Add tests for Season, Episode, and Track collection tags 2021-05-09 12:27:38 -07:00
meisnate12
5584ef1d4f
Added AdvancedSettingsMixin (#714)
* Added AdvancedSettingsMixin

* forgot import

* shortened line

* remove whitespace

* removed unused import

* reordered mixins

* Add preference method to AdvancedSettingsMixin

* Add tests for AdvancedSettingsMixin

Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
2021-04-05 15:44:49 -05:00
JonnyWong16
c15133da88
Adds Movie and Artist advanced setting attributes (#680)
* Add advanced setting attributes to movie

* Add advanced setting attributes to artist

* Update tests for movie advanced setting attributes

* Update tests for artist advanced setting attributes

* Fix artist albumSort attribute
2021-03-11 11:20:28 -06:00
JonnyWong16
88dbee7508
Fix flake8 2021-02-14 22:41:17 -08:00
JonnyWong16
9fde559147
Remove redundant audio tests 2021-02-14 21:20:27 -08:00
JonnyWong16
c537db61cf
Factor out mixins image url tests 2021-02-14 21:19:42 -08:00
JonnyWong16
8915134b6b
Fix typo in track test 2021-02-14 19:11:53 -08:00
JonnyWong16
8478ae6e62
Add banner url to show tests 2021-02-14 19:03:19 -08:00
JonnyWong16
bbafaee1cf
Update art and thumb tests 2021-02-14 17:10:11 -08:00
JonnyWong16
427d90bd3b
Add mixins tests for all objects with art and posters 2021-02-14 15:59:57 -08:00
JonnyWong16
c23d9635f5
Rename to mixins 2021-01-24 15:03:23 -08:00
JonnyWong16
deda4e1b2b
Add mixin tag tests 2021-01-24 14:40:39 -08:00
blacktwin
4f0910ab79
Update to MediaPartStream and inheriting classes (#590)
* moving common child (VideoStream, AudioStream, SubtitleStream) attributes to the parent (MediaPartStream)

* removal of no longer present attribs in video, audio, subtitle streams

* additional attribs to video and mediapart streams

* removal of previously unique subtitleStream attribs. attribs are now common or no longer present.

* docstring cleanup of video, audio, and subtitle stream; pass 1

* remove codecID checks as this attribute is now longer used.

* adding key attrib to parent MediaPartStream.

* add transient to SubtitleStream, found in uploaded subtitles

* removing dialogNorm related assertion as this attrib has been removed.

* update Media class based on PR comments
optimizedVersion to be added, need SEARCHTYPES

* update MediaPartStream class based on PR comments

* update VideoStream class based on PR comments

* update AudioStream class based on PR comments

* update SubtitleStream class based on PR comments

* add LyricStream class based on PR comments

* add streamType int and LyricStream to MediaPartStream.parse method

* add MediaPart.lyricStreams method

* spelling correction

* more movement based on PR comments

* alpha ordering MediaPart

* alpha sort VideoStream

* docstring corrections

* remove assert stream.dialogNorm from audio test as dialogNorm has been removed.

* adding LyricStream to _buildStreams function

* adding changes from @johnnywong16
e346f0b4dc

* moving unused imports down and together

* Address docstring review comments

* Change isChildOf for any kwargs

* Add Media.isOptimizedVersion property

* Add photo and track specific attributes

* Remove dead MediaPartStream.parse method

* Update media doc strings

* Add optimized version doc string

* Cast video stream codedHeight and codedWidth to int

* Add required bandwidths to streams

* Update video tests

* Update audio tests

* Fix video tests

* Fix video tests

* Fix video tests

Co-authored-by: Jason Lawrence <jjlawren@users.noreply.github.com>
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
2021-01-24 15:21:56 -05:00
JonnyWong16
33b725d8d4
Update tests 2020-12-23 23:03:08 -08:00