bugfix: pass existing filters for albums method of Artist (#1347)

* bugfix: pass existing filters for `albums` method of `Artist`

* add test for bugfix
This commit is contained in:
Dr.Blank 2024-02-04 14:23:56 -05:00 committed by GitHub
parent ba384e0be5
commit fe648f6382
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -227,7 +227,7 @@ class Artist(
""" Returns a list of :class:`~plexapi.audio.Album` objects by the artist. """
return self.section().search(
libtype='album',
filters={'artist.id': self.ratingKey},
filters={**kwargs.pop('filters', {}), 'artist.id': self.ratingKey},
**kwargs
)

View file

@ -78,7 +78,7 @@ def test_audio_Artist_album(artist):
def test_audio_Artist_albums(artist):
albums = artist.albums()
albums = artist.albums(filters={})
assert len(albums) == 1 and albums[0].title == "Layers"