diff --git a/plexorcist.py b/plexorcist.py index 86b6a0a..fccd9f5 100755 --- a/plexorcist.py +++ b/plexorcist.py @@ -228,10 +228,10 @@ def handle_videos(self, response): if videos and len(videos) > 0: # Filter watched videos - watched_videos = self.filter_videos(videos=videos) + watched_videos = self.filter_videos(videos) # Delete watched videos and send notification - self.delete_videos(watched_videos=watched_videos, media_type=media_type) + self.delete_videos(watched_videos, media_type) def filter_videos(self, videos): """Filter videos""" diff --git a/test_plexorcist.py b/test_plexorcist.py index 16e774f..89408c7 100644 --- a/test_plexorcist.py +++ b/test_plexorcist.py @@ -45,7 +45,19 @@ def test_delete_videos(self, mock_make_request): # Test delete_videos method plexorcist = Plexorcist() - plexorcist.config = {"whitelist": ["Whitelisted Title"]} + plexorcist.config = { + "plex_base": "http://example.com", + "plex_token": "token", + "ifttt_webhook": "", + "i18n": { + "removed": "Removed {0} videos, reclaimed {1} GB", + "notification": "Notification sent", + "ifttt_error": "IFTTT webhook error", + }, + "whitelist": ["Whitelisted Title"], + } + plexorcist.pushbullet = MagicMock() + watched_videos = [ { "@title": "Title",