- New /api/v1 endpoints: GET /soundtracks, /soundtracks/{uuid},
/songs/{uuid} and /songs/{uuid}/file (streams the song, Range support,
locked during sync)
- UUIDs added to every response with soundtracks or songs: queue info and
list (SoundtrackUuid, SongUuid) and statistics (soundtrack_uuid,
song_uuid). Existing fields stay for backward compatibility
- Play counts and broken-song removal use song UUIDs instead of
soundtrack ID + song name, so songs with the same name are counted
separately
- Statistics return an empty song list for soundtracks without songs
instead of a single empty entry
- The legacy .id file cleanup stays until Phase 4 (#31)
Closes #29
119 lines
3.8 KiB
Go
119 lines
3.8 KiB
Go
package backend
|
|
|
|
type VersionData struct {
|
|
Version string `json:"version" example:"1.0.0"`
|
|
Changelog []string `json:"changelog" example:"[\"Initial release\",\"Bug fixes\"]"`
|
|
}
|
|
|
|
var data = []VersionData{
|
|
{
|
|
Version: "5.0.0",
|
|
Changelog: []string{
|
|
"#9 - Major routes refactor and expansion",
|
|
"#15 - Added API for statistics",
|
|
"#16 - Upgrade Echo framework from v4 to v5",
|
|
"#17 - Add Zap structured logging framework",
|
|
"#18 - Add OpenAPI/Swagger documentation",
|
|
"#19 - Replace Tailwind CSS with pure CSS",
|
|
"#20 - Change domain from sanplex.tech to sanplex.xyz",
|
|
"#21 - Refactor handlers into domain-specific files",
|
|
"#22 - Change VersionData Changelog from string to string array",
|
|
"#23 - Update all dependencies to latest versions",
|
|
"#29 - UUIDs in API responses, new soundtrack and song endpoints by UUID",
|
|
"Added search cache backend",
|
|
"Backend sync improvements",
|
|
"Faster sync that skips unchanged soundtracks",
|
|
"Security and stability fixes",
|
|
},
|
|
},
|
|
{
|
|
Version: "4.5.0",
|
|
Changelog: []string{
|
|
"#1 - Created request to check newest version of the app",
|
|
"#2 - Added request to download the newest version of the app",
|
|
"#3 - Added request to check progress during sync",
|
|
"#4 - Now blocking all request while sync is in progress",
|
|
"#5 - Implemented ants for thread pooling",
|
|
"#6 - Changed the sync request to now only start the sync",
|
|
},
|
|
},
|
|
{
|
|
Version: "4.0.0",
|
|
Changelog: []string{
|
|
"Changed framework from gin to Echo",
|
|
"Reorganized the code",
|
|
"Implemented sqlc",
|
|
"Added support to send character images from the server",
|
|
"Added function to create a new database of no one exists",
|
|
},
|
|
},
|
|
{
|
|
Version: "3.2",
|
|
Changelog: []string{"Upgraded Go version and the version of all dependencies. Fixed som more bugs."},
|
|
},
|
|
{
|
|
Version: "3.1",
|
|
Changelog: []string{"Fixed some bugs with songs not found made the application crash. Now checking if song exists and if not, remove song from DB and find another one. Frontend is now decoupled from the backend."},
|
|
},
|
|
{
|
|
Version: "3.0",
|
|
Changelog: []string{"Changed routing framework from mux to Gin. Swagger doc is now included in the application. A fronted can now be hosted from the application."},
|
|
},
|
|
{
|
|
Version: "2.3.0",
|
|
Changelog: []string{"Images should not be included in the database, removes songs where the path doesn't work."},
|
|
},
|
|
{
|
|
Version: "2.2.0",
|
|
Changelog: []string{"Changed the structure of the whole application, should be no changes to functionality."},
|
|
},
|
|
{
|
|
Version: "2.1.4",
|
|
Changelog: []string{"Game list should now be sorted, a new endpoint with the game list in random order have been added."},
|
|
},
|
|
{
|
|
Version: "2.1.3",
|
|
Changelog: []string{"Added a check to see if song exists before returning it, if not a new song will be picked up."},
|
|
},
|
|
{
|
|
Version: "2.1.2",
|
|
Changelog: []string{"Added test server to swagger file."},
|
|
},
|
|
{
|
|
Version: "2.1.1",
|
|
Changelog: []string{"Fixed bug where wrong song was showed as currently played."},
|
|
},
|
|
{
|
|
Version: "2.1.0",
|
|
Changelog: []string{
|
|
"Added /addQue to add the last received song to the songQue.",
|
|
"Changed /rand and /rand/low to not add song to the que.",
|
|
"Changed /next to not call /rand when the end of the que is reached, instead the last song in the que will be resent.",
|
|
},
|
|
},
|
|
{
|
|
Version: "2.0.3",
|
|
Changelog: []string{"Another small change that should fix the caching problem."},
|
|
},
|
|
{
|
|
Version: "2.0.2",
|
|
Changelog: []string{"Hopefully fixed the caching problem with random."},
|
|
},
|
|
{
|
|
Version: "2.0.1",
|
|
Changelog: []string{"Fixed CORS"},
|
|
},
|
|
{
|
|
Version: "2.0.0",
|
|
Changelog: []string{"Rebuilt the application in Go."},
|
|
},
|
|
}
|
|
|
|
func GetLatestVersion() VersionData {
|
|
return data[0]
|
|
}
|
|
|
|
func GetVersionHistory() []VersionData {
|
|
return data
|
|
}
|