15
server/ctrlsubsonic/handlers_unimplemented.go
Normal file
15
server/ctrlsubsonic/handlers_unimplemented.go
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
package ctrlsubsonic
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"go.senan.xyz/gonic/server/ctrlsubsonic/spec"
|
||||||
|
)
|
||||||
|
|
||||||
|
func (c *Controller) ServeGetPodcasts(r *http.Request) *spec.Response {
|
||||||
|
sub := spec.NewResponse()
|
||||||
|
sub.Podcasts = &spec.Podcasts{
|
||||||
|
List: []struct{}{},
|
||||||
|
}
|
||||||
|
return sub
|
||||||
|
}
|
||||||
@@ -44,6 +44,7 @@ type Response struct {
|
|||||||
PlayQueue *PlayQueue `xml:"playQueue" json:"playQueue,omitempty"`
|
PlayQueue *PlayQueue `xml:"playQueue" json:"playQueue,omitempty"`
|
||||||
JukeboxStatus *JukeboxStatus `xml:"jukeboxStatus" json:"jukeboxStatus,omitempty"`
|
JukeboxStatus *JukeboxStatus `xml:"jukeboxStatus" json:"jukeboxStatus,omitempty"`
|
||||||
JukeboxPlaylist *JukeboxPlaylist `xml:"jukeboxPlaylist" json:"jukeboxPlaylist,omitempty"`
|
JukeboxPlaylist *JukeboxPlaylist `xml:"jukeboxPlaylist" json:"jukeboxPlaylist,omitempty"`
|
||||||
|
Podcasts *Podcasts `xml:"podcasts" json:"podcasts,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewResponse() *Response {
|
func NewResponse() *Response {
|
||||||
@@ -285,3 +286,7 @@ type JukeboxPlaylist struct {
|
|||||||
List []*TrackChild `xml:"entry,omitempty" json:"entry,omitempty"`
|
List []*TrackChild `xml:"entry,omitempty" json:"entry,omitempty"`
|
||||||
JukeboxStatus
|
JukeboxStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Podcasts struct {
|
||||||
|
List []struct{} `xml:"channel" json:"channel"`
|
||||||
|
}
|
||||||
|
|||||||
@@ -189,6 +189,7 @@ func setupSubsonic(r *mux.Router, ctrl *ctrlsubsonic.Controller) {
|
|||||||
r.Handle("/getGenres{_:(?:\\.view)?}", ctrl.H(ctrl.ServeGetGenres))
|
r.Handle("/getGenres{_:(?:\\.view)?}", ctrl.H(ctrl.ServeGetGenres))
|
||||||
r.Handle("/getArtistInfo{_:(?:\\.view)?}", ctrl.H(ctrl.ServeGetArtistInfo))
|
r.Handle("/getArtistInfo{_:(?:\\.view)?}", ctrl.H(ctrl.ServeGetArtistInfo))
|
||||||
// ** begin unimplemented
|
// ** begin unimplemented
|
||||||
|
r.Handle("/getPodcasts{_:(?:\\.view)?}", ctrl.H(ctrl.ServeGetPodcasts))
|
||||||
// middlewares should be run for not found handler
|
// middlewares should be run for not found handler
|
||||||
// https://github.com/gorilla/mux/issues/416
|
// https://github.com/gorilla/mux/issues/416
|
||||||
notFoundHandler := ctrl.H(ctrl.ServeNotFound)
|
notFoundHandler := ctrl.H(ctrl.ServeNotFound)
|
||||||
|
|||||||
Reference in New Issue
Block a user