Skip to content

Instantly share code, notes, and snippets.

View glouvigny's full-sized avatar

Guillaume Louvigny glouvigny

View GitHub Profile
let pause = function (ms) {
return new Promise(function (resolve, reject) {
setTimeout(function () {
return resolve(true);
}, ms);
});
};
let fetchArtists = async function (lastFmApiKey) {
let res = await fetch('https://ws.audioscrobbler.com/2.0/?method=library.getartists&api_key=' + lastFmApiKey + '&user=guillaumel&limit=500&format=json');
@glouvigny
glouvigny / dz_albums.php
Created September 21, 2016 06:54
Add albums from file system to Deezer, excepts /Root/Artist/Album/files.mp3 storage pattern
<?php
$basedir = '/Volumes/VERBATIM HD/Musique/';
$oauth_token = 'MY_DEEZER_OAUTH_TOKEN';
$artist_iterator = new DirectoryIterator($basedir);
function addToAccount($artist, $album) {
global $oauth_token;