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