OxygenCobalt / Auxio

A simple, rational music player for android
GNU General Public License v3.0
2.16k stars 144 forks source link

Allow deleting songs from within the app #160

Closed noClaps closed 2 years ago

noClaps commented 2 years ago

Describe the feature you want to implement:

Allow users to delete song files from within the app, similar to how it's implemented in Retro Music Player.

Is your feature request related to a problem? Please describe:

Having to go out of the app, into file manager, find the song I'm looking for in my list of 300 and then deleting it, is a lot more difficult than simply having an option within the app.

Do other music players handle this? If so, how?

Retro Music Player has "Delete from device" as an option in the menu for a song, as well as in the menu in the player.

Why do you think this will improve everyone's usage of Auxio?

This would solve the problem stated above, and would make it easier to remove unwanted/buggy songs as you listen to them.

Due Diligence:

OxygenCobalt commented 2 years ago

While this feature seems nice, I'm sadly going to have to reject it for two reasons:

  1. Android's filesystem APIs are dying a slow, painful death. Every release makes it harder for an app to modify internal storage without some insane issue or yet another "security" hoop you have to jump through. This is not to mention all of the device specific issues, especially so on older versions.
  2. Handling what occurs when music is deleted is also a mess. The deletion of a song may propagate upwards to albums, artists, and genres, so I either have to rescan the music libary in it's entirety (Easy, but slow), or implement a routine that dynamically updates the music library (Hard, likely to create inconsistencies).

Maybe I'll re-consider this later (especially after #72), but currently my goal with Auxio is to great the best possible read-only music player. Once the read-only aspects of Auxio have been perfected, writing functionality should become much easier. For now, I would recommend using a file manager.

azan-n commented 2 years ago

Hello @OxygenCobalt!

Great project. I totally agree that not just the filesystem API but most Android APIs are a huge mess after a few major updates. I personally find this feature desirable and despite the fact that I have little experience working with native Android apps, I can help work on it by studying how Phonograph or Metro Player handles it.

OxygenCobalt commented 2 years ago

Sorry for not responding earlier at @azan-n, but neither Phonograph or Retro are good models for song deletion. Phonograph is stuck at API level 29, and Metro uses the magic (and very flaky) "requestLegacyExternalStorage" flag to use the easier deletion API. I really don't want to do either of those.