deniscerri / ytdlnis

Android Video/Audio Downloader app using yt-dlp
GNU General Public License v3.0
3.92k stars 138 forks source link

Downloading speed and resuming and scheduler isn't reliable ,on Google Drive #237

Closed JayKx closed 12 months ago

JayKx commented 1 year ago

Downloads from Google Drive is 7-10 times slower ,compared to other download managers, plus resuming an interrupted download/scheduling downloads is extremely unreliable

To Reproduce Steps to reproduce the behavior:

  1. A google drive link with large file
  2. Pass it to the app
  3. Pass it to another download managers as well
  4. See the downloading speeds in both apps, for same link.
  5. Stop the download in yt-dlnis midway, or anywhere and then resume it after sometime. If it gets resumed correctly, stop it and then repeat.

Expected behavior A clear and concise description of what you expected to happen. Resuming should work 100% of times ,at least in case of Google Drive, just like yt-dlp works in command line. Speed should also be higher. Half downloaded temp files should be stored in public folder or folder of our choice.

Screenshots / Video Recording If applicable, add them to help explain your problem.

(please complete the following information):

Additional context

Title. When I try to resume stopped downloads it sometimes works and sometimes not. Frequently the half downloaded files get lost and the app starts the downloads from beginning.

Also ,the temp file of downloads are located in private app folders, so its impossible to view then without root. In contrast to command line yt-dlp ,resuming almost never fails and you always have the .temp file in your folder.

deniscerri commented 1 year ago

The app doesnt hinder the download speed of yt-dlp. When you stop a download. Do you try to resume from the same downloadItem or go back to the home screen and start a new download?

The app will resume as long as you resume a paused item or a cancelled item. Because each download item has a certain temporary folder with its id. When you make a new download it will have a new id so new temporary files.

Please clarify this. Also yes i have currently switched from private directory to just the downloads folder for temporary files, since some people were downloading livestreams and wanted to stop halfway through

JayKx commented 1 year ago

OK. The download speed is on yt-dlp. I think drive is limiting speeds for yt-dlp just like youtube restricted speed on yt-dl.

I'm resuming exactly from the app's download section,where I stopped the downloads. And sometimes ,the resume function perfectly worked. But in several crucial situation where I was downloading large files, it automatically restarted.

As for temp files, I still can't find them on Download folder. Yes, the app has option to move the temp files to Download/YTdlnis folder but its not much helpful. Because once you move the cache out, you can't move it back to private folder,in case you want to resume.

deniscerri commented 1 year ago

Yes the temp files patch is not released yet but it will be implemented soon. Ill let you know when i do so you can further test this case and see what is happening.

deniscerri commented 1 year ago

@JayKx can you give the latest beta in telegram a shot?

JayKx commented 1 year ago

Yes. Give me the link here. I dont have telegram installed , if possible give me the file link.

deniscerri commented 1 year ago

https://devuploads.com/oei7ixetvar8 https://devuploads.com/wn5xcmcyt4j2

JayKx commented 1 year ago

This time google drive links are showing error. I copied the error notification:

"ERROR: [generic] None: Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); please report this issue on https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U".

Next. I tried a youtube link. Stopped it midway and force closed the app. It resumed the download perfectly. The half downloaded file was present in /.cache folder. I think the problem of resuming has been solved.

deniscerri commented 1 year ago

The gdrive error is not related to the app. Maybe the link expired or the video got deleted

JayKx commented 1 year ago

Thats very unlikely because I'm generating public link from my own drive folder ,of a sample video. In addition in the homepage, you can easily see the same link working, meaning you get the download popup, you can choose video formats etc. But as soon as you click download , it doesnt work. Same for a nsfw website that uses "generic" extractor of yt-dlp. On homepage you can see the video, download popup etc.

deniscerri commented 1 year ago

It's a ytdlp error at this point. There's nothing i can do. Try updating or switching to nightly in the settings

JayKx commented 1 year ago

See these screenshots. I installed yt-dlp in termux, passed same drive url and speed and everything is fine.

Screenshot_20230815-095421_1 Screenshot_20230815-095524_1

deniscerri commented 1 year ago

Is the issue still there?