refactor: reorganize default directories to Documents/Entropia Universe/

Changed default locations:
- Screenshots: Documents/Entropia Universe/Screenshots
- Icons: Documents/Entropia Universe/Icons

This provides better organization and easier access for users.
All directories are created automatically if they don't exist.
This commit is contained in:
LemonNexus 2026-02-11 15:27:39 +00:00
parent 18ce52a72e
commit adc76e42cc
5 changed files with 13 additions and 10 deletions

View File

@ -21,7 +21,10 @@ class AutoScreenshot:
""" """
def __init__(self, screenshot_dir: Optional[Path] = None): def __init__(self, screenshot_dir: Optional[Path] = None):
self.screenshot_dir = screenshot_dir or Path.home() / ".lemontropia" / "screenshots" # Default to Documents/Entropia Universe/Screenshots
if screenshot_dir is None:
screenshot_dir = Path.home() / "Documents" / "Entropia Universe" / "Screenshots"
self.screenshot_dir = screenshot_dir
self.screenshot_dir.mkdir(parents=True, exist_ok=True) self.screenshot_dir.mkdir(parents=True, exist_ok=True)
self.session_screenshots: List[Path] = [] self.session_screenshots: List[Path] = []

View File

@ -141,7 +141,7 @@ class InventoryScanner:
self.item_slot_gap = 4 # Gap between slots self.item_slot_gap = 4 # Gap between slots
# Icon extraction settings # Icon extraction settings
self.icon_output_dir = Path.home() / ".lemontropia" / "extracted_icons" self.icon_output_dir = Path.home() / "Documents" / "Entropia Universe" / "Icons"
self.icon_output_dir.mkdir(parents=True, exist_ok=True) self.icon_output_dir.mkdir(parents=True, exist_ok=True)
# Detection results cache # Detection results cache

View File

@ -70,8 +70,8 @@ class GalleryDialog(QDialog):
# Initialize database # Initialize database
self.db = DatabaseManager() self.db = DatabaseManager()
# Ensure screenshots directory exists # Ensure screenshots directory exists - default to Documents/Entropia Universe/Screenshots
self.screenshots_dir = Path(__file__).parent.parent / "data" / "screenshots" self.screenshots_dir = Path.home() / "Documents" / "Entropia Universe" / "Screenshots"
self.screenshots_dir.mkdir(parents=True, exist_ok=True) self.screenshots_dir.mkdir(parents=True, exist_ok=True)
# State # State
@ -761,7 +761,8 @@ class ScreenshotCapture:
def __init__(self, db: Optional[DatabaseManager] = None): def __init__(self, db: Optional[DatabaseManager] = None):
self.db = db or DatabaseManager() self.db = db or DatabaseManager()
self.screenshots_dir = Path(__file__).parent.parent / "data" / "screenshots" # Default to Documents/Entropia Universe/Screenshots
self.screenshots_dir = Path.home() / "Documents" / "Entropia Universe" / "Screenshots"
self.screenshots_dir.mkdir(parents=True, exist_ok=True) self.screenshots_dir.mkdir(parents=True, exist_ok=True)
def capture(self, session_id: int, trigger_event: str = "manual", def capture(self, session_id: int, trigger_event: str = "manual",

View File

@ -1927,9 +1927,8 @@ class MainWindow(QMainWindow):
try: try:
from modules.auto_screenshot import AutoScreenshot from modules.auto_screenshot import AutoScreenshot
# Create screenshot manager - use gallery dialog's screenshots directory # Create screenshot manager - AutoScreenshot now uses Documents/Entropia Universe/Screenshots by default
screenshots_dir = Path(__file__).parent.parent / "data" / "screenshots" auto_screenshot = AutoScreenshot()
auto_screenshot = AutoScreenshot(screenshots_dir)
# Create hotkey manager (pass parent window for Qt shortcuts) # Create hotkey manager (pass parent window for Qt shortcuts)
self._screenshot_hotkeys = ScreenshotHotkeyManager(self, auto_screenshot) self._screenshot_hotkeys = ScreenshotHotkeyManager(self, auto_screenshot)

View File

@ -184,7 +184,7 @@ class SettingsDialog(QDialog):
# Screenshots directory # Screenshots directory
screenshots_layout = QHBoxLayout() screenshots_layout = QHBoxLayout()
self.screenshots_dir_edit = QLineEdit(self._screenshots_dir) self.screenshots_dir_edit = QLineEdit(self._screenshots_dir)
self.screenshots_dir_edit.setPlaceholderText("Default: data/screenshots/") self.screenshots_dir_edit.setPlaceholderText(r"Default: Documents\Entropia Universe\Screenshots")
screenshots_layout.addWidget(self.screenshots_dir_edit) screenshots_layout.addWidget(self.screenshots_dir_edit)
screenshots_browse = QPushButton("Browse...") screenshots_browse = QPushButton("Browse...")
@ -196,7 +196,7 @@ class SettingsDialog(QDialog):
# Icons directory # Icons directory
icons_layout = QHBoxLayout() icons_layout = QHBoxLayout()
self.icons_dir_edit = QLineEdit(self._icons_dir) self.icons_dir_edit = QLineEdit(self._icons_dir)
self.icons_dir_edit.setPlaceholderText("Default: ~/.lemontropia/extracted_icons/") self.icons_dir_edit.setPlaceholderText(r"Default: Documents\Entropia Universe\Icons")
icons_layout.addWidget(self.icons_dir_edit) icons_layout.addWidget(self.icons_dir_edit)
icons_browse = QPushButton("Browse...") icons_browse = QPushButton("Browse...")