From 0684994850439bccb8c2a8f20df708a826d99654 Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Mon, 3 Mar 2025 09:31:37 +0100 Subject: ✨ Downloads can be now paused / resumed. Fixes #149 & 324 👷 Shutdown is handled more gracefully. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tidal_dl_ng/config.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tidal_dl_ng/config.py') 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() -- cgit v1.3.1