-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor download manager #962
Comments
@theScrabi From your link, Fetch looks like the most active and up to date project. |
Uuuh fetch also has a wifi only switch :) Does it also support notification? |
@theScrabi No idea. There's not a lot of open source download managers for Android out there. Gigaget and uGet are pretty much the most well known ones. The ones you listed are more like side projects that aren't ready to be posted on the Play Store or even F-Droid. You may have to stick with Gigaget for a while longer or even find somebody to fork Gigaget and fix the issues you mentioned. Or perhaps uGet can be ported to Newpipe? Not sure how easy that would be compared to porting Gigaget. |
uGet is just frontend for CLI downloader aria2. Perhaps aria2 can be used in newpipe? |
@LosEagle Actually, its a frontend for curl and aria2, and only curl is supported by default. aria2 support is included in uGet but you have to enable it in the settings before you are able to use it. However, aria2 on it's own might be a good option but I'm not sure how easy it will be to add to Newpipe. |
Well, using a native library would add another level of hell to NewPipe.
For example Android's PackageManager is totally not reliable with
installing native libraries, which can be avoided with ReLinker, and some
other stuff. I'd just write something using OkHttp.
|
Oh yes. Well it was nice if there is already some external downloader available. |
@theScrabi: I don't think we should do that, since we'll need to have things specific for NewPipe (for example getting a new stream URL from NewPipeExtractor when the URL it's using to download expires). I'll write a new downloader for NewPipe though. |
Has anyone looked at this? It looks quite mature and modular. |
@wb9688 Thanks for your efforts and be sure to take your time on this downloader project. Please make sure the downloader makes multiple simultaneous connections while downloading like Gigaget does, though, or I predict many people will complain. |
So I worked myself into this a bit further, and what i found out is, that accessing files via Unix file system ( Uri instead of file namesSo instead of filenames SAF uses Uri, to access files. What we would want to do in order to access SD card files is getting the Uri for the root directory, and cooncan the path to our file onto the end of it. InputStream/OutputStreamFiles can not be handled with gigagetOur current download manager is bad rubbish, it's old code someone wrote to test his andorid skills, and therefore its not quite reliable and up to date. Also it is based ontop of the idea that you can download one file with parallel threads. What I've seen so far is that there is no real replacement for a download manager that uses SAF on android arsenal (notify me if you find something different). So we have two options here:
File pickerOur filepicker is cool, but it does also not use SAF, and on top of that its sometimes a big buggy, here it would be cool to use the android SAF file picker, but that is not relay usable until android 6.0 ... so meh, we need to stick to it, and try to translate from filepath to uri. |
Didn't @wb9688 already say he was writing a new downloader? I don't think Gigaget is salvagable. Fixing it will probably be more work than wring a barebones downloader from scratch, and all of the mature alternatives have already been mentioned in this issue. |
Yeah, I'll write a new download manager. I'll throw away that GigaGet
garbage and then write something new that uses OkHttp and SAF. I'll also
make a better UI and integrate jCodec.
|
So what would the time scale will I be before we can download to SD cards? |
This is hard to tell. It's done when its done, however it got requested so often that I think things will get rolling soon :D @wb9688 I don't want to sound unpolide, but you also said you where going to implement support for AndroidTV, and PipeCast. So far you started those projects than abandon them. |
@theScrabi: I'm sorry, I just don't have as much time anymore. Others are
free to do it too, since I don't have much implemented of the new download
manager yet.
|
I'm experimenting with this library: okdownload, which is a rewrite of the popular one that @karyogamy posted previously (with improvements in documentation, testing and other aspects). I may have a working proof-of-concept in the next weekend. |
So with this issue seemingly fixed in 0.17, can this issue be finally closed, that is, when @kapodamy claims his bounty money? |
would youtube-dl be a good candidate? It's a separate open source program primarily used from the command line. It could likely be embedded in NewPipe. |
We know about youtube-dl (we even take inspiration from there for the extractor). But youtube-dl uses Python, which can't be run on Android unless with a heavy and slow emulator |
@PeterHindes and @Stypox: Plus youtube-dl isn't even a download manager and won't solve any of the issues mentioned here. |
Fair enough. I don't know much about youtube-dl, but I believe it has a binary form, IDK if it still packages python there though. |
@PeterHindes: The issue here is not retrieving the URL of the file, which NewPipeExtractor does wunderfully. The problem is actually downloading the file from the URL that NewPipeExtractor provides. youtube-dl would be an alternative for NewPipeExtractor, which we don't need, besides that youtube-dl lacks a lot of features. |
Maybe I'm not understanding. Does NewPipe Extractor provide a URL that you could for example download in a browser? I'm not familiar with the details of the process of downloading a YouTube video. |
Yep. It's Newpipe code that downloads the video. Look at the source file names. |
Hello, any news on this ? Thanks |
deleted by authori want to take on this bounty puck - make a user happy with downloading within NewPipe the solution will be a process - a library - in a separate repository, added as clean dependency download process will be implemented in clojure with core.async - vegan magic compiled into java loaded via JitPack from github - like with deps.edn or docker-compose - no maven middlemen, straight from Jesus NewPipe will see it just as another java jar library once working and used - repo can be moved/forked or code copied-included - as TeamNewPipe deems bettersimply put if there are no objections to such a solution - green light it and i will science the Mark-Watney-potatoes-crap out of it |
@Sergei-Udris Have you taken a look at all the issues related to the download manager? If not, I recommend you do so at least once. |
deleted by author> @Sergei-Udris Have you taken a look at all the issues related to the download manager? If not, I recommend you do so at least once.i did - took a look at all issues mentioned in this thread i must self-decline though for a different reason - i will not take this issue on :David-Mitchell i'm not eating a sandwich in WHSmith, you barbarian! |
🤣 Ah no, that's not nearly enough. I was talking about all the related issues in the repo, with the |
Gigaget wase once a downloader distributed on fdroid. However it is discontinued, tho we copypasted their code into NewPipe, and made gigaget our downloader.
Now we have to get rid of it, since its causing a lot of trouble.
Related issues:
#961
#779
#355
#345
#315
Maybe we could replace it with a Download Manager available on Android Arsenal. Feel free to browse a little and find a downloader you think fits to NewPipe.
A new download manager must have these abilities:
Nice to have:
download files with external download managerOption to download using external download manager #9142The text was updated successfully, but these errors were encountered: