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. """ """ Returns a list of :class:`~plexapi.audio.Album` objects by the artist. """
return self.section().search( return self.section().search(
libtype='album', libtype='album',
filters={'artist.id': self.ratingKey}, filters={**kwargs.pop('filters', {}), 'artist.id': self.ratingKey},
**kwargs **kwargs
) )

View file

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