From 4f9261505e5069448764db38d29d414c45bccc02 Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Tue, 7 May 2024 13:59:29 +0200 Subject: [PATCH] fix: skip insterval works --- music_kraken/pages/abstract.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/music_kraken/pages/abstract.py b/music_kraken/pages/abstract.py index 365fe02..080f310 100644 --- a/music_kraken/pages/abstract.py +++ b/music_kraken/pages/abstract.py @@ -403,19 +403,20 @@ class Page: self.LOGGER.info(f"{song.option_string} already exists, thus not downloading again.") return r - source = None + skip_intervals = [] if not found_on_disc: for source in sources: r = self.download_song_to_target(source=source, target=temp_target, desc=song.option_string) if not r.is_fatal_error: + skip_intervals = self.get_skip_intervals(song, source) break if temp_target.exists: r.merge(self._post_process_targets( song=song, temp_target=temp_target, - interval_list=[] if found_on_disc else self.get_skip_intervals(song, source) + interval_list=skip_intervals, )) return r