Commit Graph

178 Commits

Author SHA1 Message Date
Vxrtrauter 8592b3058e Merge branch 'main' of https://github.com/KeksPirates/SoftwareManager 2026-05-04 21:51:20 +02:00
Vxrtrauter 7a82e948b9 refactor: remove unused imports 2026-05-04 21:51:18 +02:00
Vxrtrauter 64ca3c76a2 Fix: update buzzheavier link detection logic and improve filename extraction from headers 2026-05-04 19:07:42 +02:00
Vxrtrauter 631f6592ac Refactor: remove unused imports from update dialog 2026-04-24 10:36:14 +02:00
Vxrtrauter 468faff16b Refactor: streamline update notification logic and enhance settings dialog for cross-platform compatibility 2026-04-24 10:20:26 +02:00
Vxrtrauter 982be09f6e Refactor: implement log emitter for improved logging and signal handling 2026-04-16 11:51:11 +02:00
Vxrtrauter d5582c5c38 Refactor: enhance download_update function with cancellation handling and error messaging 2026-04-15 14:18:36 +02:00
Vxrtrauter 392d2a6f03 Refactor: enhance AppDaemons with QThread for improved background task management 2026-04-14 14:40:19 +02:00
Vxrtrauter 7310049246 Refactor: notification handling and introduce AppDaemons for background tasks 2026-04-14 14:33:21 +02:00
Vxrtrauter f5809c466a Add timeouts, error handling & logging
Add network timeouts and more robust error handling across scrapers/hosts, improve logging concurrency, and refine download handling:

- Hosts/sources: add request timeouts (15s) and exception handling to buzzheavier, gofile, steamrip, uztracker and rutracker; use urllib.parse.quote for search queries and better parse error checks.
- GoFile: use Session with try/finally, create guest account with timeout, validate API responses and close session.
- Context menu: import DirectDownloadHandle and handle stopping direct downloads separately from libtorrent; simplify file deletion with single try/catch; improve logging on exceptions.
- GUI/search flow: move UI state changes (clear table, disable searchbar, hide empty results) into MainWindow._start_search and reduce duplicated UI changes in run_search.
- Main: remove duplicate is_running assignment.
- Libtorrent: snapshot seeded magnets in update loop to avoid concurrent access; minor indentation change in add_seed.
- State/logging: add _log_lock to AppState; protect state.log_buffer with lock in consoleLog and flush_log_buffer and fix flush semantics.
- Updater: replace busy-wait with QEventLoop/QTimer polling for DirectDownloadHandle progress, stop timer and quit loop on completion/error, and remove unnecessary sleeps.

These changes aim to make network operations more reliable, prevent UI freezes, avoid race conditions when logging, and handle direct vs libtorrent downloads more cleanly.
2026-04-13 11:03:25 +02:00
Vxrtrauter 8601a1ed50 fix: Detect SteamRip hosts by URL
Replace brittle index-based host resolution in SteamripScraper with substring checks on the chosen download URL (buzzheavier, gofile, vikingfile, megadb). Add a console log for the resolved link and adjust returned values for gofile. Remove the unnecessary links.index lookup and its exception handling.
2026-04-11 09:25:32 +02:00
Vxrtrauter 02bb77ea1e fix: set default accent color in AppState to #fda7d7 2026-04-10 20:15:58 +02:00
Vxrtrauter cb9e147f19 fix: clean up imports in steamrip, contextmenu, and settings modules 2026-04-10 19:34:27 +02:00
KeksNino 9501f0e158 Merge pull request #82 from KeksPirates/feat/change-icon
feat: change logo
2026-04-10 17:30:31 +00:00
Vxrtrauter e54b3362f9 fix: steamrip scraper freezing whole manager on second search and update notification popup settings and improve megadb notification handling 2026-04-10 19:25:18 +02:00
KeksNino 9715043936 fix: notification popup for megadb being black on windows 2026-04-10 19:02:51 +02:00
KeksNino 761158746f fix: qdarktheme setup on some notification popups 2026-04-10 18:47:21 +02:00
KeksNino 8d5b76e054 fix: background not transparent anymore after opening megadb notification poup 2026-04-10 18:06:10 +02:00
KeksNino e016695f83 feat: change logo 2026-04-10 17:24:30 +02:00
KeksNino 14afc821b1 feat: add notification popup to inform users of malicious ads on megadb 2026-04-10 16:27:53 +02:00
Vxrtrauter f4cde66748 feat: add vikingfile and megadb scraping functionality to SteamripScraper 2026-04-10 01:31:02 +02:00
Vxrtrauter 040a8ad728 refactor: improve gofile scraper with token generation and error handling 2026-04-10 01:06:28 +02:00
KeksNino bf97907600 fix: tracker drop down menu text being incorrectly aligned 2026-04-10 00:20:35 +02:00
shayaa a4797c6fe5 Merge branch 'main' into feat/contextmenu 2026-04-10 00:10:36 +02:00
Vxrtrauter 4f943759f4 Refactor: steamrip scraper & update menu labels
Simplify SteamripScraper link/name extraction by using BeautifulSoup results directly (append absolute URLs and use link.get_text()) and avoid fragile regex; adjust scrape_steamrip_game_downloads to accept a full URL argument. Update context menu text: replace "Copy Magnet URI" with "Copy Download Link" in two places and rename "Download Item" to "Download" for clearer UI wording.
2026-04-09 23:56:14 +02:00
Vxrtrauter eb9d5d60d1 fix: Centralize single-instance check and refactor startup
Introduce check_running(app) to create and check SingleInstance early in main(), store it on app._single_instance, and reuse that instance in run_gui() instead of constructing a new one. Move single-instance exit logic (print, closehelper, force_exit) into the new helper and wire single.on_raise to show_from_tray. Also replace the previous consoleLog call with print and add a comment indicating the check is for SoftwareManager already running. This centralizes startup single-instance handling and avoids creating multiple SingleInstance objects.
2026-04-09 23:31:09 +02:00
Vxrtrauter 7aea5c882a fix: tracker context menu logic and server name
contextmenu.py: Harden context-menu handlers by validating row bounds against state.posts, avoid relying on selectedItems() in places where _context_menu_row is used, and handle directory paths when deleting downloads (os.path.isdir or isfile) before send2trash. Also streamline URL opening with exception handling. main.py: Update SERVER_NAME to "SoftwareManager_KeksPirates". These changes prevent out-of-range/selection errors and ensure directories are trashed safely; also update server identification.
2026-04-09 23:13:23 +02:00
KeksNino b4ba9ea4d1 fix: fixed absolutely nothing by changing some qt worker stuff 2026-04-09 22:27:26 +02:00
KeksNino dcba60c695 fix: cant use copy magnet uri contextmenu widget more than once 2026-04-09 02:15:36 +02:00
KeksNino 810bed347b fix: copy magnet uri to clipboard in context menu 2026-04-09 01:03:13 +02:00
KeksNino d1df23f4e3 fix: application not closing fully when doing ctrl + c 2026-04-08 02:14:05 +02:00
KeksNino df5ebc2bc6 feat: multi select, delete and cancel downloads 2026-04-08 02:10:30 +02:00
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
KeksNino fc67ff11c9 feat: add show widget to tray icon and show the gui on left click 2026-04-08 00:23:24 +02:00
KeksNino 6592cd4ec1 feat: properly utilize close to tray and quit action 2026-04-08 00:15:46 +02:00
KeksNino 767955e008 feat: add tray icon 2026-04-08 00:00:15 +02:00
KeksNino 75c649afda feat: move to trash instead of deleting permanently when deleting files 2026-04-07 23:44:38 +02:00
KeksNino 7526eb5d30 feat: add download item context menu widget 2026-04-07 23:42:50 +02:00
KeksNino 1f16a58f21 feat: double click to download in search results 2026-04-07 23:30:18 +02:00
KeksNino 5b42d8d607 feat: add context menu to search list to copy magnet uri and open in browser 2026-04-07 23:23:40 +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