Commit Graph

139 Commits

Author SHA1 Message Date
shayaa a6589df44d Merge pull request #58 from KeksPirates/feat/improve-accent-color-options
Enhance accent color options and save functionality in settings
2026-04-08 02:05:09 +02:00
Vxrtrauter a29f58c023 Add fast layout update for image overlay
Introduce _apply_layout_fast to update the image overlay quickly on window resize using the cached QImage and FastTransformation. Called from the Resize event handler before the resize timer, it handles wallpaper mode (fast scale, center-crop to parent) and non-wallpaper mode (positioning by state.image_position and state.image_offset) to provide immediate visual feedback without running the heavier _apply_layout.
2026-04-08 01:52:08 +02:00
Vxrtrauter 49ba699155 fix: Debounce resize and cache loaded images
Add a 100ms single-shot QTimer to debounce Resize events and avoid reloading/layout on every resize. Cache the loaded QImage in _cached_qimage/_cached_path and only reload from disk when the image path changes. Extract layout/apply logic into _apply_layout and clear cache in update_image_overlay when a new path is provided. These changes reduce disk I/O and repeated layout work during rapid resizes.
2026-04-08 01:44:21 +02:00
Vxrtrauter cc51f57e18 fix: Add locks, logging refactor, and bugfixes
Improve thread-safety, logging, and various bug fixes across the app.

Key changes:
- Add and use state.downloads_lock around accesses to state.active_downloads in multiple modules (UI, libtorrent, misc, direct downloads) to prevent race conditions.
- Prevent concurrent dl_status_loop runs using a non-blocking _loop_lock and ensure proper iteration over a snapshot of downloads.
- Add metadata timeout when waiting for torrent metadata and fix free-space check logic to remove or reject downloads appropriately.
- Refactor download log persistence: add _load_downloads and _save_downloads helpers and centralize JSON read/write logic in utils/logging/logs.py.
- Optimize DirectDownloadStatus speed window by switching to deque and using popleft to trim older samples.
- Trim console log widget to 500 lines to avoid unbounded growth.
- Add small state fields for custom image positioning (x/y and enabled flag).
- Fix Steamrip scraper caching behavior and make Uztracker return an empty list on fetch failures.
- Add defensive checks in run_download to handle missing links.

These changes focus on stability and correctness for concurrent download handling and durable logging.
2026-04-08 01:41:32 +02:00
Vxrtrauter cf9185e9e7 feat: Enhance accent color options in settings dialog and save functionality 2026-04-08 01:06:41 +02:00
Vxrtrauter 912d9d8c00 fix: Add shutdown helper call and modify exit behavior in updater 2026-04-07 02:26:15 +02:00
Vxrtrauter 929fdf69e5 Update and revert image path in settings dialog
Capture the original state.image_path at dialog start, connect the Image Path QLineEdit's textChanged signal to update state.image_path immediately, and restore the original image_path if the settings dialog is cancelled. This matches existing undo behavior for width/offset/opacity and prevents partial image path edits from persisting when the dialog is rejected.
2026-04-07 01:07:22 +02:00
Vxrtrauter 12506dd1df feat: Add customizable accent color setting
Introduce an accent color preference across the app: add a settings UI input (with restart note), persist it to AppState and config (read/write), and accept it in save_settings. Integrate the value into theming: compute a semi-transparent selection color, apply it to table selection styles, and pass it to qdarktheme as the primary color (including when window transparency is enabled). Also apply the accent to the tracker combo selection styling as a UI polish.
2026-04-05 06:57:00 +02:00
Vxrtrauter 9e3d1cf90a feat: Add image position presets and sliders
Introduce image positioning presets and UI improvements for image overlay control. image.py: compute overlay coordinates for top-left/top-right/bottom-left/bottom-right/center positions and respect corner offset and opacity. settings.py: replace spinboxes with horizontal sliders (with value labels and custom style), add Wallpaper Mode checkbox and Position combo, wire controls to state and include them in the settings tab; ensure dialog rollback restores new temp settings. config/config.py & utils/settings.py: persist and load new image_as_wallpaper and image_position settings and extend save_settings to accept them. data/state.py: add new state fields and properties for image_position, custom position flags and x/y coordinates; change default image_as_wallpaper to false. These changes enable preset positioning, improved UX for sizing/offset/opacity, and persistence of new image options.
2026-04-05 06:12:54 +02:00
Vxrtrauter 2ad02435a1 feat/fix: "wallpaper" transparency handling
Introduce dynamic wallpaper transparency support for the image overlay. Adds QStackedWidget import and a new _set_wallpaper_transparency method that toggles WA_TranslucentBackground on the main window and key child widgets, updates stylesheets (with originals preserved/restored), and uses darkdetect to adapt combo popup background. Adds state fields (_wallpaper_active, _original_stylesheets), sets overlay opacity from state, and calls the transparency toggler when loading/hiding the overlay to avoid redundant updates.
2026-04-05 05:22:24 +02:00
Vxrtrauter f11837217c feat: add basic "wallpaper" functionality 2026-04-05 04:02:10 +02:00
Vxrtrauter 1a7de70c0b feat: add image opacity, config migration, settings
Add image overlay opacity support and related UI/settings, plus robust config migration and error handling.

Key changes:
- UI: image overlay now uses QGraphicsOpacityEffect, hides when disabled, and updates opacity on state changes (src/interface/dialogs/image.py).
- New NotificationPopup dialog for user alerts (src/interface/dialogs/notificationpopup.py).
- Settings dialog: added Image Opacity control, adjusted labels, persist/rollback behavior on cancel, and include opacity when saving (src/interface/dialogs/settings.py).
- State: added properties for image_opacity and image_enabled with change notifications; renamed image_width setter param for clarity (src/utils/data/state.py).
- Config: switch from config.yml to config.ini, implement one-time migration, typed read/write of values, validation/error handling, automatic backups of corrupted files and user notification (src/utils/config/config.py).
- Settings save: accept and persist image_opacity (src/utils/config/settings.py).
- Startup: initialize QApplication earlier and pass app to run_gui (src/main.py).
- Minor: removed an extra blank line in log handler and small import cleanups.

These changes enable adjustable overlay transparency, improve config reliability, and surface errors to users while preserving/backuping old configs.
2026-04-04 07:36:03 +02:00
Vxrtrauter a3ff23147f Restore image settings on cancel; live sync
Save original image_width/image_offset when opening Settings and restore them if the dialog is cancelled. Add valueChanged handlers to immediately update state.image_width and state.image_offset, enforce an image width maximum of 2500, and refactor Save wiring to a dedicated handler that calls save_settings(dialog.accept, ...). Connect dialog.finished to restore temp values on rejection and clean up dialog layout/logic.
2026-04-04 05:36:16 +02:00
KeksNino fda45efcb5 refactor: create a helper function to create widgets in settings dialog 2026-04-04 03:52:20 +02:00
KeksNino 3de2110a3e fix: redraws pixmap after changing image settings so restart is no longer required 2026-04-04 02:51:45 +02:00
Vxrtrauter cb7e74a224 Add configurable image overlay settings
Introduce configurable image overlay options and persist them. Added new state fields (image_width, image_offset, image_enabled) with defaults and wired them into the image overlay: the image display now respects the enabled flag, uses image_width for scaling and image_offset for placement. Extended the Settings dialog (resized, API field sizing) with a new Image tab containing enable checkbox, width and offset spinboxes, and included these values when saving. Updated config read/write to include an Image section so settings persist across runs and extended save_settings to accept image_width and image_offset. Minor import/order cleanup in image dialog.
2026-04-04 02:06:06 +02:00
KeksNino b59768bcff fix image resizing and general code of image class 2026-03-22 01:41:16 +01:00
Vxrtrauter 77c2e9cd9e fix: tab layout, clear search state, and cleanup
UI: remove trackertable from the Search tab and reorder widgets to correct layout. Tab helper: add QLayout directly instead of wrapping it in a temporary QWidget to avoid extra nesting. Search helper: clear the trackertable rows and reset state.posts when starting a new search to ensure fresh results. Minor: import check_space in main and simplify an unused loop variable in libtorrent_int for clarity/linting.
2026-03-21 02:48:48 +01:00
Vxrtrauter 290388a7dc Merge branch 'main' into refactor/improve-code-quality 2026-03-21 02:48:04 +01:00
KeksNino 3b51552313 check for free disk space at startup
resolve merge
2026-03-21 02:08:23 +01:00
Vxrtrauter 9e7607dd36 refactor: get_magnet to get_download_link
Rename scraper method get_magnet -> get_download_link in monkrus, rutracker and uztracker. Update downloader code to call .get_download_link and use the .is_magnet flag on tracker objects (replace dict access). Switch direct_download package imports to absolute paths and perform a small import reorder in direct_download/utils.py. These changes unify the download API and adapt call sites to the new tracker interface.
2026-03-21 02:03:49 +01:00
KeksNino 616552063d fix gui not starting, caused by tabhelper 2026-03-21 01:47:46 +01:00
KeksNino 9eb70af1a1 refactored tabhelper function 2026-03-21 01:14:25 +01:00
Vxrtrauter 4d4187ce63 fix: revert update.py changes 2026-03-21 01:09:31 +01:00
KeksNino 23e44cb128 remove qt widget from updater.py and use class instead 2026-03-21 00:39:28 +01:00
Vxrtrauter 0a591e1cda refactor: update progress dialog and tidy UI 2026-03-21 00:27:56 +01:00
Vxrtrauter c0f5060451 fix: searchbar disabling itself when searching for nothing 2026-03-20 22:51:28 +01:00
Vxrtrauter c6940f0178 fix: add self argument to function 2026-03-20 02:26:42 +01:00
Vxrtrauter 2afb3e7716 refactor: improve scraper handling by utilizing classes for registration 2026-03-20 02:22:40 +01:00
Vxrtrauter 325eda54fa refactor: remove core/ folder 2026-03-19 20:42:28 +01:00
Vxrtrauter 53d4a240a0 refactor state.py and add comments to it, add another check to version getter. 2026-03-18 23:33:33 +01:00
Vxrtrauter 2beabbb1ba refactor: improve search functionality and code organization in GUI components 2026-03-16 14:24:23 +01:00
Vxrtrauter f50bfd0aa0 link updater to gui again 2026-03-16 03:04:14 +01:00
Vxrtrauter 270ee027f7 feat: add semi-dynamic discovering of build info file 2026-03-16 02:31:03 +01:00
Vxrtrauter a443f64501 refactor: move build_info.json to root folder, update workflow to support changes, rename function to more accurate name 2026-03-16 02:02:03 +01:00
Vxrtrauter 0e05f42741 Fix invalid version detection, refactor main.py and add comments for improved code understanding 2026-03-16 01:35:52 +01:00
Vxrtrauter 053ea7694d feat: improve output statements on exception blocks 2026-03-15 23:19:32 +01:00
Vxrtrauter 62b24c7111 feat: improve code quality by fixing typos, adding print statements to exception blocks, remove unused imports etc 2026-03-15 23:01:02 +01:00
KeksNino 79f9155d76 fix settings dialog being empty 2026-03-13 19:26:38 +01:00
KeksNino 7cc36fb3ed refactor (almost) entire gui to split into multiple files 2026-03-13 18:57:25 +01:00
shayaa 0374cbf511 Merge branch 'fix/gofile' into main 2026-03-11 22:26:10 +01:00
KeksNino 7df7d87928 fix gofile downloads by adding custom headers to both direct dl and api request
still needs work: 1. fix restart causing the download to instantly jump to 100%
2026-03-11 22:15:00 +01:00
Vxrtrauter e97f9ffe8a refactor imports 2026-03-11 15:40:25 +01:00
Vxrtrauter c4685dc2de fix: retry file deletion to allow libtorrent to release handles 2026-03-11 00:57:48 +01:00
Vxrtrauter f34d02d3d0 fix: minor inexistent variable in loghandler 2026-03-11 00:44:53 +01:00
Vxrtrauter 91b5c12afa feat: multithreaded update downloads + refactor updater into utils/network 2026-03-11 00:43:00 +01:00
Vxrtrauter b77867b111 feat: QoL features to Updater, workflow trigger. 2026-03-11 00:07:11 +01:00
Vxrtrauter bf20625832 Fix Torrent Handle errors 2026-03-10 22:45:25 +01:00
Vxrtrauter 8d218443bf fix: wrong download paths in libtorrent logic 2026-03-10 22:35:49 +01:00
Vxrtrauter a55a049583 Merge branch 'main' of https://github.com/KeksPirates/SoftwareManager 2026-03-10 22:23:26 +01:00