Created
August 30, 2012 09:47
-
-
Save SimonGivre/3525006 to your computer and use it in GitHub Desktop.
put.io JS to convert into MP4 every file of folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log($('.filelist .file-name .ftype:contains(video)').length + ' files to convert'); | |
var cpt=0; | |
$('.filelist .file-name .ftype:contains(video)').each(function(){ | |
var row = $(this).prev(); | |
var id = row.attr('href').substring(row.attr('href').lastIndexOf('/')+1); | |
$.post('/v2/files/'+id+'/mp4',function(data){ | |
console.log(data.status); | |
if(data.status=="OK") cpt++; | |
}); | |
}); | |
setTimeout("console.log(cpt);",5000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment