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 }}
- +

{{ $playlist.name }}

- + @@ -20,19 +21,21 @@ - {{ range sort $playlist.tracks "name" }} - - - - - - + {{ range sort $playlist.tracks.items "track.name" }} + {{ with .track }} + + + + + + + {{ end }} {{ end }}
View playlist on SpotifyView playlist on Spotify
Track
{{ .name }} - {{ range $i, $e := .artists }}{{ if $i }}, {{ end }}{{ .name }}{{ end }} - {{ .album.name }} - -
{{ .name }} + {{ range $i, $e := .artists }}{{ if $i }}, {{ end }}{{ .name }}{{ end }} + {{ .album.name }} + +