Scrobble working!!! I mean, iTunes scrobble, not Last.FM (for now)
This commit is contained in:
@@ -29,8 +29,11 @@ func (c *BaseAPIController) ParamString(param string) string {
|
||||
return c.Input().Get(param)
|
||||
}
|
||||
|
||||
func (c *BaseAPIController) ParamTime(param string) time.Time {
|
||||
func (c *BaseAPIController) ParamTime(param string, def time.Time) time.Time {
|
||||
var value int64
|
||||
if c.Input().Get(param) == "" {
|
||||
return def
|
||||
}
|
||||
c.Ctx.Input.Bind(&value, param)
|
||||
return utils.ToTime(value)
|
||||
}
|
||||
@@ -41,6 +44,12 @@ func (c *BaseAPIController) ParamInt(param string, def int) int {
|
||||
return value
|
||||
}
|
||||
|
||||
func (c *BaseAPIController) ParamBool(param string, def bool) bool {
|
||||
value := def
|
||||
c.Ctx.Input.Bind(&value, param)
|
||||
return value
|
||||
}
|
||||
|
||||
func (c *BaseAPIController) SendError(errorCode int, message ...interface{}) {
|
||||
response := responses.Subsonic{Version: beego.AppConfig.String("apiVersion"), Status: "fail"}
|
||||
var msg string
|
||||
|
||||
Reference in New Issue
Block a user