Do not use /bmx for our custom endpoint (#115)

Follow-up for https://github.com/gesellix/Bose-SoundTouch/pull/114
This commit is contained in:
Tobias Gesellchen
2026-03-16 23:36:36 +01:00
committed by GitHub
parent 8d95e170f6
commit ad5344b309
5 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -268,7 +268,7 @@ func selectCustomRadio(c *cli.Context) error {
serviceURL := c.String("service-url")
encodedURL := base64.URLEncoding.EncodeToString([]byte(streamURL))
location := fmt.Sprintf("%s/bmx/custom/v1/playback/%s", serviceURL, encodedURL)
location := fmt.Sprintf("%s/custom/v1/playback/%s", serviceURL, encodedURL)
params := url.Values{}
if itemName != "" {
-1
View File
@@ -655,7 +655,6 @@ func setupRouter(server *handlers.Server) *chi.Mux {
r.Get("/tunein/v1/playback/episodes/{podcastID}", server.HandleTuneInPodcastInfo)
r.Get("/tunein/v1/playback/episode/{podcastID}", server.HandleTuneInPlaybackPodcast)
r.Post("/orion/v1/playback/station/{data}", server.HandleOrionPlayback)
r.Get("/custom/v1/playback/{encodedURL}", server.HandleCustomPlayback)
})
// Legacy or direct domain calls without /bmx prefix
+1 -1
View File
@@ -797,7 +797,7 @@ func customBMXHandler(w http.ResponseWriter, r *http.Request) {
func main() {
r := chi.NewRouter()
r.Get("/bmx/custom/endpoint", customBMXHandler)
r.Get("/custom/endpoint", customBMXHandler)
http.ListenAndServe(":8000", r)
}
```
+1 -1
View File
@@ -120,7 +120,7 @@ func TestCustomPlayback(t *testing.T) {
imageUrl := "http://example.com/img.jpg"
name := "Test Custom"
res, err := http.Get(ts.URL + "/bmx/custom/v1/playback/" + encodedURL + "?imageUrl=" + url.QueryEscape(imageUrl) + "&name=" + url.QueryEscape(name))
res, err := http.Get(ts.URL + "/custom/v1/playback/" + encodedURL + "?imageUrl=" + url.QueryEscape(imageUrl) + "&name=" + url.QueryEscape(name))
if err != nil {
t.Fatal(err)
}
-1
View File
@@ -27,7 +27,6 @@ func setupRouter(targetURL string, ds *datastore.DataStore) (*chi.Mux, *Server)
r.Get("/tunein/v1/playback/episodes/{podcastID}", server.HandleTuneInPodcastInfo)
r.Get("/tunein/v1/playback/episode/{podcastID}", server.HandleTuneInPlaybackPodcast)
r.Post("/orion/v1/playback/station/{data}", server.HandleOrionPlayback)
r.Get("/custom/v1/playback/{encodedURL}", server.HandleCustomPlayback)
})
// Legacy or direct domain calls without /bmx prefix