2.0 KiB
- Cross-Platform UI Stability Issue UI elements that interact with the local file system, such as the "Open" and "Play" buttons, fail or cause the application to freeze on macOS and Linux. This is due to two primary causes:
Using blocking system calls (os.system) which freeze the main UI thread.
File system race conditions, where the app tries to access a file immediately after it has been moved, before it's fully available to other processes.
Incorrectly using server-side file paths (e.g., /downloads/song.mp3) on the local client machine.
Recommendation To ensure stability across all operating systems, the following best practices should be implemented:
Use Non-Blocking, Cross-Platform APIs: Replace all platform-specific calls (os.system, os.startfile) with the Qt framework's built-in, non-blocking tools like QDesktopServices.
Isolate Client and Server Paths: Never use a full file path from the slskd API directly. The client must only extract the filename (os.path.basename()) and then search for that file within its own locally-configured download directory.
- Configuration Management Issue The application's settings are not fully dynamic or user-friendly. Key issues include:
The transfer_path for organized downloads is not configurable within the settings UI.
When a user updates a setting like the download_path, the change is not reflected in other parts of the application (like the status bar) until it is restarted.
Recommendation To create a more robust and responsive user experience, the configuration system should be improved:
Expose All Key Paths: All important file paths, including download_path and transfer_path, must be editable within the application's settings menu.
Implement a Reactive Settings System: The settings manager should emit a signal (e.g., settingsChanged) whenever the configuration is updated. UI components should connect to this signal to automatically refresh their display with the new values, ensuring the entire application is always in sync.