Update UrlSynchronization to limit amount of downloads (#2586) (#2933)

Limits the number of URL synchronization downloads by time stamping files for X seconds fixes (#2586). 
Also, show the amount of downloaded data as soon as the download is started fix (#2460)

* Adds time validity to UrlSynchronized files (#2586)

Updated affected asset files. Satellite asset files lasts for 24h by default now. Other assets are updated to work as before. Obs timestamp is computed using UTC time.

* Code cleanup

* Update httpsynchronization.cpp

* Applied suggestions from code review

* Update multi-line comment to `//`

* Remove accidental commas in .asset files

Co-authored-by: Emma Broman <emma.broman@liu.se>

* Fixed PR comments + bug in .asset file

* Refactor code

* Reports downloaded data as early as possible, fixes (#2460)

* More files

---------

Co-authored-by: Alexander Bock <alexander.bock@liu.se>
Co-authored-by: Emma Broman <emma.broman@liu.se>
This commit is contained in:
Andreas Engberg
2023-11-14 17:08:38 +01:00
committed by GitHub
parent 9343c6315d
commit f3c4fc54db
64 changed files with 526 additions and 183 deletions

View File

@@ -780,8 +780,8 @@ void OpenSpaceEngine::loadAssets() {
static_cast<float>(sync->nTotalBytes());
}(*it);
progressInfo.currentSize = (*it)->nSynchronizedBytes();
if ((*it)->nTotalBytesIsKnown()) {
progressInfo.currentSize = (*it)->nSynchronizedBytes();
progressInfo.totalSize = (*it)->nTotalBytes();
}