From 9ff94944e1f8e98e5b1071e41916a862e55aa921 Mon Sep 17 00:00:00 2001 From: Robert Goldmann <deadlocker@gmx.de> Date: Sun, 14 Jan 2024 00:31:39 +0100 Subject: [PATCH] SpotifyRecorder: remove wav file on success --- SpotifyRecorder.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SpotifyRecorder.py b/SpotifyRecorder.py index f3f35b0..d1d9bdb 100644 --- a/SpotifyRecorder.py +++ b/SpotifyRecorder.py @@ -127,6 +127,9 @@ class SpotifyRecorder: artist=self.__join_artists(track), album=track['track']['album']['name']) + LOGGER.debug(f'\t\tRemoving wav file "{filePathWav}"') + os.remove(filePathWav) + recordedTrackNumbers.append(indexInPlaylist) except Exception as e: LOGGER.error(f'An error occurred while recording track "{track["track"]["name"]}"', exc_info=e) -- GitLab