Fixed issue with not all songs being added on export to YouTube

This commit is contained in:
Kasper Rynning-Tønnesen
2017-02-16 23:07:13 +01:00
parent 96070e2591
commit 4d6dffc35d
7 changed files with 118 additions and 100 deletions

View File

@@ -1079,14 +1079,14 @@ $("#clickme").click(function(){
$(document).on("click", "#listExport", function(e){
e.preventDefault();
Helper.log(full_playlist);
$("#playlist_loader_export").removeClass("hide");
$(".youtube_export_button").addClass("hide");
if(!youtube_authenticated){
var nonce = randomString(29);
window.callback = function(data) {
access_token_data_youtube = data;
if(access_token_data_youtube.state == nonce){
youtube_authenticated = true;
$("#playlist_loader_export").removeClass("hide");
$(".youtube_export_button").addClass("hide");
setTimeout(function(){
youtube_authenticated = false;
access_token_data_youtube = {};