Skip to content
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

Download all missing songs on playlist/album #328

Closed
pedrotrschneider opened this issue Sep 20, 2022 · 16 comments · Fixed by #534
Closed

Download all missing songs on playlist/album #328

pedrotrschneider opened this issue Sep 20, 2022 · 16 comments · Fixed by #534

Comments

@pedrotrschneider
Copy link

pedrotrschneider commented Sep 20, 2022

If I create a playlist and download it, I can play it normally in offline mode. However, if I then add a new song to the playlist, it no longer appears in offline mode, as if it was never downloaded. Furthermore, there is no option to download the single song I added to the playlist, and I need to delete all other downloaded songs, and then download the entire playlist again.

Is this an actual bug or am I missing something? I am aware of #213, but I didn't see this specific issue mentioned there, or anywhere else, that's why I'm opening this one.

If this is actually a bug, I would suggest either adding a "download all missing songs on playlist/album" button alongside the "delete downloads" button, or identifying when a downloaded playlist has tracks that are not downloaded and change the "delete downloads" button to a "download missing tracks" button. I prefer the first option, since the second option would make it impossible to delete all tracks on the playlist without downloading the rest of them first, but maybe something in-between would be a good idea.

Another option to mitigate this issue would be to make the "downloaded" property local to tracks. I think this would be a good idea. Right now, I have to either download the entire album/playlist or create another playlist if I want to listen to some of the songs in an album/playlist. If there are any downloaded tracks in a playlist/album, I think they should already show up in offline mode, and not require all songs to be downloaded.

@Y0ngg4n
Copy link
Contributor

Y0ngg4n commented Sep 21, 2022

It is missing. But i am currently working on a pull request to enhance the downloads. Maybe just wait.

@Demian98
Copy link

@Y0ngg4n It would be great if your enhancements would also include an option to restart failed downloads. Currently we also need to delete an redownload the full album in case one download fails.

@Y0ngg4n
Copy link
Contributor

Y0ngg4n commented Sep 21, 2022

@Demian98 that is exactly what i try to implement currently

@Y0ngg4n
Copy link
Contributor

Y0ngg4n commented Sep 22, 2022

#331

@seniorm0ment
Copy link

I do encounter this as well, was curious if there was any updates on it?
If I add a new song to a playlist it doesn't automatically download it if I previously downloaded that playlist.

@JPinSPACE
Copy link

I just wanted to add my voice saying that this is still a problem. I maintain a lengthy "general" playlist to throw on shuffle while in the car. But any time I add anything to the playlist if I want it to work in offline mode I have to delete the playlist and allow it to redownload, which usually takes a couple of attempts and uses so much data that I can only do it on wifi.

@Y0ngg4n
Copy link
Contributor

Y0ngg4n commented Apr 19, 2023

@JPinSPACE have you tried the retry downloads button in the downloads page?

@JPinSPACE
Copy link

I just tried it. It just says I don't have any download errors. It's not an error per se, it's just that the playlist now has extra songs at the end and in the past I had downloaded the playlist. The expected behavior is that the playlist would understand its status as "downloaded", see that it now has undownloaded songs on the end and then download them.

@Y0ngg4n
Copy link
Contributor

Y0ngg4n commented Apr 22, 2023

@JPinSPACE ah ok. so you added more items to the playlist and they did not got auto downloaded?

@JPinSPACE
Copy link

JPinSPACE commented Apr 22, 2023 via email

@Y0ngg4n
Copy link
Contributor

Y0ngg4n commented Apr 22, 2023

Yep, correct

i think that is a case not covered yet. Please create a seperate issue describing the problems in detail and link this issue please. Thx.

@JPinSPACE
Copy link

Ahh, gotcha, will do, thanks.

@jmshrv jmshrv changed the title Issue with downloaded playlists Download all missing songs on playlist/album Apr 24, 2023
@Y0ngg4n
Copy link
Contributor

Y0ngg4n commented Apr 24, 2023

@JPinSPACE thank you 🙂

@Venryx
Copy link

Venryx commented Sep 23, 2023

Hitting the same issue, where I add one song to a previously-downloaded album (which is really just a container folder on my desktop/server), and I'm unable to append it to my downloaded songs without deleting the whole album first then redownloading from scratch.

The code in question seems to be here:

setState(() {
isDownloaded = _downloadsHelper.isAlbumDownloaded(widget.parent.id);
});
}
return ValueListenableBuilder<Box<FinampSettings>>(
valueListenable: FinampSettingsHelper.finampSettingsListener,
builder: (context, box, child) {
bool? isOffline = box.get("FinampSettings")?.isOffline;
return IconButton(
icon: isDownloaded
? const Icon(Icons.delete)
: const Icon(Icons.file_download),

Seems the minimum steps required would be to:

  1. Improve the isAlbumDownloaded function to return more granular results than just "is downloaded or not" (perhaps a middle state of "partially downloaded" would be sufficient).
  2. When an album is "partially downloaded", have the button show the "download" icon rather than "delete". (perhaps a modified version of the download icon to indicate that some of the album's tracks were already downloaded)
  3. Improve the album download function to ignore downloading any tracks that it sees already exist in the target folder. (possibly this is already the case)

@Venryx
Copy link

Venryx commented Sep 24, 2023

Oh, I see that someone created a pull-request for another way to solve this issue!: #460

It adds a whole new button to update all locally-downloaded playlists, it looks like. (not completely sure if the "playlists" includes "albums", but I'm assuming it does...)

Not sure which approach is better, but since one is already written and ready to go, that seems preferable. (and anyway, it'd be possible to implement a second way to update it later)

@Chaphasilor Chaphasilor linked a pull request Dec 11, 2023 that will close this issue
@Chaphasilor
Copy link
Collaborator

#534 will add a button in each playlist that will synchronize all songs (download new ones, delete removed ones if they're not part of another downloaded playlist/album). This should close the issue.

It's not automatic (yet), but we'll get there!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

7 participants