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

Remove if statement for deleting parents in box #16

Closed
jmshrv opened this issue Apr 5, 2021 · 0 comments
Closed

Remove if statement for deleting parents in box #16

jmshrv opened this issue Apr 5, 2021 · 0 comments

Comments

@jmshrv
Copy link
Owner

jmshrv commented Apr 5, 2021

https://github.com/UnicornsOnLSD/finamp/blob/07c833e2f28b3073cc0f110f56c76ac5b567c3f8/lib/services/DownloadsHelper.dart#L132

Since DownloadedParents is now used purely to store downloaded parents, we don't have to make this check anymore when deleting a parent.

This check actually causes a bug where a parent may not be deleted by the box.

To reproduce:

  1. Download a playlist
  2. Download an album containing a song from that playlist
  3. Try deleting the album. It will not be correctly marked as deleted since the DownloadedParent still exists.

On another note, we probably don't even have to delete downloadedChildren from the DownloadedParent since a DownloadedParent will always have all of its children.

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

No branches or pull requests

1 participant