seansfkelley / nas-download-manager

An open source browser extension for adding/managing download tasks to your Synology DiskStation.
255 stars 46 forks source link

Rename after download #165

Open ubiquityman opened 3 years ago

ubiquityman commented 3 years ago

Feature Request: When the links are copied and pasted into Synology Download Manager (SDM) for downloading, allow the option to rename the file upon completion of download.

Video Download Helper extension will download files through the browser and rename the files based on the webpage title heading. However, using the download links and pasting them into SDM results in filenames that are whatever the remote file/storage names happen to be and they are often gibberish. Having the ability to rename the file either at the time of initial downloading, or during the downloading would be helpful in giving the files intelligible file names.

seansfkelley commented 3 years ago

I'm not sure that I can implement this in a way that isn't error-prone, but I'll think about it. I'm not familiar with Video Download Helper... does it support Synology NASes?

Following is mostly some notes to self when I looked into this.

The DownloadStation API doesn't allow you to provide a different name (the destination parameter has to be a folder).

You can rename files and folders with the FileStation API, but that will break seeding, since DownloadStation would no longer be able to find the file. Furthermore, because we have to wait until the download is done, this will require the extension to be pinging in the background to determine when that happens, and then to issue a rename. All of this requires the browser to be running and, I guess, another setting (or at least, warning) so that it can ping in the background.

Seems pretty flaky, all around. :(