Files
conjurer/spotify_dl/__init__.py
T
gitea 6c292a5678 Tag: 1.25
Intermediate commits (oldest → newest):
- New command added that sets logging level dymnamically
- of course fix needed
- Fix
- refactor: comment out unused AutoIndex import and related code
- Add auth to ytdlp
- Modified spotipy for auth
- Fixes after reinstall
- fixx
- Add musician fixes
- Fix in default config
- How to setup radio
2025-10-30 16:59:20 +01:00

15 lines
418 B
Python

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)
try:
signal.signal(signal.SIGINT, signal_handler)
except ValueError:
print("Exception in signal handler")