I’m having inconsistency with fetching Spotify playlists through mpc, so I’m going to attempt to create a script using the Charts API.
http://charts.spotify.com/api/tracks/most_streamed/gb/daily/latest
Sample data:
{
"tracks":[
{
"date":"2013-12-15",
"country":"global",
"track_url":"https:\/\/play.spotify.com\/track\/7DyuZtvlGT0z5Xz8peiLN7",
"track_name":"I See Fire",
"artist_name":"Howard Shore",
"artist_url":"https:\/\/play.spotify.com\/artist\/6eUKZXaKkcviH0Ku9w2n3V",
"album_name":"The Hobbit: The Desolation of Smaug (Original Motion Picture Soundtrack)",
"album_url":"https:\/\/play.spotify.com\/album\/5kqgALc3cz9P3VclmSmHfr",
"artwork_url":"http:\/\/o.scdn.co\/300\/be7d523ea35aeb10f561712420d3429f0ec68eec",
"num_streams":515608,
"window_type": "daily"
},
{
"date":"2013-12-15",
"country":"global",
"track_url":"https:\/\/play.spotify.com\/track\/44GgIVlmRsD1qMWONOWOS3",
"track_name":"Waiting Game",
"artist_name":"BANKS",
"artist_url":"https:\/\/play.spotify.com\/artist\/2xe8IXgCTpwHE3eA9hTs4n",
"album_name":"LONDON",
"album_url":"https:\/\/play.spotify.com\/album\/4xG1FKMIQPGYRujVBtMAqm",
"artwork_url":"http:\/\/o.scdn.co\/300\/4027ebaa3c0ff4161020cb37a546f25929249166",
"num_streams":182325,
"window_type": "daily"
}
}
Any idea on how to save this a mpd playlist?