From 6805d1cbe62203522930f5d3976e90edf9948e06 Mon Sep 17 00:00:00 2001 From: Hellow <74311245+HeIIow2@users.noreply.github.com> Date: Mon, 6 May 2024 18:40:21 +0200 Subject: [PATCH] feat: allowed to append none to source collection --- development/actual_donwload.py | 4 ++-- music_kraken/objects/source.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/development/actual_donwload.py b/development/actual_donwload.py index 2c9a174..c821734 100644 --- a/development/actual_donwload.py +++ b/development/actual_donwload.py @@ -6,8 +6,8 @@ logging.getLogger().setLevel(logging.DEBUG) if __name__ == "__main__": commands = [ - "s: #a Crystal F", - "d: 20" + "s: #a Psychonaut 4", + "d: 0" ] diff --git a/music_kraken/objects/source.py b/music_kraken/objects/source.py index b7e483a..ff68d6a 100644 --- a/music_kraken/objects/source.py +++ b/music_kraken/objects/source.py @@ -122,6 +122,9 @@ class SourceCollection: yield from self._page_to_source_list[page] def append(self, source: Source): + if source is None: + return + existing_source = None for key in source.indexing_values: if key in self._indexed_sources: