Trim metadata in spotify block
All checks were successful
ci/woodpecker/tag/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/tag/woodpecker Pipeline was successful
This commit is contained in:
parent
64908e4eb4
commit
b57b7cb9da
|
@ -2,10 +2,16 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
r "gitnet.fr/deblan/i3-blocks-go/rendering"
|
||||
"os"
|
||||
"os/exec"
|
||||
sos"
|
||||
"os/"
|
||||
"strings"
|
||||
|
||||
r "gitnet.fr/deblan/i3-blocks-gsrrindg
|
||||
r "gitnet.fr/deblan/i3-blocks-gsrrindg
|
||||
r "gitnet.fr/deblan/i3-blocks-gsrrindg
|
||||
r "gitnet.fr/deblan/i3-blocks-gsrrindg
|
||||
r "gitnet.fr/deblan/i3-blocks-gsrrindg
|
||||
r "gitnet.fr/deblan/i3-blocks-go/rendering"
|
||||
)
|
||||
|
||||
func GetMetadata(metadata string) string {
|
||||
|
@ -20,11 +26,15 @@ func GetMetadata(metadata string) string {
|
|||
}
|
||||
|
||||
func GetTitle() string {
|
||||
return GetMetadata("xesam:title")
|
||||
data := GetMetadata("xesam:title")
|
||||
|
||||
return strings.Trim(string(data), "\n")
|
||||
}
|
||||
|
||||
func GetArtist() string {
|
||||
return GetMetadata("xesam:artist")
|
||||
data := GetMetadata("xesam:artist")
|
||||
|
||||
return strings.Trim(string(data), "\n")
|
||||
}
|
||||
|
||||
func GetStatus() string {
|
||||
|
|
Loading…
Reference in a new issue