mirror of
https://github.com/pacnpal/Pac-cogs.git
synced 2025-12-20 10:51:05 -05:00
Created a new constants.py file to store the REACTIONS dictionary
Updated all files to import REACTIONS from constants.py instead of reactions.py: queue_processor.py message_handler.py reactions.py (now only contains reaction handling functions) events.py (now imports REACTIONS from constants.py and handle_archived_reaction from reactions.py) core.py queue_handler.py processor/init.py
This commit is contained in:
@@ -1,40 +1,45 @@
|
||||
"""Video processing module for VideoArchiver"""
|
||||
|
||||
from .core import VideoProcessor
|
||||
from .reactions import REACTIONS
|
||||
from .constants import REACTIONS
|
||||
from .progress_tracker import ProgressTracker
|
||||
from .message_handler import MessageHandler
|
||||
from .queue_handler import QueueHandler
|
||||
|
||||
# Export public classes and constants
|
||||
__all__ = [
|
||||
'VideoProcessor',
|
||||
'REACTIONS',
|
||||
'ProgressTracker',
|
||||
'MessageHandler',
|
||||
'QueueHandler'
|
||||
"VideoProcessor",
|
||||
"REACTIONS",
|
||||
"ProgressTracker",
|
||||
"MessageHandler",
|
||||
"QueueHandler",
|
||||
]
|
||||
|
||||
# Create a shared progress tracker instance for module-level access
|
||||
progress_tracker = ProgressTracker()
|
||||
|
||||
|
||||
# Export progress tracking functions that wrap the instance methods
|
||||
def update_download_progress(url, progress_data):
|
||||
"""Update download progress for a specific URL"""
|
||||
progress_tracker.update_download_progress(url, progress_data)
|
||||
|
||||
|
||||
def complete_download(url):
|
||||
"""Mark a download as complete"""
|
||||
progress_tracker.complete_download(url)
|
||||
|
||||
|
||||
def increment_download_retries(url):
|
||||
"""Increment retry count for a download"""
|
||||
progress_tracker.increment_download_retries(url)
|
||||
|
||||
|
||||
def get_download_progress(url=None):
|
||||
"""Get download progress for a specific URL or all downloads"""
|
||||
return progress_tracker.get_download_progress(url)
|
||||
|
||||
|
||||
def get_active_operations():
|
||||
"""Get all active operations"""
|
||||
return progress_tracker.get_active_operations()
|
||||
|
||||
Reference in New Issue
Block a user