diff --git a/content/robotics/smallpeice/2017/soundtrack.md b/content/robotics/smallpeice/2017/soundtrack.md index 1f9d59b..8ea2ff6 100644 --- a/content/robotics/smallpeice/2017/soundtrack.md +++ b/content/robotics/smallpeice/2017/soundtrack.md @@ -6,5 +6,5 @@ At the arena, we had music playing in the background, through the competition st -{{% spotify "spotify:user:theorangeone97:playlist:4ZaS9NTwF1erqqpE1IxHlP" %}} +{{% spotify "theorangeone97" "4ZaS9NTwF1erqqpE1IxHlP" %}} diff --git a/layouts/shortcodes/spotify.html b/layouts/shortcodes/spotify.html index 0c657ac..7c8f7b5 100644 --- a/layouts/shortcodes/spotify.html +++ b/layouts/shortcodes/spotify.html @@ -1,16 +1,17 @@ -{{ $ident := .Get 0 }} +{{ $user := .Get 0 }} +{{ $playlist_id := .Get 1 }} -{{ $playlist := getJSON "http://spotify-public-proxy.theorangeone.net/playlist/" $ident }} +{{ $playlist := getJSON "http://spotify-public-proxy.theorangeone.net/v1/users/" $user "/playlists/" $playlist_id }}
Track | @@ -20,19 +21,21 @@|||
---|---|---|---|
{{ .name }} | -- {{ range $i, $e := .artists }}{{ if $i }}, {{ end }}{{ .name }}{{ end }} - | -{{ .album.name }} | -- - | -
{{ .name }} | ++ {{ range $i, $e := .artists }}{{ if $i }}, {{ end }}{{ .name }}{{ end }} + | +{{ .album.name }} | ++ + | +