fix: display albums and artists on the search page, and also few css fixes
This commit is contained in:
19
utils/url.go
Normal file
19
utils/url.go
Normal file
@ -0,0 +1,19 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"net/url"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func TrimURL(u string) string {
|
||||
uu, err := url.Parse(u)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
if strings.HasPrefix(uu.Path, "/") {
|
||||
return uu.Path
|
||||
}
|
||||
|
||||
return "/" + uu.Path
|
||||
}
|
Reference in New Issue
Block a user