feat: Add RadioBrowser integration alongside TuneIn support

- Refactors BMX service to support multiple radio providers
- Adds RadioBrowser.com API integration with search and browse
- Splits TuneIn logic into separate module for better organization
- Adds new web UI components for radio station discovery
- Includes new SVG icons for RadioBrowser branding
This commit is contained in:
Tobias Gesellchen
2026-05-18 22:34:26 +02:00
parent 8881adbede
commit b95bdae751
36 changed files with 2303 additions and 1718 deletions
+38 -1
View File
@@ -8,6 +8,7 @@ import (
"net"
"net/http"
"os"
"runtime/debug"
"time"
"github.com/gesellix/bose-soundtouch/pkg/service/soundtouchweb"
@@ -15,7 +16,39 @@ import (
"github.com/urfave/cli/v2"
)
var (
version = "dev"
commit = "unknown"
date = "unknown"
repoURL = "https://github.com/gesellix/bose-soundtouch"
)
func updateBuildInfo() {
if info, ok := debug.ReadBuildInfo(); ok {
if info.Main.Path != "" {
repoURL = "https://" + info.Main.Path
}
if info.Main.Version != "" && info.Main.Version != "(devel)" {
version = info.Main.Version
}
for _, setting := range info.Settings {
switch setting.Key {
case "vcs.revision":
commit = setting.Value
case "vcs.time":
if t, err := time.Parse(time.RFC3339, setting.Value); err == nil {
date = t.Format("2006-01-02 15:04:05")
}
}
}
}
}
func main() {
updateBuildInfo()
app := &cli.App{
Name: "soundtouch-web",
Usage: "Web UI for controlling Bose SoundTouch devices",
@@ -71,6 +104,10 @@ func main() {
// Create web app without templates (SPA mode)
webApp := soundtouchweb.NewWebApp()
webApp.Version = version
webApp.Commit = commit
webApp.Date = date
webApp.RepoURL = repoURL
discoveryService := soundtouchweb.NewDiscoveryService(ifaceName)
@@ -94,7 +131,7 @@ func main() {
r := chi.NewRouter()
webApp.Mount(r, discoveryService)
log.Printf("SoundTouch Web UI starting on http://%s", addr)
log.Printf("AfterTouch Web UI starting on http://%s", addr)
return http.ListenAndServe(addr, r)
},
+1 -1
View File
@@ -69,7 +69,7 @@ func TestSPARouting(t *testing.T) {
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>SoundTouch Control Center</title>
<title>AfterTouch Control Center</title>
</head>
<body>
<div id="app">SPA Content</div>