removed cancel request
This commit is contained in:
@@ -4,29 +4,17 @@ from typing import Any, Callable, Dict, List, Optional
|
||||
|
||||
class Loader(ABC):
|
||||
"""Abstract base class for anime data loaders/providers."""
|
||||
|
||||
@abstractmethod
|
||||
def request_cancel(self) -> None:
|
||||
"""Request cancellation of any ongoing download.
|
||||
|
||||
Sets an internal flag that downloads should check periodically
|
||||
and abort if set. This enables graceful shutdown.
|
||||
def subscribe_download_progress(self, handler):
|
||||
"""Subscribe a handler to the download_progress event.
|
||||
Args:
|
||||
handler: Callable to be called with progress dict.
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def reset_cancel(self) -> None:
|
||||
"""Reset the cancellation flag.
|
||||
|
||||
Should be called before starting a new download to ensure
|
||||
it's not immediately cancelled.
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
def is_cancelled(self) -> bool:
|
||||
"""Check if cancellation has been requested.
|
||||
|
||||
Returns:
|
||||
bool: True if cancellation was requested
|
||||
def unsubscribe_download_progress(self, handler):
|
||||
"""Unsubscribe a handler from the download_progress event.
|
||||
Args:
|
||||
handler: Callable previously subscribed.
|
||||
"""
|
||||
|
||||
@abstractmethod
|
||||
|
||||
Reference in New Issue
Block a user