Skip to content

Commit fe648f6

Browse files
authored
bugfix: pass existing filters for albums method of Artist (#1347)
* bugfix: pass existing filters for `albums` method of `Artist` * add test for bugfix
1 parent ba384e0 commit fe648f6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

plexapi/audio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def albums(self, **kwargs):
227227
""" Returns a list of :class:`~plexapi.audio.Album` objects by the artist. """
228228
return self.section().search(
229229
libtype='album',
230-
filters={'artist.id': self.ratingKey},
230+
filters={**kwargs.pop('filters', {}), 'artist.id': self.ratingKey},
231231
**kwargs
232232
)
233233

tests/test_audio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def test_audio_Artist_album(artist):
7878

7979

8080
def test_audio_Artist_albums(artist):
81-
albums = artist.albums()
81+
albums = artist.albums(filters={})
8282
assert len(albums) == 1 and albums[0].title == "Layers"
8383

8484

0 commit comments

Comments
 (0)