bugfixes reply in Friendica 3/2022 and image download

This commit is contained in:
LubuWest 2022-03-13 21:22:08 +01:00
commit 48a904b8c0
15 changed files with 909 additions and 855 deletions

View file

@ -58,16 +58,16 @@ StackView{
if(albums.indexOf(fotorectangle.newimages[i].album)==-1){
filesystem.Directory=root.login.imagestore+"/albums";
filesystem.makeDir(fotorectangle.newimages[i].album)}
//ownimagelist.push(root.login.server+"/api/friendica/photo?scale='0'&photo_id="+fotorectangle.newimages[i].id);
ownimagelist.push(root.login.server+"/api/friendica/photo?photo_id="+fotorectangle.newimages[i].id);
}
Imagejs.dataRequest(login,fotorectangle.newimages[0],db,xhr,fotorectangle);
//Imagejs.dataRequest(login,fotorectangle.newimages[0],db,xhr,fotorectangle);
})
// xhr.setLogin(login.username+":"+Qt.atob(login.password));
// xhr.setImagedir(login.imagestore);
// xhr.setFilelist(ownimagelist);
// xhr.setDownloadtype("picturelist");
// xhr.getlist();
xhr.setLogin(login.username+":"+Qt.atob(login.password));
xhr.setImagedir(login.imagestore);
print("ownimagelist "+JSON.stringify(ownimagelist))
xhr.setFilelist(ownimagelist);
xhr.setDownloadtype("picturelist");
xhr.getlist();
newImagesProgress.visible=true
}
}
@ -78,7 +78,7 @@ StackView{
fotorectangle.newimages=[];fotorectangle.currentimageno=0
}else{
// download next image
Imagejs.dataRequest(login,fotorectangle.newimages[currentimageno],db,xhr,fotorectangle)
//Imagejs.dataRequest(login,fotorectangle.newimages[currentimageno],db,xhr,fotorectangle)
}
}
@ -95,8 +95,8 @@ StackView{
}
function onError(data,url,api,code){
if(data=="picturelist"){
var requestid=url.substring(url.lastIndexOf("=")+1);
Imagejs.dataRequest(login,requestid,db,xhr,fotorectangle);
// var requestid=api.substring(api.lastIndexOf("=")+1);
// Imagejs.dataRequest(login,requestid,db,xhr,fotorectangle);
fotorectangle.currentimageno=fotorectangle.currentimageno+1
} else if (data=="picture"){
Helperjs.deleteData(root.db,"imageData",root.login.username,function(){