Commit graph

622 commits

Author SHA1 Message Date
JonnyWong16
88309546b1
Add image tags and movie/show logos (#1462)
* Add image tags

* Test image tags

* Add logo resources

* Ignore flake8 C901 for movie attr test
2024-11-16 14:52:49 -08:00
JonnyWong16
19582eb649
Add voice activity analysis (#1466)
* Add hasVoiceActivity attribute to Media

* Update tests for voice activity analysis

* Fix movie year test

* Add canAutoSync attribute to SubtitleStream
2024-09-22 11:51:57 -07:00
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
bbe3e8e49f
Improve reload performance (#1451)
* Change default includes to false

* Update isFullObject() check

* Fix checkFiles in tests
2024-08-17 14:00:22 -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
JonnyWong16
4f6723c072
Increase on-demand subtitles test timeout (#1405) 2024-04-22 21:29:31 -07:00
JonnyWong16
7f589c24dd
Test for NotFound exception when adding to watchlist (#1403) 2024-04-19 12:56:28 -07:00
Dr.Blank
25fa930c61
Fix: Bug introduced in #1373 list has not attr tag (#1396)
* regression test for https://github.com/Taxel/PlexTraktSync/discussions/1901

* bugfix https://github.com/Taxel/PlexTraktSync/discussions/1901
2024-04-19 12:42:16 -07:00
JonnyWong16
d9be0e6f06
Revert "addToWatchlist raise NotFound exception for invalid media (#1401)" (#1402)
This reverts commit bf925c60e1.
2024-04-19 11:18:25 -07:00
Touchstone64
3e752d5f27
Fix: stop maxresults from overwriting previous results #1393 (#1394)
* Fix: stop maxresults from overwriting previous results

* Added test for use of maxresults in fetchItems #1393

* Removed the need for last_container_size #1393

* Renamed collections to better represen what is being tested

* Renamed collections to better represent what is being tested #1393

* Update tests/test_library.py with cleaner test

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

---------

Co-authored-by: Graham Thompson <graham.c.thompson@gmail.com>
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
2024-04-19 10:57:54 -07:00
JonnyWong16
bf925c60e1
addToWatchlist raise NotFound exception for invalid media (#1401) 2024-04-19 10:52:19 -07:00
JonnyWong16
f5126a7ff1
Fix library timeline test (#1400) 2024-04-19 10:38:26 -07:00
Dr.Blank
b836d24226
MediaContainer class is now a list (#1373)
* MediaContainer class is now a list

- can now support totalSize as returned from server

* add tests for media container

* Update MediaContainer attributes if previously None when extending
2024-03-31 15:48:24 -07:00
blacktwin
5b5d4c66ab
Fix Library.add() method to properly apply advanced settings (#1384)
* Fixing how advanced settings params are set and adding a prefix & when appending advanced settings. Update parts append to use f-string

* Adding basic test to include Advanced settings.

* lint fix

* fix failing test

* lint fix in test

* Update test_library.py

Add section deletion after testing
2024-03-31 15:40:17 -07:00
JonnyWong16
642ba8ba12
Allow exclude parameters in reload kwargs (#1378)
* Allow exclude parameters in reload

* Add test for reload kwargs
2024-03-16 15:18:14 -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
da033aa7d0
Update history tests (#1374)
* Update history tests

* Update episode directors attribute test
2024-03-15 20:21:23 -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
JonnyWong16
b831aaeb48
Add slug attributes to Movie, Show, Season, and Episode (#1317)
* Add slug attributes to videos

* Add tests for slug attributes
2024-02-17 14:10:45 -08:00
JonnyWong16
6e4ef6bae6
Update history tests (#1366) 2024-02-17 14:05:34 -08:00
JonnyWong16
e161ce69d9
Fix no timeout argument for gdm.scan() (#1356) 2024-02-04 20:34:39 -08:00
JonnyWong16
a85291e933
Add convenience method to return filter choice items (#1353)
* Add convenience method to return filter choice items

* Add test for filter choice items
2024-02-04 20:34:29 -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
e3d90a5945
Simplify building MediaPartStream objects (#1328)
* Simplify MediaPart._buildStreams

* Remove isChildOf check for photo and track attributes

* Add parent object when automatically building PlexObject

* Remove check of track only attribute in tests
2024-02-04 10:52:19 -08:00
JonnyWong16
d4426dab86
Add support for on-demand subtitles (#1305)
* Add support for on-demand subtitle search

* Clean up uploadSubtitles and removeSubtitles methods

* Add test for on-demand subtitles

Account is required for on-demand subtitles

* Add hearingImpaired and perfectMatch to SubtitleStream attributes

* Update subtitle score doc string

The score is the OpenSubtitles download count

Ref: https://forums.plex.tv/t/subtitle-search-update-opensubtitles/862746
2023-12-22 13:13:04 -08:00
JonnyWong16
ca13bcaf45
Remove DeprecationWarning for watched methods (#1306)
* Remove deprecation warnings for watched

* Test alias watched methods
2023-12-22 12:48: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
ReenigneArcher
e0a425fdcb
feat: add PlexPartialObject.isLocked method (#1293)
Co-authored-by: JonnyWong16 <9099342+jonnywong16@users.noreply.github.com>
2023-11-13 10:56: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
JonnyWong16
556b4b3da4
Use edit mixins for Playlists (#1284)
* Use mixins to edit playlists

* Add titleSort attribute to Playlists

* Update Playlists edit tests

* Fix deprecation warning stacklevel

* Fix edit title for m3u playlist
2023-11-13 10:29:03 -08:00
Dr.Blank
56a8df659d
Update algorithm for parsing smart filters (#1276)
* Fix minor typo

* Update algorithm for parsing  #1274

* Match style guide of the module

* Fix Edge Cases

- `and` is now considered the default operation instead of raising error
- fix algorithm so that the reserved keys are parsed in the filters dictionary instead of filters group when located later in the feed.
- removed some code repetition

* Join multiple filters by default

If multiple filter groups are parsed they are joined by `and` instead of raising error.

* fix `==` operator parsing

transfers "=" from the value to key

* fix typehinting

* Add new test for smart Filters

this test would fail on old algorithm despite it being logically the exact same filter.

* add test for deeply nested filters

* combine filters test for playlist

* combine filters test for collections

* fix typo

* add test to check parsed fitlers as it is

* edited test to be independent of the server

* Apply suggestions from code review

adhere to style guide of the project

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

---------

Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>
2023-11-05 16:23:57 -08:00
JonnyWong16
253949c1fe
Add MyPlexAccount.ping() to refresh authentication token (#1271)
* Add `MyPlexAccount.ping()` to refresh auth token

* Test account ping
2023-11-02 21:24:46 -07:00
Anagh Kumar Baranwal
7ff9e7b0d5
Remove reload after saving the batch-edits so the user can handle it themselves, if required. (#1247)
Signed-off-by: Anagh Kumar Baranwal <6824881+darthShadow@users.noreply.github.com>
2023-09-17 16:01:15 -07:00
Elan Ruusamäe
e466af58ee
test_audio: Add missing assert (#1245) 2023-09-17 15:36:45 -07:00
ReenigneArcher
a6b6ebfbff
style: lint all python files (#1228) 2023-08-28 20:29:39 -07:00
ReenigneArcher
dba3369f55
docs: add Windows make file (#1222) 2023-08-28 09:41:11 -07:00
ReenigneArcher
b783a56edc
Tests skip additional tests that require plex pass (#1227)
* tests: skip additional tests that require Plex Pass

* tests(test_myplex_users): check if first user has access to any server

* tests(fixture): adjust plex pass required skip message
2023-08-27 14:24:54 -07:00
JonnyWong16
b98b6050fe
Add properties to return the Plex Media Server data metadata paths (#1207)
* Add property to return the Plex Media Server data metadata path

* Add property to return the filepath for a resource

* Add tests for metadataDirectory and resourceFilepath
2023-08-27 12:59:53 -07:00
JonnyWong16
0679816201
Rename "setDefault" to "setSelected" for media streams (#1206)
* Rename "setDefault" to "setSelected"

* Update tests for setSelected subtitle stream
2023-08-27 12:41:37 -07:00
JonnyWong16
f67f4f7c2c
Add methods to retrieve public IP and geolocation (#1205)
* Add methods to retrieve public IP and geolocate

* Add test for geoip
2023-08-27 12:34:52 -07:00
JonnyWong16
6471582c92
Add method to retrieve Plex server identity (#1204)
* Add server identity

* Add test for server identity
2023-08-27 12:06:40 -07:00
JonnyWong16
35008908fc
Improve parsing to datetime and add error handling (#1203)
* Improve parsing to datetime and add error handling

* Fix utils.millisecondToHumanstr for days and negatives

* Update tests for millisecondToHumanstr
2023-08-27 12:06:07 -07:00
JonnyWong16
c5108b1115
Add score and tagKey attribute to hub search results (#1186)
* Add `score` and `tagKey` attribute to hub search results

* Update tests for hub search result `score` and `tagKey` attributes
2023-07-27 18:08:46 -07:00
JonnyWong16
8298a61b64
Add search kwargs to LibrarySection.get() (#1191)
* Optimize methods to use library get/search

* Revert methods

* Fix reloading of episodes for missing parentRatingKey

* Add tests for LibrarySection.get with kwargs
2023-07-27 18:02:23 -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
4f4f60a584
Fix movie edition tests (#1196) 2023-07-27 17:44:09 -07:00