Media on URL

Mark Stiebel mark at stiebel.me
Sun Apr 3 06:03:55 PDT 2022


Hi Robert,

Just built locally with your pull request. Thanks for making that 
change.  Seems to work as expected! I did notice though when I added a a 
few images, it (as expected) took longer to process the image metadata 
compared to loading local files, and during that
time (a few seconds) there was no indication that it was actually doing 
anything.

Looking at your code, I see this - which appears to add a second of 
pause for each image.

while (reply->isRunning()) {
				    loop.processEvents();
     sleep(1);
			}

Locally I changed sleep(1) to usleep(10000), which has made it a lot 
quicker - but before putting that in a PR wanted to check if there was a 
reason you added the 1 second sleep in there? (I believe usleep is also 
POSIX deprecated so we may want to avoid using it? I did find a 
usleep(1000000) in core/uemis-downloader.c though

There's probably also some tweaking around error handling that could be 
done.

Currently if any one of the images is missing or invalid, the whole 
operation fails. Removing the return after report_error() will continue 
to load all images, but it is not very elegant (if multiple files are 
invalid, the error messages flash through, and [?] thumbnails are 
created for them.

I'll happily take it on, but unlikely to be for at least 3 weeks until I 
get back from an upcoming trip.



------ Original Message ------
From: "Robert Helling" <helling at atdotde.de>
To: "Robert Helling" <helling at atdotde.de>
Cc: "Mark Stiebel" <mark at stiebel.me>; 
"subsurface at subsurface-divelog.org" <subsurface at subsurface-divelog.org>
Sent: 2/04/2022 5:09:59 AM
Subject: Re: Media on URL

>Mark,
>
>>On 30. Mar 2022, at 13:45, Robert Helling via subsurface 
>><subsurface at subsurface-divelog.org> wrote:
>>>
>>>- Ability to add multiple URLs before hitting the import button - 
>>>avoids the time sync dialog for every image
>>
>>That should be very easy, making those comma or newline separated.
>
>did you see, I implemented that in a pull request that was merged 
>today. If you get the latest build from GitHub, that should be included 
>for you to test.
>
>Best
>Robert
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20220403/c1fcc82d/attachment-0001.htm>


More information about the subsurface mailing list