Merge pull request #3887 from wisp3rwind/fix_item_keys

when iterating over item keys, do not return duplicates
This commit is contained in:
Benedikt 2021-03-18 18:01:34 +01:00 committed by GitHub
commit 0061229023
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -623,7 +623,9 @@ class Item(LibModel):
"""
keys = super(Item, self).keys(computed=computed)
if with_album and self._cached_album:
keys += self._cached_album.keys(computed=computed)
keys = set(keys)
keys.update(self._cached_album.keys(computed=computed))
keys = list(keys)
return keys
def get(self, key, default=None, with_album=True):