Polishing
This commit is contained in:
+2
-3
@@ -20,7 +20,7 @@ func (c *BrowsingController) Prepare() {
|
||||
utils.ResolveDependencies(&c.browser)
|
||||
}
|
||||
|
||||
func (c *BrowsingController) GetMediaFolders() {
|
||||
func (c *BrowsingController) GetMusicFolders() {
|
||||
mediaFolderList, _ := c.browser.MediaFolders()
|
||||
folders := make([]responses.MusicFolder, len(mediaFolderList))
|
||||
for i, f := range mediaFolderList {
|
||||
@@ -32,7 +32,6 @@ func (c *BrowsingController) GetMediaFolders() {
|
||||
c.SendResponse(response)
|
||||
}
|
||||
|
||||
// TODO: Shortcuts amd validate musicFolder parameter
|
||||
func (c *BrowsingController) GetIndexes() {
|
||||
ifModifiedSince := c.ParamTime("ifModifiedSince", time.Time{})
|
||||
|
||||
@@ -62,7 +61,7 @@ func (c *BrowsingController) GetIndexes() {
|
||||
c.SendResponse(response)
|
||||
}
|
||||
|
||||
func (c *BrowsingController) GetDirectory() {
|
||||
func (c *BrowsingController) GetMusicDirectory() {
|
||||
id := c.RequiredParamString("id", "id parameter required")
|
||||
|
||||
response := c.NewEmpty()
|
||||
|
||||
@@ -31,7 +31,7 @@ func (c *MediaRetrievalController) GetAvatar() {
|
||||
io.Copy(c.Ctx.ResponseWriter, f)
|
||||
}
|
||||
|
||||
func (c *MediaRetrievalController) GetCover() {
|
||||
func (c *MediaRetrievalController) GetCoverArt() {
|
||||
id := c.RequiredParamString("id", "id parameter required")
|
||||
size := c.ParamInt("size", 0)
|
||||
|
||||
|
||||
+5
-5
@@ -19,7 +19,7 @@ func (c *PlaylistsController) Prepare() {
|
||||
utils.ResolveDependencies(&c.pls)
|
||||
}
|
||||
|
||||
func (c *PlaylistsController) GetAll() {
|
||||
func (c *PlaylistsController) GetPlaylists() {
|
||||
allPls, err := c.pls.GetAll()
|
||||
if err != nil {
|
||||
beego.Error(err)
|
||||
@@ -40,7 +40,7 @@ func (c *PlaylistsController) GetAll() {
|
||||
c.SendResponse(response)
|
||||
}
|
||||
|
||||
func (c *PlaylistsController) Get() {
|
||||
func (c *PlaylistsController) GetPlaylist() {
|
||||
id := c.RequiredParamString("id", "id parameter required")
|
||||
|
||||
pinfo, err := c.pls.Get(id)
|
||||
@@ -58,7 +58,7 @@ func (c *PlaylistsController) Get() {
|
||||
c.SendResponse(response)
|
||||
}
|
||||
|
||||
func (c *PlaylistsController) Create() {
|
||||
func (c *PlaylistsController) CreatePlaylist() {
|
||||
songIds := c.RequiredParamStrings("songId", "Required parameter songId is missing")
|
||||
name := c.RequiredParamString("name", "Required parameter name is missing")
|
||||
err := c.pls.Create(name, songIds)
|
||||
@@ -69,7 +69,7 @@ func (c *PlaylistsController) Create() {
|
||||
c.SendEmptyResponse()
|
||||
}
|
||||
|
||||
func (c *PlaylistsController) Delete() {
|
||||
func (c *PlaylistsController) DeletePlaylist() {
|
||||
id := c.RequiredParamString("id", "Required parameter id is missing")
|
||||
err := c.pls.Delete(id)
|
||||
if err != nil {
|
||||
@@ -79,7 +79,7 @@ func (c *PlaylistsController) Delete() {
|
||||
c.SendEmptyResponse()
|
||||
}
|
||||
|
||||
func (c *PlaylistsController) Update() {
|
||||
func (c *PlaylistsController) UpdatePlaylist() {
|
||||
playlistId := c.RequiredParamString("playlistId", "Required parameter playlistId is missing")
|
||||
songsToAdd := c.ParamStrings("songIdToAdd")
|
||||
songIndexesToRemove := c.ParamInts("songIndexToRemove")
|
||||
|
||||
Reference in New Issue
Block a user