diff --git a/src/utils/__init__.py b/ytsage/utils/__init__.py similarity index 100% rename from src/utils/__init__.py rename to ytsage/utils/__init__.py diff --git a/src/utils/ytsage_config_manager.py b/ytsage/utils/ytsage_config_manager.py similarity index 97% rename from src/utils/ytsage_config_manager.py rename to ytsage/utils/ytsage_config_manager.py index 0ff3182..c4b5d3d 100644 --- a/src/utils/ytsage_config_manager.py +++ b/ytsage/utils/ytsage_config_manager.py @@ -20,7 +20,7 @@ Features Usage ----- -from src.utils.ytsage_config_manager import ConfigManager +from .ytsage_config_manager import ConfigManager # Load settings (auto-loads if not already loaded) download_path = ConfigManager.get("download_path") @@ -54,8 +54,8 @@ import threading from pathlib import Path from typing import Any, Dict, Optional -from src.utils.ytsage_constants import APP_CONFIG_FILE, USER_HOME_DIR -from src.utils.ytsage_logger import logger +from .ytsage_constants import APP_CONFIG_FILE, USER_HOME_DIR +from .ytsage_logger import logger class ConfigManager: diff --git a/src/utils/ytsage_constants.py b/ytsage/utils/ytsage_constants.py similarity index 99% rename from src/utils/ytsage_constants.py rename to ytsage/utils/ytsage_constants.py index def0a31..af80163 100644 --- a/src/utils/ytsage_constants.py +++ b/ytsage/utils/ytsage_constants.py @@ -70,7 +70,7 @@ def get_asset_path(asset_relative_path: str) -> Path: # Fallback to relative path (for development environment) current_file = Path(__file__) - # Go up from src/utils to ytsage root, then to asset + # Go up from utils to ytsage root, then to asset ytsage_root = current_file.parent.parent.parent asset_path = ytsage_root / asset_relative_path diff --git a/src/utils/ytsage_history_manager.py b/ytsage/utils/ytsage_history_manager.py similarity index 98% rename from src/utils/ytsage_history_manager.py rename to ytsage/utils/ytsage_history_manager.py index 63e84e2..d373581 100644 --- a/src/utils/ytsage_history_manager.py +++ b/ytsage/utils/ytsage_history_manager.py @@ -14,7 +14,7 @@ Features Usage ----- -from src.utils.ytsage_history_manager import HistoryManager +from .ytsage_history_manager import HistoryManager # Add a download to history HistoryManager.add_entry(...) @@ -38,8 +38,8 @@ from datetime import datetime from pathlib import Path from typing import Any, Dict, List, Optional -from src.utils.ytsage_constants import APP_HISTORY_FILE, APP_DATA_DIR -from src.utils.ytsage_logger import logger +from .ytsage_constants import APP_HISTORY_FILE, APP_DATA_DIR +from .ytsage_logger import logger class HistoryManager: diff --git a/src/utils/ytsage_localization.py b/ytsage/utils/ytsage_localization.py similarity index 98% rename from src/utils/ytsage_localization.py rename to ytsage/utils/ytsage_localization.py index cfedccc..199c3ad 100644 --- a/src/utils/ytsage_localization.py +++ b/ytsage/utils/ytsage_localization.py @@ -15,7 +15,7 @@ Features Usage ----- -from src.utils.ytsage_localization import LocalizationManager +from .ytsage_localization import LocalizationManager # Get localized text text = LocalizationManager.get_text("download.ready") @@ -33,7 +33,7 @@ import threading from pathlib import Path from typing import Any, Dict -from src.utils.ytsage_logger import logger +from .ytsage_logger import logger class LocalizationManager: @@ -46,7 +46,7 @@ class LocalizationManager: _lock = threading.RLock() _current_language = "en" _languages: Dict[str, Dict[str, Any]] = {} - _languages_dir = Path(__file__).parent.parent.parent / "languages" + _languages_dir = Path(__file__).parent.parent / "languages" # Fallback English strings embedded in code _fallback_strings = { diff --git a/src/utils/ytsage_logger.py b/ytsage/utils/ytsage_logger.py similarity index 95% rename from src/utils/ytsage_logger.py rename to ytsage/utils/ytsage_logger.py index a066454..5444ae1 100644 --- a/src/utils/ytsage_logger.py +++ b/ytsage/utils/ytsage_logger.py @@ -9,7 +9,7 @@ import sys from loguru import logger -from src.utils.ytsage_constants import APP_LOG_DIR, IS_FROZEN +from .ytsage_constants import APP_LOG_DIR, IS_FROZEN # Separate configs for each handler CONSOLE_CONFIG = {