Fix import issues:

- Add __all__ list to exceptions.py
- Fix absolute imports to use relative imports
- Fix duplicate imports
- Fix truncated code in download_core.py
- Add missing imports and type hints
- Fix indentation and formatting issues
This commit is contained in:
pacnpal
2024-11-16 22:46:29 +00:00
parent dac21f2fcd
commit d2d07c6bf6
5 changed files with 98 additions and 69 deletions

View File

@@ -9,8 +9,8 @@ import subprocess
from typing import Tuple
from pathlib import Path
from videoarchiver.utils.exceptions import VideoVerificationError
from videoarchiver.utils.file_deletion import secure_delete_file
from .exceptions import VideoVerificationError
from .file_deletion import secure_delete_file
logger = logging.getLogger("VideoArchiver")
@@ -135,4 +135,8 @@ class FileOperations:
if os.path.exists(file_path):
size = os.path.getsize(file_path)
max_size = max_size_mb * 1024 * 1024
return size <= max_size, size
return False, 0
except Exception as e:
logger.error(f"Error checking file size: {e}")
return False, 0