25 Commits

Author SHA1 Message Date
c865637b8e 🛡️ | Fix security hotspot - replace /tmp path with tmp_path
All checks were successful
SonarQube Code Quality Scan / SonarQube Scan (push) Successful in 1m51s
2026-06-09 19:38:50 +03:00
4671a6937b | Boost coverage to 60% with 256 passing tests
All checks were successful
SonarQube Code Quality Scan / SonarQube Scan (push) Successful in 1m52s
- mpris.py: 81% → 100% — import fallbacks, flush_props edge cases,
  stop_async error path, run_async exception path, notify loops
- player.py: 51% → 73% — AudioPlayer state/volume/loop/queue tests,
  _on_download_failed, _on_download_succeeded, _on_playback_state,
  _on_media_status, seek/skip/previous, _start_prefetch, _advance,
  _cancel_active_downloads, DownloadWorker._do_cancel
- test_gui_widgets.py: 50 → 88 tests across TestAudioPlayer and
  existing widget tests
- 5 modules at 100%: config, discord_rpc, main, mpris, music_db
2026-06-09 19:33:58 +03:00
27d12d31cb 💚 | Update SonarQube scanner to v6 in CI workflow
All checks were successful
SonarQube Code Quality Scan / SonarQube Scan (push) Successful in 1m52s
Fixes security vulnerability warning by updating
sonarsource/sonarqube-scan-action from v4 to v6.
2026-06-09 18:46:50 +03:00
7a70232239 🐛 | Fix SonarQube issues across codebase
All checks were successful
SonarQube Code Quality Scan / SonarQube Scan (push) Successful in 1m41s
- Add docstrings to all empty Qt stub methods (S1186)
- Fix BLOCKER S1845: rename playbackState to get_playback_state
- Rename enum fields to snake_case with CamelCase aliases (S116)
- Rename stub methods to snake_case (set_source, set_position, etc.) (S100)
- Rename unused timeout param to msecs (S1172)
- Remove unused state variables in tests (S1481)
- Replace 'is' with '==' for enum comparisons (S5795)
- Remove unnecessary list() calls (S7504)
- Rename QTh to qt_cls (S117)
- Remove commented-out code blocks (S125)
- Add docstring to FallbackServiceInterface.emit_properties_changed (S1186)
2026-06-09 18:34:54 +03:00
e2d64cd464 | Add MPRIS integration for media key control
All checks were successful
SonarQube Code Quality Scan / SonarQube Scan (push) Successful in 1m48s
Implements org.mpris.MediaPlayer2 and org.mpris.MediaPlayer2.Player
D-Bus interfaces, allowing desktop environment media keys and tools
like playerctl to control playback (play, pause, next, previous)
and display now-playing metadata.

Also adds _FallbackServiceInterface, _FallbackVariant and
_FallbackNameFlag so all tests pass without dbus-fast installed;
the module gracefully degrades when the library is unavailable.
2026-06-09 18:29:51 +03:00
37d4a7d47e 🐛 | Make SearchWorker tests robust to Qt fallback environments
All checks were successful
SonarQube Code Quality Scan / SonarQube Scan (push) Successful in 1m46s
Replace SearchWorker signal .connect() with mock.MagicMock to handle
the case where the player module Signal binding is a plain function
(import fallback when PySide6 is unavailable in headless CI).
The MagicMock captures .emit() calls and works across all environments:
real Qt, conftest stubs, and player.py fallback paths.
2026-06-04 21:42:11 +03:00
dc3c735655 test: 100% coverage on core modules with headless CI support
Some checks failed
SonarQube Code Quality Scan / SonarQube Scan (push) Failing after 1m20s
- Fix dead exception handler in discord_rpc.py (unreachable DiscordNotFound)
- Replace QMediaPlayer=None stub with proper _StubQMediaPlayer in player.py
- Make AudioVisualizer color stops Qt-free (raw tuples instead of QColor)
- Add conftest QApplication creation check for headless CI detection
- Add test_gui_widgets.py _qt_available() guard for headless environments
- Add test_main.py (30 tests) for main.py entry point and env vars
- Add test_import_fallbacks.py (14 tests) for Qt import fallback paths
- Extend test_gui_helpers.py with _css, _get_thumbnail_nam, _cached_thumb_path tests
- Extend test_discord_rpc.py with direct _connect() test for DiscordNotFound
- Extend test_player_helpers.py with SearchWorker test-mode tests
- Ensure import fallback tests clean up sys.modules to avoid cross-test pollution

100% coverage achieved on: config.py, discord_rpc.py, main.py, music_db.py
2026-06-04 20:53:00 +03:00
5ce18506c1 🐛 | Skip widget tests when Qt is stubbed (headless CI)
All checks were successful
SonarQube Code Quality Scan / SonarQube Scan (push) Successful in 1m45s
2026-06-04 19:23:38 +03:00
6530911c28 | Add widget integration tests for SonarQube coverage
Some checks failed
SonarQube Code Quality Scan / SonarQube Scan (push) Failing after 1m22s
2026-06-04 19:08:48 +03:00
fb478d6612 🐛 | Fix SonarQube violations - use items() and remove assert True
All checks were successful
SonarQube Code Quality Scan / SonarQube Scan (push) Successful in 1m42s
2026-06-04 19:00:38 +03:00
3b6e4f8b4d 🐛 | Remove unused video_id from closure defaults 2026-06-04 18:57:31 +03:00
1f5d8dca0c 🐛 | Fix SonarQube dead code and improve coverage
All checks were successful
SonarQube Code Quality Scan / SonarQube Scan (push) Successful in 1m43s
2026-06-04 18:45:59 +03:00
daf9c5739c 🐛 | Code quality fixes
All checks were successful
SonarQube Code Quality Scan / SonarQube Scan (push) Successful in 1m43s
- config.py: move 'import shutil' to module level
- player.py: unify type hints, narrow except, add debug log
- discord_rpc.py: replace broad except Exception with specific types
- gui.py: remove unused import; replace lambda closures with method refs; fix closure scope bug; extract _populate_list_page() to remove duplicate code; add public accessors; make flush_volume public; add AudioVisualizer.reset_activity()
- tests: replace unused _f variable with Path.touch()
2026-06-04 18:27:44 +03:00
82a34a0a55 🐛 | Exclude signature_bootstrap from coverage to fix SonarQube CI
All checks were successful
SonarQube Code Quality Scan / SonarQube Scan (push) Successful in 1m44s
2026-06-04 18:13:56 +03:00
7e9f78ce88 🐛 | Fix prefetch bug (str vs int), move json import to module level, add missing type hints
Some checks failed
SonarQube Code Quality Scan / SonarQube Scan (push) Failing after 1m20s
2026-06-04 16:23:03 +03:00
d8ebd6186c 🐛 | Improve test coverage for SonarQube quality gate
Some checks failed
SonarQube Code Quality Scan / SonarQube Scan (push) Failing after 1m20s
- Restructure conftest to try real Qt first, fall back to stubs
  only if that fails — ensures try/except guards in player.py and
  gui.py are exercised in CI, improving new_coverage
- Add tests for _migrate_legacy error paths (JSONDecodeError,
  OSError, db migration) — config.py now 100% covered
- Add tests for _disconnect, _send_presence exception handlers —
  discord_rpc.py now 97% covered
- Add tests for _cleanup_path and _tmp_dir helpers — player.py
  coverage bumped to 33%
2026-06-03 19:35:20 +03:00
8597d03a1e 🐛 | Fix SonarQube issues
All checks were successful
SonarQube Code Quality Scan / SonarQube Scan (push) Successful in 1m42s
- Extract duplicated string literals into constants (S1192)
- Replace dict() with {} literal (S7498)
- Remove duplicate test_zero_ms (S4144)
- Remove/rename unused variables (S1481)
- Replace constant assert True with comment (S5914)
- Mark stub empty methods as intentional (S1186)
- Review 2 security hotspots as safe (S5443)
2026-06-03 19:14:22 +03:00
2870f790bd 🐛 | Fix tests
All checks were successful
SonarQube Code Quality Scan / SonarQube Scan (push) Successful in 1m44s
2026-06-03 19:05:17 +03:00
93f5239ef7 | Add tests
Some checks failed
SonarQube Code Quality Scan / SonarQube Scan (push) Failing after 2m37s
2026-06-03 18:53:24 +03:00
363ee732b4 | Add ability to load previous track
All checks were successful
SonarQube Code Quality Scan / SonarQube Scan (push) Successful in 26s
2026-06-01 21:29:53 +03:00
31ceb040ed 🐛 | Inform user if loading fails
All checks were successful
SonarQube Code Quality Scan / SonarQube Scan (push) Successful in 1m25s
2026-06-01 21:22:51 +03:00
5f417396ff 📝 | Update README.md
All checks were successful
SonarQube Code Quality Scan / SonarQube Scan (push) Successful in 27s
2026-05-31 23:38:45 +03:00
079afdf124 📝 | Update README.md
All checks were successful
SonarQube Code Quality Scan / SonarQube Scan (push) Successful in 24s
2026-05-31 23:12:25 +03:00
c0f1044144 🎉 | Project added
All checks were successful
SonarQube Code Quality Scan / SonarQube Scan (push) Successful in 3m36s
2026-05-31 23:03:55 +03:00
336616de82 Initial commit 2026-05-31 22:57:28 +03:00