mirror of
https://github.com/navidrome/navidrome.git
synced 2026-02-02 06:24:14 +00:00
Workaround to detect empty dates in some Subsonic clients
This commit is contained in:
parent
a53e622cb4
commit
ab7dd56421
@ -49,7 +49,11 @@ func ParamTime(r *http.Request, param string, def time.Time) time.Time {
|
||||
if err != nil {
|
||||
return def
|
||||
}
|
||||
return ToTime(value)
|
||||
t := ToTime(value)
|
||||
if t.Before(time.Date(1970, time.January, 2, 0, 0, 0, 0, time.UTC)) {
|
||||
return def
|
||||
}
|
||||
return t
|
||||
}
|
||||
|
||||
func ParamInt(r *http.Request, param string, def int) int {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user