Commit Graph

16 Commits

Author SHA1 Message Date
pacnpal
df9099f2c8 diabolical 2024-11-18 05:17:37 +00:00
pacnpal
fc06e54d8a fixed imports again 2024-11-18 01:21:40 +00:00
pacnpal
d03e8dc8e8 ch ch ch changes 2024-11-18 01:01:12 +00:00
pacnpal
1ddc4002fa fix(processor): add fallback to absolute imports in message_handler 2024-11-17 21:58:25 +00:00
pacnpal
b8f29341ce fixes 2024-11-17 21:33:12 +00:00
pacnpal
439cf5ff07 Using TYPE_CHECKING for type hints
Moving runtime imports to appropriate locations
Using string literal type annotations
Importing shared utilities through the utils package
2024-11-17 21:24:49 +00:00
pacnpal
e997c6f6b9 Created a proper dependency hierarchy:
core/types.py - Contains shared interfaces and types
queue/types.py - Contains queue-specific types
Components now depend on interfaces rather than concrete implementations
Broke cyclic dependencies:

Removed direct imports between queue_processor.py and manager.py
Removed circular dependencies between core and processor modules
Components now communicate through well-defined interfaces
Improved architecture:

Clear separation of concerns
Better dependency management
More maintainable and testable code
Proper use of dependency injection
2024-11-17 21:11:00 +00:00
pacnpal
97dd6d72f2 loads of import fixes 2024-11-17 19:47:18 +00:00
pacnpal
62c97f0b01 Converted all 'from videoarchiver.' imports to relative imports 2024-11-17 16:05:12 +00:00
pacnpal
c830be2841 videoarchiver/config/validation_manager.py
videoarchiver/config/role_manager.py
videoarchiver/database/connection_manager.py
videoarchiver/database/schema_manager.py
videoarchiver/queue/cleaners/tracking_cleaner.py
videoarchiver/exceptions.py
videoarchiver/processor.py
videoarchiver/commands.py
videoarchiver/update_checker.py
videoarchiver/utils/path_manager.py
videoarchiver/utils/file_ops.py
videoarchiver/processor/message_validator.py
videoarchiver/utils/download_manager.py
2024-11-17 06:12:41 +00:00
pacnpal
dac21f2fcd fixed 2024-11-16 22:32:08 +00:00
pacnpal
dd467df5fc 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
2024-11-16 18:12:35 +00:00
pacnpal
a4ca6e8ea6 Core Systems:
Component-based architecture with lifecycle management
Enhanced error handling and recovery mechanisms
Comprehensive state management and tracking
Event-driven architecture with monitoring
Queue Management:

Multiple processing strategies for different scenarios
Advanced state management with recovery
Comprehensive metrics and health monitoring
Sophisticated cleanup system with multiple strategies
Processing Pipeline:

Enhanced message handling with validation
Improved URL extraction and processing
Better queue management and monitoring
Advanced cleanup mechanisms
Overall Benefits:

Better code organization and maintainability
Improved error handling and recovery
Enhanced monitoring and reporting
More robust and reliable system
2024-11-16 05:01:29 +00:00
pacnpal
609aecdc4e Updated default settings (video archiving enabled by default)
New database functionality and commands
Additional video format support (MKV)
Message duration now in hours (0-168)
Enhanced error handling and logging
Queue persistence and management improvements
Hardware acceleration updates
More detailed command descriptions
Improved performance & limitations documentation
2024-11-16 01:22:37 +00:00
pacnpal
42b3ceb314 Created /core module with specialized files:
base.py: Main cog class and initialization logic
cleanup.py: Resource cleanup functionality
commands.py: Command handlers
events.py: Event listeners
guild.py: Guild component management
init.py: Module exports
Improved code organization by:

Separating concerns into focused modules
Maintaining clear dependencies between modules
Keeping related functionality together
Making the codebase more maintainable
Preserved all existing functionality while making the code more modular and easier to maintain.
2024-11-15 20:01:45 +00:00
pacnpal
971d52bd00 Separation of Concerns:
Core processing logic in VideoProcessor class
Dedicated message handling in MessageHandler
Queue operations in QueueHandler
Progress tracking in ProgressTracker
Reaction management in reactions.py
Improved Maintainability:
Each component has a single responsibility
Easier to test individual components
Better code organization and readability
Reduced file sizes for better version control
Better Resource Management:
Centralized progress tracking
Isolated queue operations
Cleaner cleanup processes
Optimized Imports:
Components can be imported individually as needed
Main processor.py provides backward compatibility
Clear module interface through init.py
2024-11-15 18:58:05 +00:00