-
Notifications
You must be signed in to change notification settings - Fork 133
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
New Download Package #213
Comments
Honestly this can't come soon enough. The current solution is extremely buggy. The inclusion of thumbnail downloading really confused my install and I ended up deleting it and redownloading it to start completely fresh. I am currently in the process of redownloading all of my music and it has hung multiple times with where there queue was 4 or there were 2 running but half of multiple albums were not downloaded and the enqueued/running numbers did not change through multiple attempts to close and reopen the app. |
Glad to see this is already reported in some way. Could the issue be retitled with something more user-oriented, like "Current download system provides no information and can create a mess" or something like that? :) I, like others i expect, have had a mess created by trying to download a single album, lose connectivity, and end up with a "failed" download with no way to check, clean-up or retry. |
I don't want to be harsh on flutter_downloader, it works for it's intended purpose - Finamp has just outgrown that and needs proper dependency management built-in. In Finamp, you can delete failed albums and they should clean themselves up. At some point I'm going to add easier to access delete buttons and a retry button to the download screen. |
I've started work on this at https://github.com/UnicornsOnLSD/flutter_download_manager. It's still very early on - I've pretty much only just got a blueprint for a download and download group class, so don't expect it like next week lol. |
Still, a good start! Good to hear 🙂 |
Will transcoded downloads be included in the release? |
It's probably unrelated, but they most likely won't be included before this is done ^^ |
As far as I know, Jellyfin doesn't really have a way of downloading transcoded songs. We could probably just save the transcoded stream, although I don't know if that would cause issues regarding the stream not having a confirmed content length or anything. |
would a local transcoding be an option? |
In theory yes, but that would be a pretty overengineered way of doing things. I'll look into it more deeply once the package work is done. |
yeah, leveraging the jellyfin server would make more sense, but if there are issues, it could be a fallback. |
that would put alot of strain on the device, especially when downloading albums en masse. |
It makes sense to want to store transcoded tracks on a mobile device, as it's likely to have lower quality headphones or earphones, and storing FLAC can end up consuming a lot of storage space, but it sounds like it should be a different issue. |
@axelsimon Transcoded downloads has its own issue (#215), I'll write about my progress there |
https://pub.dev/packages/background_downloader may have beat me to it (putting this off for a year has its benefits) |
There's an interesting issue at flutter_downloader which ticks basically all of the boxes that I wanted - fluttercommunity/flutter_downloader#823 |
Hi, author of the background_downloader here. I think my motivation to write an alternative is very similar to yours :) |
I'll let you know if I run into anything! I read through the documentation and it looked like the perfect package. Stuff like getting the path relatively will help me remove horrible patches I've had to make because I made the mistake of storing absolute paths: finamp/lib/services/downloads_helper.dart Lines 598 to 636 in 0932469
|
I've started work on a document that details why I'm doing this rewrite, and the impacts that it will have. I'll send another message here once I've filled out the actual plan on what will be changing. https://github.com/jmshrv/finamp/blob/main/DOWNLOADS_PLAN.md |
Since you're planning to use a central database, my recommendation would be to not use the |
Ah cool, I'll manage the database myself then :) |
Hi @jmshrv I wanted to let you know that the latest version of the background_downloader now allows you to specify a different 'persistent storage database' for storing, updating and retrieving download information. You need to implement the I think this may be an elegant solution for what you are looking for, and saves you effort tracking the task status yourself. The example app includes an example implementation of the |
That's a really cool solution, I'll look into it :) Currently I'm mostly working on #220, but flutter_downloader is no longer maintained so I should really get off it soon |
Hey @781flyingdutchman, got a quick question about your package! In the docs for
but I'm not sure what the preconditions for this are, and if it works on all platforms. Also, it seems like Oh and Merry Christmas 🎄, in case you're celebrating :D |
Hi, thanks for taking another look. When you lose Wifi during a download for a task that has
So, in both cases you get roughly the behavior you want, except in Android it does require retries > 0 and if the Wifi goes in and out a few times you may run out of retries and the task may fail. On Hope this helps. |
Okay yeah that definitely helps, thanks! I guess we'll just go with the |
The If you have a larger number of files to download, or if they are big, then I recommend using |
Got it. We actually already have a PR doing just that, using Isar as the database. It seems to work well, just the |
Implemented as part of the beta release (https://github.com/jmshrv/finamp/releases/tag/0.9.2-beta) |
Currently, Finamp uses flutter_downloader to handle downloading songs and images. This package isn't the greatest, and has been the root cause of issues such as janky download indicators and the app freezing when downloading a lot of songs at once. The main focus of 0.7 will be creating a new plugin which would make managing downloads much easier. This could include stuff like adding streams to listen to download progress, and the ability to handle URL download paths for better custom path support. This package will also have a generic Dart fallback for Windows/Linux, as currently flutter_downloader only supports iOS and Android (the iOS code should run on macOS, but I'd rather not inherit any code from flutter_downloader).
The text was updated successfully, but these errors were encountered: