Commit Graph
47 Commits
Author SHA1 Message Date
Sansan 1acc757981 Fill the song cache when the settings menu is closed
Raising the cache size used to have no effect until the next song was
played. Downloads now start when the settings window closes, so clicking
the number up and down while it is open does not start any downloads.
2026-10-06 08:32:56 +02:00
Sansan 16724922ed Test that the song cache fills up to the cache size setting
Covers a cache size above 1: songs are preloaded until the setting is
reached, playing a song tops the cache up again, and the cache keeps
filling after a failed download once the server answers again.
2026-10-06 08:32:56 +02:00
Sansan c1fc24adf9 Release from the version in project.godot
The version now lives in project.godot (application/config/version)
and Settings.version reads it from there. The Build workflow tests and
exports on every push, and on main creates the tag, uploads the builds
and creates the Gitea release when that version has no tag yet. This
replaces gitea-release.yaml, which released when a branch named after
the version was pushed.

Godot setup moves into a local .gitea/actions/setup-godot action shared
by the test and build jobs, and Godot is updated to 4.7.2 to match the
editor the project is made with.
2026-10-06 08:32:56 +02:00
Sansan f67dccbf52 Retry failed song downloads instead of getting stuck
MusicServerClient functions now take an optional on_failed callback,
called when a request fails or returns invalid JSON. Before, a failed
request was silently dropped, so a failure while preloading a song left
Playlist.is_song_downloading set forever and no more songs were fetched.

Song fetching retries the step that failed (download, queue or info)
every song_fetch_retry_seconds, so the server and the game keep the same
playlist.
2026-10-06 08:32:56 +02:00
Sansan c985a6ce5b Replace the broken test suite with working GdUnit4 tests
The previous tests never compiled: they used GUT's assert functions,
Godot 3 APIs and reassigned autoload functions, so no test ran.

- 90 tests: unit tests for the playlist, songs, player scoring, time
  formatting, search and the server client, plus integration tests
  that run MainWindow and SyncWindow against a fake server
- Keybind tests check that Alt+<number> and Ctrl+Alt+<number> keep
  following the player rows while players are added and removed
- run_tests.sh finds Godot and runs the suite headless (~10 seconds)
- CI runs the tests before the build job in gitea-build.yaml; the
  separate test.yml used a GitHub action that does not exist
- GdUnit4 is committed instead of ignored, since the project enables
  it, and .gitea/ is no longer ignored
- Exported builds leave out tests/ and addons/gdUnit4/
2026-10-06 08:32:56 +02:00
Sansan 56e9fe66d3 Move server calls to MusicServerClient and give players stable ids
Server requests move out of Settings into a new MusicServerClient
autoload with one function per endpoint. It sends requests through a
swappable HttpTransport so tests can fake the server, and it frees its
HTTPRequest nodes after use.

Players now have a UUID that never changes. Their position in
Settings.player_array is only used for the Alt+<number> keybinds.
Previously the position doubled as the id, so removing a player made
points and wins land on the wrong player, and could delete another
player's point from a song.

Also fixes:
- format_time showed 59.6 seconds as "00:60"
- searches containing regex characters such as "Q*bert" broke search
- SongObject and PlayerObject were Nodes that were never freed; they
  are now RefCounted
- search matching is split out of the UI code into find_matches()
2026-10-06 08:32:55 +02:00
Sansan ab338b0696 Add GdUnit4 testing framework with comprehensive test coverage
- Add GdUnit4 v6.2.1 framework in addons/gdUnit4/
- Create test directory structure (tests/unit/, tests/integration/, tests/mocks/)
- Add unit tests for MusicPlayer.gd (8 tests)
- Add unit tests for MainWindow.gd (15+ tests)
- Add unit tests for Settings.gd (5 tests)
- Add unit tests for Playlist.gd (11 tests)
- Add integration tests for full flow (10+ tests)
- Add MockHTTPRequest for HTTP request mocking
- Add TestHelpers with utility functions
- Add Gitea Actions CI workflow (.gitea/workflows/test.yml)
- Add .runsettings for GdUnit4 CLI configuration
- Add run_tests.sh for convenient test execution
- Add TESTING.md with comprehensive documentation
- Add TESTING_PLAN.md with implementation details
- Update .gitignore for test artifacts
- Enable GdUnit4 plugin in project.godot

Features:
- Test button functionality (play, pause, search, sync, etc.)
- Mock REST API requests to server
- Test complete application flows
- Run tests in CI (headless mode)
- Run tests in GUI for visual feedback
- JUnit XML and HTML test reports

Generated by OpenCode AI assistant.
2026-10-06 08:32:55 +02:00
Sansan 9a91d969bd Merge pull request 'Made improvements to the Search window, Made small changes to the inspiration list scrolling, Made small changes to the player list, Changed the term game to soundtrack, #28: Made changes to the sync window' (#37) from develop into main
Build / build (push) Successful in 1m6s
Reviewed-on: #37
2026-10-05 22:53:08 +02:00
Sansan 8da6fc442f Made improvements to the Search window, Made small changes to the inspiration list scrolling, Made small changes to the player list, Changed the term game to soundtrack, #28: Made changes to the sync window
Build / build (push) Successful in 1m14s
Publish / build (push) Successful in 1m10s
2026-09-26 16:21:02 +02:00
Sansan 235bdcbcb5 #34: Fixed bug in Character Select when clicking or scrolling
Build / build (push) Successful in 1m6s
2026-05-17 12:14:07 +02:00
Sansan 6989b53dda Merge pull request 'Fixed workflow' (#35) from 1.8.0 into main
Build / build (push) Successful in 1m5s
Publish / build (push) Successful in 1m13s
Reviewed-on: #35
2026-05-16 17:50:05 +02:00
Sansan 899e99864f #9 #32 #33 : New winner screen, new setting for hide beginning and fixed bug
Build / build (push) Successful in 1m25s
2026-05-16 17:46:09 +02:00
Sansan 84608c95c2 Fixed workflow
Publish / build (push) Successful in 1m13s
2026-05-15 11:03:20 +02:00
Sansan acd8d65b95 #29 Small fixes
Build / build (push) Successful in 1m6s
Publish / build (push) Failing after 1m16s
2026-05-15 10:52:26 +02:00
Sansan d957c02373 #14 #15 #29 #31 : Added qr, added more settings, added keymap, changed about page.
Build / build (push) Successful in 1m5s
2026-05-14 12:24:50 +02:00
Sansan 0316df2f95 #14,#15,#29,#31: Added qr, added more settings, added keymap, changed about page.
Build / build (push) Successful in 1m10s
2026-05-14 12:18:42 +02:00
Sansan b4ba96cf63 #20 #24 Winnersong can be stopped. Inspirationlist speed can be changed. Some other small fixes
Build / build (push) Successful in 1m36s
2025-12-27 14:05:56 +01:00
Sansan 2a32cc34ef Sync result can be seen multiple times
Build / build (push) Successful in 1m19s
Publish / build (push) Successful in 1m33s
2025-11-15 15:02:21 +01:00
Sansan bae5831a3e #22: Now block add player if player name is empty
Build / build (push) Successful in 1m21s
#23: Add a log for when points are given to players
#25: Fixed some graphical stuff
#26: Changed so the same character can be on a song multiple times
#27: Turning off statistics after win
2025-11-15 14:53:51 +01:00
Sansan c6ed3c8e53 #17 #18: Removed Debug text in release and fixed bug with new character select screen
Build / build (push) Successful in 1m31s
Publish / build (push) Successful in 1m32s
2025-11-13 18:17:25 +01:00
Sansan 166705f2ab #4 #5 Added a new character select window that now fetches images from the server
Publish / build (push) Successful in 2m39s
Build / build (push) Successful in 1m31s
2025-11-07 20:46:45 +01:00
Sansan 734a463db9 #8: Added functionality to cache more than one song
Build / build (push) Successful in 1m25s
2025-10-26 20:48:35 +01:00
Sansan 4e6e37775d #2 #6 #7 Added a new sync screen that shows progress during sync
Build / build (push) Successful in 1m22s
2025-09-19 22:15:37 +02:00
Sansan 3e4d417b4f #1: Fixed bug with inspiration list and search list not updating on sync and server changed
Build / build (push) Successful in 1m30s
2025-08-24 12:00:29 +02:00
Sansan f46e742cdc Fix for macOS build
Build / build (push) Successful in 1m22s
Publish / build (push) Successful in 1m37s
2025-06-07 23:40:55 +02:00
Sansan f2b362067a Uppgraded to 4.4 and added:d gitea-ci
Build / build (push) Failing after 1m22s
2025-06-07 23:23:04 +02:00
Sansan 6d008b7715 Removed id from player name 2024-12-29 09:51:48 +01:00
Sansan 23f2ed11eb Updated how players and song list works
Made many changes with caching, how players works, added sound effects
and animations any many more things
2024-12-27 20:35:28 +01:00
Sansan c4a7d743d3 Added auto repeat and made some small fixes 2024-10-20 20:28:06 +02:00
Sansan e8171d81a9 Fixed light icons. Made the search "better". Added more shortcuts and tried to fix som bugs. 2024-08-15 20:10:22 +02:00
Sansan 1a7b371161 Mini fixes 2024-06-12 22:23:26 +02:00
Sansan 2f12c1e25c Added icons, a lot of refactoring and optimising 2024-06-12 22:20:33 +02:00
Sansan f0b57981bc Changed path for sound test 2024-05-30 17:47:49 +02:00
Sansan d43a1c7df6 Fixed settings and updated player view. Fixed many other smaler things 2024-05-19 13:39:18 +02:00
Sansan 0d0b5280f8 Merge branch 'main' of https://gitea.sanplex.tech/Sansan/MusicPlayer 2024-05-18 13:58:53 +02:00
Sansan b36e2271a8 Fixes 2024-05-18 13:57:08 +02:00
Sansan c5e6366760 Added shortcuts. Added dialog for winner. Started cleaning code. 2023-09-11 21:20:48 +02:00
Sansan 724455b232 Added hopping between songs. Added settings menu, not finished. 2023-09-10 22:37:57 +02:00
Sansan c9ea40215d Fixed sounds effects with points. Fixed buttons statistics and about 2023-09-08 22:14:54 +02:00
Sansan 050d19039c Fixed add player process where name can be set. Added signals for points. Added settings file. Changed some shortcuts. 2023-09-07 21:55:31 +02:00
Sansan 5b6169ed6c Changed Play/Pause button. Fixed sync games. Fixed sound test, both local and online. 2023-09-03 21:32:30 +02:00
Sansan 90ce661982 Added some buttons and added search view 2023-09-02 23:14:19 +02:00
Sansan 1045bf2f9e Fixed auto scrolling to inspiration. Fixed show answer changes song list. Started working on some colors 2023-09-02 14:05:41 +02:00
Sansan 3fabf45985 Added functionallity to some buttons. Hides answer from start. Updated song que list. 2023-09-01 22:12:24 +02:00
Sansan c15afc3dc5 Added volume bar and song list and refactored character select 2023-08-29 21:06:19 +02:00
Sansan a48fc04e3b Added media player and character select and started some other stuff 2023-08-27 21:34:02 +02:00
Sansan aad5f3d421 First commit
* Can open dir and play song
* Can fetch song from server and show game
* Can fetch list of games
2023-03-18 21:17:04 +01:00