Commit Graph

16 Commits

Author SHA1 Message Date
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
eb518dc8d5 fix(ffmpeg): add fallback to absolute imports in ffmpeg_downloader.py 2024-11-17 22:36:09 +00:00
pacnpal
2a619c3b45 ok 2024-11-17 22:26:11 +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
f8fe409cdd Architecture Changes:
Moved FFmpeg manager to cog level instead of per-guild
Created single shared FFmpeg manager instance in VideoArchiver class
Passed shared FFmpeg manager to VideoProcessor and VideoDownloader
Removed redundant FFmpeg downloads for each guild
Component Management:

Updated VideoArchiver to initialize one FFmpeg manager
Modified guild components to remove FFmpeg manager
Updated component cleanup to handle shared resources
Improved resource initialization order
Resource Efficiency:

Eliminated duplicate FFmpeg binary downloads
Reduced disk space usage
Improved initialization time
Better resource sharing across guilds
Error Handling:

Added proper cleanup for shared resources
Improved error propagation
Enhanced initialization error handling
Better component lifecycle management
2024-11-15 05:17:21 +00:00
pacnpal
2d92a3dca0 FFmpeg Binary Management:
Fixed tar.xz extraction by separating decompression and extraction steps
Added proper error handling for archive operations
Improved binary verification process
Enhanced cleanup of temporary files
Exception Handling:

Added missing exceptions to utils/exceptions.py
Fixed exception imports in exceptions.py
Added proper error types for all operations
Improved error messages and context
URL Processing:

Added pre-filtering for URLs before yt-dlp checks
Added common video platform patterns
Reduced error logging noise
Improved URL validation efficiency
Code Organization:

Centralized exceptions in utils/exceptions.py
Proper re-exports in exceptions.py
Consistent error handling across components
Better file operation handling
2024-11-15 05:00:47 +00:00
pacnpal
7e9e193178 URL Processing:
Added URL pre-filtering to avoid unnecessary yt-dlp checks
Added common video platform patterns for quick filtering
Reduced error logging noise from non-URL words
Improved URL validation efficiency
FFmpeg Management:

Enhanced FFmpeg binary verification
Added robust error handling for subprocess calls
Improved cleanup of failed operations
Added detailed logging for binary operations
Error Handling:

Fixed exception hierarchy in utils/exceptions.py
Added proper error types for different failure scenarios
Enhanced error messages with more context
Improved error propagation through the system
Process Flow:

Added proper timeout handling for subprocess calls
Enhanced environment variable handling
Better cleanup after failures
Added retry mechanisms for failed operations
2024-11-15 04:51:17 +00:00
pacnpal
9824469984 FFmpeg Management:
Updated extraction logic to handle BtbN's new archive structure with binaries in the bin directory
Added fallback to old structure for backward compatibility
Improved binary verification and permissions handling
Enhanced error handling during extraction and verification
Error Handling:

Added specific exception types for different errors
Better error propagation through the system
Improved error logging and user feedback
Enhanced cleanup on errors
Resource Management:

Better cleanup of failed downloads
Proper handling of temporary files
Enhanced queue management
Improved file deletion with retries
Verification:

FFmpeg binary verification with version checks
Video file integrity verification
Compression result verification
Archive structure verification
The system now:

Properly handles FFmpeg's new archive structure
Better manages binary downloads and verification
Provides more detailed error messages
Cleans up resources properly
Shows appropriate reactions for different error types
2024-11-15 04:20:17 +00:00
pacnpal
c144fb35ba The video downloading issues have been resolved by implementing comprehensive error handling and resource management:
FFmpeg is now properly managed:

Binaries are downloaded and verified on startup
Permissions are properly set
Hardware acceleration is detected and used when available
Resources are cleaned up properly
Error handling has been improved:

Specific exception types for different errors
Better error messages and logging
Appropriate reaction indicators
Enhanced component error handling
Resource management has been enhanced:

Failed downloads are tracked and cleaned up
Temporary files are handled properly
Queue management is more robust
Concurrent downloads are better managed
Verification has been strengthened:

FFmpeg binaries are verified
Video files are validated
Compression results are checked
Component initialization is verified
2024-11-15 04:18:57 +00:00
pacnpal
3e50faec75 Switching from regex patterns to yt-dlp simulation for URL detection:
Removed the regex-based URL detection
Added proper yt-dlp simulation to check if URLs are supported
Added better error handling for URL checking
Added detailed logging of URL detection results
Improving FFmpeg integration:

Added proper ffprobe binary download alongside FFmpeg
Added better verification of both binaries
Added retry mechanisms for binary downloads
Added proper cleanup of failed downloads
Enhancing error handling and logging:

Added detailed logging throughout the system
Added better error recovery mechanisms
Added proper cleanup of temporary files
Added better tracking of failed operations
2024-11-15 03:40:53 +00:00
pacnpal
8503fc6fdd Enhanced FFmpeg Integration:
Added robust error handling and logging
Improved binary verification and initialization
Added proper GPU detection and hardware acceleration
Optimized encoding parameters for different content types
Improved File Operations:

Added retry mechanisms for file operations
Enhanced temporary directory management
Improved cleanup of failed downloads
Added proper permission handling
Enhanced Queue Management:

Fixed queue manager initialization
Added better error recovery
Improved status tracking and logging
Enhanced cleanup of failed items
Better Error Handling:

Added comprehensive exception hierarchy
Improved error logging and reporting
Added fallback mechanisms for failures
Enhanced error recovery strategies
2024-11-15 03:21:25 +00:00
pacnpal
826f5e1b3e Improved FFmpeg downloader error handling and permissions 2024-11-15 01:31:37 +00:00
pacnpal
2ba89edbd9 refactor: Improve ffmpeg_downloader module
- Enhanced Docker compatibility with proper permissions
- Better error handling and logging
- Improved download and extraction process
- Added detailed type hints and documentation
2024-11-14 22:37:42 +00:00
pacnpal
5454630591 refactor: Split FFmpeg manager into modular components
- Created ffmpeg package with specialized modules
- Improved Docker compatibility using /tmp
- Better permission handling
- More robust error handling
- Separated concerns for easier maintenance
- Simplified imports through __init__.py
2024-11-14 22:26:32 +00:00