|
@@ -453,7 +453,7 @@
|
|
|
|
|
|
function returnToPreviousState(){
|
|
function returnToPreviousState(){
|
|
var inputFiles = ao_module_loadInputFiles();
|
|
var inputFiles = ao_module_loadInputFiles();
|
|
- if (inputFiles == null){
|
|
|
|
|
|
+ if (inputFiles == null || (inputFiles.path != undefined && inputFiles.pfp != undefined)){
|
|
//It doesn't seems like is an input file.
|
|
//It doesn't seems like is an input file.
|
|
//Fall back to legacy process
|
|
//Fall back to legacy process
|
|
var hash = window.location.hash;
|
|
var hash = window.location.hash;
|
|
@@ -468,7 +468,7 @@
|
|
if (currentPath != ""){
|
|
if (currentPath != ""){
|
|
//Create a dummy folder and trick the system to load to the previous states
|
|
//Create a dummy folder and trick the system to load to the previous states
|
|
var a = '<div></div>';
|
|
var a = '<div></div>';
|
|
- a = $(a).attr("filepath",currentPath);
|
|
|
|
|
|
+ a = $(a).attr("filepath",encodeURIComponent(currentPath));
|
|
openFolder(a[0],{
|
|
openFolder(a[0],{
|
|
playIDAfterOpen: playingFileDetail[0],
|
|
playIDAfterOpen: playingFileDetail[0],
|
|
startPaused: initPauseState}
|
|
startPaused: initPauseState}
|
|
@@ -2283,13 +2283,11 @@
|
|
|
|
|
|
//Check if auto playback is required. If yes, play it with the given filepath.
|
|
//Check if auto playback is required. If yes, play it with the given filepath.
|
|
if (playIDAfterOpen != -1){
|
|
if (playIDAfterOpen != -1){
|
|
- $(".mainList.item").each(function(){
|
|
|
|
- if ($(this).attr("id") == playIDAfterOpen){
|
|
|
|
- //This is the file that require to playback after the folder loaded
|
|
|
|
- playSong($(this).find(".ts.header.selectable"),startPaused);
|
|
|
|
- setTimeout(resizeQuickAdjust,500);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ let targetSongItem = $("#" + playIDAfterOpen);
|
|
|
|
+ if (targetSongItem.length > 0){
|
|
|
|
+ playSong($(targetSongItem).find(".ui.header.selectable"),startPaused);
|
|
|
|
+ setTimeout(resizeQuickAdjust,500);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
//Load thumbnail for song in list
|
|
//Load thumbnail for song in list
|