tywil04 / slavartdl

Simple tool written in Go(lang) to download music using the SlavArt Divolt server
GNU General Public License v3.0
17 stars 1 forks source link

Couple requests.. #25

Open bacon-cheeseburger opened 10 months ago

bacon-cheeseburger commented 10 months ago

For some reason I keep getting "invalid file path" after a supposed successful download but I have no clue why. This brings me to two suggestions. 1) Please print the real download url instead of just "Successfully fetched download url!", and 2) Please print the save location of the downloaded file.

Reason for # 1 In the event the download url fails, the user can just copy & paste the download link into a browser rather than requesting the bot download it again, and then hope slavartdl doesn't die again.

Reason for # 2 In the event the download succeeds but the unzip or copy fails, at least the user can see where the downloaded file is and manually try to resolve the problem.

Sound reasonable?

bacon-cheeseburger commented 10 months ago

Small update. Because I know the output path is available & writeable, I knew the problem couldn't be that so I tried again after setting skip unzip to "true" in the config. Doing that fixes the issue so it seems the problem may be relate to the unzip module you're using?

tywil04 commented 10 months ago

Just to get some more info, are you using discord as your download source?

I think I know what the issue may be but currently don't know the best way forward if its the case.

bacon-cheeseburger commented 10 months ago

Yeah, the problem happens when using discord as the source. It was working fine but started doing this after I recently did a fresh git clone & compile. I was thinking maybe something changed in the unzip module that borked it. Good that you already have a suspected cause in mind.

tywil04 commented 10 months ago

If discord was the reason this breaks then it might not be a good sign.

Does this happen repeatedly or only some of the time?

Also sorry about the long response time, I have been very busy recently.

bacon-cheeseburger commented 10 months ago

I don't believe discord has anything to do with the problem. If I disable auto-unzipping, the zips download no problem every time. I can then manually unzip them just fine. If I enable auto-unzip, the download is reported as successful and the failure only occurs when trying to unzip. Since I'm never given the final decoded download url to the zip, I can't verify it in a browser and since I can't find the downloaded zip, I can't verify its validity either.

To be clear, what seems to happen is:

  1. request successfully sent to discord.
  2. if request fulfilled, download link successfully received from discord.
  3. download link successfully decoded and real download link revealed.
  4. successful zip download from real download link.
  5. auto-unzipping of valid downloaded file attempted and fails for reasons unrelated to the download process itself.

I don't know how the download happens. Incrementally saved to disk? Downloaded to ram and saved as complete to disk? If auto-unzip enabled, is it saved to disk at all or only downloaded and processing entirely in ram?