Aborting downloads = paused
-
Bump bump - the snippet in the last post demonstates the issue.
-
@d-healey Hi, I tried your snippet and faced the same issue. I wish I could be of some help but I didn't find any solution.
As you said it seems that the file won't be cleared if its state is not set to 'isFinished'.I recently watched your c++ tinkering video and started to take a look at HISE's source code, so here it is :
Tell me if I'm completely wrong, but in ScriptingApiObjects.cpp line 649 is this function :bool ScriptingObjects::ScriptDownloadObject::abort() { shouldAbort.store(true); return stop(); }
Wouldn't it be possible to add something like that to set the aborted download to Finished ?
data->setProperty("finished", true);
Really I don't know c++, I'm just taking a shot here :grinning_face_with_sweat:
-
Thanks Matt, I already had a look at the C++ myself but I quickly got lost. The abort function calls the stop function which triggers the pause action and some other stuff. I shall wait for master Christoph :)
-
@d-healey said in Aborting downloads = paused:
I already had a look at the C++ myself but I quickly got lost.
I thought you did. I ended up a bit lost too among these functions
-
@d-healey Just examined the source, it appears that abort is just a stop with delete file. I partly fixed it but the callback's still fired every 500ms... Will tell if I get somewhere ;)
EDIT sorry I started the message long ago so I haven't seen you looked at the code already :)
-
I should add that everything works if you call a clean after abort. so it is usable with a simple fix.
But it would be better handled automatically. Having a look... -
Another problem, with a bad connection, the download often passes to "finished" state, with no resume option (except clean and start again). A timeout safety could be good, like waiting 10sec before declaring a download stopped (so internally it is not finished and could be resumed manually after fixing the "bad connection))
-
Bump bump @Christoph-Hart :)
-
@ustk Is this issue solved by your pull request?
-
@d-healey Yes it should be.
-
@ustk Excellent, I'll try it out!
-
@ustk Yeah that works great, thanks!
-
@ustk said in Aborting downloads = paused:
@d-healey Yes it should be.
Is this still working for you? Seems to be broken in the latest commit for me.
HiseSnippet 1039.3ocsVstiaSDEd7l0.1PKTId.rxubjBNIksEDU.oIYCJhlsQ0sU7upI1i2LZGOi0LiCMTkGRdS3M.Niuj3.YWsJhleD4y8uyEeNdgTDQTJgDY475MYDj0WXGtgqWMdElxQylfrdn8DwuyYBb7DRp.MZSFVoHwHKqV+hQGKmyQE+9qedDlg4Qj8rPn2JnQjWPSo58b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fCfIdwm93XO2P6M.UrK.rytePeTJ7oHuKJxj9eC756ws4wmfMe6IXyEmfMO4Dr4omfMe2IXy2em1X9JvmmqEokuN.LVbYwBRKqK4XXxpXJD8O.QDnMV.
-
@d-healey the pull request has been made on develop and I'm not sure it has been merged… I thought you had merged it yourself on your own branch. Not at my comp to verify…
-
@ustk Ah that explains it! @Christoph-Hart Mergy mergy please :)
-
This problem is still there
-
@d-healey Bump bump
-
@d-healey Did we ever get this fixed?
-
@Casey-Kolb Yeah I think this was fixed ages ago, at least I haven't had any issues with aborting downloads for a long time