Add formatting output
Anirudh Oppiliappan x@icyphox.sh
Mon, 15 Nov 2021 19:13:11 +0530
1 files changed,
2 insertions(+),
3 deletions(-)
M
plugins/listenbrainz/nowplaying.go
→
plugins/listenbrainz/nowplaying.go
@@ -52,7 +52,7 @@ if len(li.Payload.Listens) != 0 {
// Now playing a track tm := li.Payload.Listens[0].TrackMetadata return fmt.Sprintf( - `%s is currently listening to "%s" by %s, from the album %s`, + "%s is currently listening to \"%s\" by \x02%s\x02, from the album \x02%s\x02", user, tm.TrackName, tm.ArtistName,@@ -69,11 +69,10 @@ if err != nil {
return "", err } - fmt.Println(li) tm := li.Payload.Listens[0].TrackMetadata listenedAt, _ := time.Parse(time.RFC1123, li.Payload.Listens[0].InsertedAt) return fmt.Sprintf( - `%s listened to "%s" by %s, from the album %s, %s`, + "%s listened to \"%s\" by \x02%s\x02, from the album \x02%s\x02, %s", user, tm.TrackName, tm.ArtistName,