add some unimplemented routes
This commit is contained in:
@@ -211,3 +211,11 @@ func (c *Controller) ServeDeletePlaylist(r *http.Request) *spec.Response {
|
||||
Delete(&model.Playlist{})
|
||||
return spec.NewResponse()
|
||||
}
|
||||
|
||||
func (c *Controller) ServeGetPlayQueue(r *http.Request) *spec.Response {
|
||||
return spec.NewResponse()
|
||||
}
|
||||
|
||||
func (c *Controller) ServeSavePlayQueue(r *http.Request) *spec.Response {
|
||||
return spec.NewResponse()
|
||||
}
|
||||
|
||||
28
server/ctrlsubsonic/handlers_unimplemented.go
Normal file
28
server/ctrlsubsonic/handlers_unimplemented.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package ctrlsubsonic
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"senan.xyz/g/gonic/server/ctrlsubsonic/spec"
|
||||
)
|
||||
|
||||
// NOTE: when these are implemented, they should be moved to their
|
||||
// respective _by_folder or _by_tag file
|
||||
|
||||
func (c *Controller) ServeGetArtistInfo(r *http.Request) *spec.Response {
|
||||
sub := spec.NewResponse()
|
||||
sub.ArtistInfo = &spec.ArtistInfo{}
|
||||
return sub
|
||||
}
|
||||
|
||||
func (c *Controller) ServeGetArtistInfoTwo(r *http.Request) *spec.Response {
|
||||
sub := spec.NewResponse()
|
||||
sub.ArtistInfoTwo = &spec.ArtistInfo{}
|
||||
return sub
|
||||
}
|
||||
|
||||
func (c *Controller) ServeGetGenres(r *http.Request) *spec.Response {
|
||||
sub := spec.NewResponse()
|
||||
sub.Genres = &spec.Genres{}
|
||||
return sub
|
||||
}
|
||||
@@ -36,6 +36,9 @@ type Response struct {
|
||||
User *User `xml:"user" json:"user,omitempty"`
|
||||
Playlists *Playlists `xml:"playlists" json:"playlists,omitempty"`
|
||||
Playlist *Playlist `xml:"playlist" json:"playlist,omitempty"`
|
||||
ArtistInfo *ArtistInfo `xml:"artistInfo" json:"artistInfo,omitempty"`
|
||||
ArtistInfoTwo *ArtistInfo `xml:"artistInfo2" json:"artistInfo2,omitempty"`
|
||||
Genres *Genres `xml:"genres" json:"genres,omitempty"`
|
||||
}
|
||||
|
||||
func NewResponse() *Response {
|
||||
@@ -102,7 +105,7 @@ type Album struct {
|
||||
}
|
||||
|
||||
type RandomTracks struct {
|
||||
Tracks []*TrackChild `xml:"song" json:"song"`
|
||||
Tracks []*TrackChild `xml:"song" json:"song"`
|
||||
}
|
||||
|
||||
type TrackChild struct {
|
||||
@@ -222,3 +225,27 @@ type Playlist struct {
|
||||
Public bool `xml:"public,attr" json:"public,omitempty"`
|
||||
List []*TrackChild `xml:"entry" json:"entry,omitempty"`
|
||||
}
|
||||
|
||||
type SimilarArtist struct {
|
||||
ID string `xml:"id,attr" json:"id"`
|
||||
Name string `xml:"name,attr" json:"name"`
|
||||
}
|
||||
|
||||
type ArtistInfo struct {
|
||||
Biography string `xml:"biography" json:"biography"`
|
||||
MusicBrainzID string `xml:"musicBrainzId" json:"musicBrainzId"`
|
||||
LastFMURL string `xml:"lastFmUrl" json:"lastFmUrl"`
|
||||
SmallImageURL string `xml:"smallImageUrl" json:"smallImageUrl"`
|
||||
MediumImageURL string `xml:"mediumImageUrl" json:"mediumImageUrl"`
|
||||
LargeImageURL string `xml:"largeImageUrl" json:"largeImageUrl"`
|
||||
SimilarArtist []*SimilarArtist `xml:"similarArtist" json:"similarArtist"`
|
||||
}
|
||||
|
||||
type Genre struct {
|
||||
SongCount string `xml:"songCount,attr"`
|
||||
AlbumCount string `xml:"albumCount,attr"`
|
||||
}
|
||||
|
||||
type Genres struct {
|
||||
Genre []*Genres `xml:"genre" json:"genre"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user