mirror of
https://github.com/pacnpal/Pac-cogs.git
synced 2025-12-20 10:51:05 -05:00
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
This commit is contained in:
@@ -1,9 +1,49 @@
|
||||
"""Exceptions for the utils package"""
|
||||
"""Custom exceptions for VideoArchiver"""
|
||||
|
||||
class FileCleanupError(Exception):
|
||||
"""Raised when file cleanup fails"""
|
||||
class VideoArchiverError(Exception):
|
||||
"""Base exception for VideoArchiver errors"""
|
||||
pass
|
||||
|
||||
class VideoVerificationError(Exception):
|
||||
"""Raised when video verification fails"""
|
||||
class VideoDownloadError(VideoArchiverError):
|
||||
"""Error downloading video"""
|
||||
pass
|
||||
|
||||
class VideoProcessingError(VideoArchiverError):
|
||||
"""Error processing video"""
|
||||
pass
|
||||
|
||||
class VideoVerificationError(VideoArchiverError):
|
||||
"""Error verifying video"""
|
||||
pass
|
||||
|
||||
class VideoUploadError(VideoArchiverError):
|
||||
"""Error uploading video"""
|
||||
pass
|
||||
|
||||
class VideoCleanupError(VideoArchiverError):
|
||||
"""Error cleaning up video files"""
|
||||
pass
|
||||
|
||||
class ConfigurationError(VideoArchiverError):
|
||||
"""Error in configuration"""
|
||||
pass
|
||||
|
||||
class PermissionError(VideoArchiverError):
|
||||
"""Error with file permissions"""
|
||||
pass
|
||||
|
||||
class NetworkError(VideoArchiverError):
|
||||
"""Error with network operations"""
|
||||
pass
|
||||
|
||||
class ResourceError(VideoArchiverError):
|
||||
"""Error with system resources"""
|
||||
pass
|
||||
|
||||
class QueueError(VideoArchiverError):
|
||||
"""Error with queue operations"""
|
||||
pass
|
||||
|
||||
class ComponentError(VideoArchiverError):
|
||||
"""Error with component initialization or cleanup"""
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user