Fixed version of spotify_dl

This commit is contained in:
2023-06-06 11:35:39 +02:00
parent 48f49d59e0
commit 6bc77f3720
7 changed files with 913 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
import signal
import sys
def signal_handler(sig, frame):
# Signal handler to handle SIGINT, usually when Ctrl+C is pressed.. or if SIGINT is sent.
# Thanks to https://stackoverflow.com/a/1112350/92837
print("\nCaught interrupt(did you press Ctrl+C?), stopping spotify_dl")
sys.exit(0)
signal.signal(signal.SIGINT, signal_handler)