milan-fabian / slideshow-support

Support and issue tracking for Slideshow software
https://slideshow.digital/
15 stars 1 forks source link

Download notification #19

Closed catinodeh closed 3 years ago

catinodeh commented 3 years ago

Hi there, simple question:

Is there a way the app can delete the .zip (or all files in the target folder) after they have been downloaded?

milan-fabian commented 3 years ago

@catinodeh Unfortunately, Slideshow doesn't have permission to modify or delete files on Dropbox or Google Drive, it can just download them.

catinodeh commented 3 years ago

But you can upload a file or call a webhook url when you download a file, right?

milan-fabian commented 3 years ago

@catinodeh There is no such feature in Slideshow yet. If you could let me know what you are trying to achieve, maybe I can suggest an alternative.

catinodeh commented 3 years ago

My goal is to properly identify the commands I added to the file (.Cvs) were executed. If Slideshow doesn’t delete the file or somehow inform the file has been processed, we don’t know if the device is online or not, for example. And if it is online, based on some tests I ran here, it apparently continues to download the file indefinitely.

Thoughts ?

milan-fabian commented 3 years ago

@catinodeh You are right, there is currently no way to verify whether a command has been successfully processed. Most of the commands can be processed again without any problem (e.g. delete file which has been already deleted, import config which has been already imported, etc.), but it would be better to have such feedback - I will try to come up with a solution in the future.

Can you please share some details about the file which is being downloaded indefinitely?

catinodeh commented 3 years ago

My goal is simple:

I would like to give my user the option to push updates to one or more devices in a quick way. Essentially, he does the setup and I dynamically create the .zip file containing the setup.csv and all files/videos.

The problem here is that I can upload the zip file to Google Drive but I can't tell my user the file has been downloaded/processed. Another issue is the fact that if I need to change things, it's important to know if the previous file has been processed or not because it defines how my DELETE(s) are going to be in the subsequent setup.csv file.

And one more thing that isn't clear to me is if Slideshow checks for the ZIP's creation date to avoid an unnecessary download in case the file hasn't changed. On my tests in my local network, the device downloaded the same files over and over again totaling 20Gb of traffic in 24hours. My user may have limited bandwidth and now re-downloading a file is extremely important.

It would be nice to give my user the certain that once he finishes the upload, a minute later the device is already showing the new setup. In order to do that, I need to reduce the download periodicity. If Slideshow downloads the file on every check and I don't know when I can remove it (because I don't know when the file has been downloaded), it's a limitation I can't work around.

milan-fabian commented 3 years ago

@catinodeh It does make sense, there is no fast way to add this feature right now, but I added it to my backlog.

The reason why your ZIP file is getting downloaded again and again is that Slideshow doesn't store the ZIP file, it just unpacks it and throws it away, so there is no way to check the original size and modification date of the ZIP file later. Would it be possible for you to upload the files directly on your Dropbox / Google Drive, not in a ZIP file? It should help lower the amount of transmitted data.

I also replied to your email yesterday (I assume it was from you, as there is the exact issue), but I guess it ended up in a spam folder.

catinodeh commented 3 years ago

Yes, it was me! :-)

Imagine I have 3 videos, 5 images, and a setup.csv file on my Google Drive. If I setup the download periodicity to 1 min and I don't change any of the files, will videos and images be downloaded every minute?

And if I don't change the content of setup.csv, will Slideshow still download it and execute all the commands present on it?

milan-fabian commented 3 years ago

@catinodeh File setup.csv will be downloaded every time, it won't be cached at all.

If the video and image files won't have a delete date specified in the setup.csv file, they will be downloaded only the first time. If they have a delete date specified, they will be downloaded each time, the caching algorithm doesn't know how to deal with the delete date (yet).