From d9be0e6f062f33d21434222e79ff1557a6cc4d13 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Fri, 19 Apr 2024 11:18:25 -0700 Subject: [PATCH] Revert "`addToWatchlist` raise `NotFound` exception for invalid media (#1401)" (#1402) This reverts commit bf925c60e1673a8a49d6d00f76df5cbfb2e49735. --- plexapi/myplex.py | 4 +--- tests/test_myplex.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/plexapi/myplex.py b/plexapi/myplex.py index bc136a9e..8d697924 100644 --- a/plexapi/myplex.py +++ b/plexapi/myplex.py @@ -963,9 +963,7 @@ class MyPlexAccount(PlexObject): objects to be added to the watchlist. Raises: - :exc:`~plexapi.exceptions.BadRequest`: When trying to add existing - media to the watchlist. - :exc:`~plexapi.exceptions.NotFound`: When trying to add invalid + :exc:`~plexapi.exceptions.BadRequest`: When trying to add invalid or existing media to the watchlist. """ if not isinstance(items, list): diff --git a/tests/test_myplex.py b/tests/test_myplex.py index 9e07d611..aac4e84b 100644 --- a/tests/test_myplex.py +++ b/tests/test_myplex.py @@ -310,7 +310,7 @@ def test_myplex_watchlist(account, movie, show, artist): account.removeFromWatchlist(movie) # Test adding invalid item to watchlist - with pytest.raises(NotFound): + with pytest.raises(BadRequest): account.addToWatchlist(artist)