summaryrefslogtreecommitdiff
path: root/tidal_dl_ng/config.py
diff options
context:
space:
mode:
authorRobert Honz <exislow+github@gmail.com>2025-03-03 09:31:37 +0100
committerRobert Honz <exislow+github@gmail.com>2025-03-03 09:31:37 +0100
commit0684994850439bccb8c2a8f20df708a826d99654 (patch)
treef84b6aca398e9d071e57aa3846e7cb7fd5cefdd0 /tidal_dl_ng/config.py
parent2aff7c920e9cddcd66df08e0e9299a9375c249d3 (diff)
downloadtidal-dl-ng-0684994850439bccb8c2a8f20df708a826d99654.tar.gz
✨ Downloads can be now paused / resumed. Fixes #149 & 324
👷 Shutdown is handled more gracefully.
Diffstat (limited to 'tidal_dl_ng/config.py')
-rw-r--r--tidal_dl_ng/config.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tidal_dl_ng/config.py b/tidal_dl_ng/config.py
index c6fdaee..345bebd 100644
--- a/tidal_dl_ng/config.py
+++ b/tidal_dl_ng/config.py
@@ -4,6 +4,7 @@ import shutil
from collections.abc import Callable
from json import JSONDecodeError
from pathlib import Path
+from threading import Event
from typing import Any
import tidalapi
@@ -189,3 +190,11 @@ class Tidal(BaseConfig, metaclass=SingletonMeta):
del self.session
return True
+
+
+class HandlingApp(metaclass=SingletonMeta):
+ event_abort: Event = Event()
+ event_run: Event = Event()
+
+ def __init__(self):
+ self.event_run.set()