Stopping at full loop for exporting

This commit is contained in:
Kasper Rynning-Tønnesen
2018-10-23 12:43:22 +02:00
parent 74d5f958e5
commit e41b98fbdb
2 changed files with 6 additions and 6 deletions

View File

@@ -394,7 +394,7 @@ li.disabled span {
width: 76%; width: 76%;
} }
.import-soundcloud, .import-soundcloud:active, .import-soundcloud:visited, .export-soundcloud:visited { .import-soundcloud, .import-soundcloud:active, .import-soundcloud:visited, .export-soundcloud, .export-soundcloud:visited {
background: #f96200; background: #f96200;
} }

View File

@@ -608,11 +608,7 @@ var List = {
exportToSoundCloud: function(thisSong, i) { exportToSoundCloud: function(thisSong, i) {
console.log(thisSong, i); console.log(thisSong, i);
if(thisSong == undefined) { if(i >= full_playlist.length) {
if(full_playlist.length > 0) {
List.exportToSoundCloud(full_playlist[0], 1);
}
} else if(i != undefined && i == full_playlist.length) {
SC_player.post('/playlists', { SC_player.post('/playlists', {
playlist: { playlist: {
title: decodeURIComponent(channel.toLowerCase()) + ' - Zoff', title: decodeURIComponent(channel.toLowerCase()) + ' - Zoff',
@@ -624,6 +620,10 @@ var List = {
List.found = []; List.found = [];
List.not_found = []; List.not_found = [];
}); });
} else if(thisSong == undefined) {
if(full_playlist.length > 0) {
List.exportToSoundCloud(full_playlist[0], 1);
}
} else if(thisSong != undefined && i != undefined) { } else if(thisSong != undefined && i != undefined) {
var isFound = false; var isFound = false;
if(thisSong.source == "soundcloud") { if(thisSong.source == "soundcloud") {