Gramophone icon indicating copy to clipboard operation
Gramophone copied to clipboard

[FR] Change root folder

Open yezhiyi9670 opened this issue 1 year ago • 6 comments

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

I think many people who stick to offline music, including me, organize all their songs well in one particular "music library" folder.

Instead of having the full SD card scanned and then excluding unwanted folders, I think it's more convenient to include just one folder in the music player.

Describe the solution you'd like

  • An option to only include audio files in one or several particular folders.
  • An option to "chroot" the filesystem view, i.e. select a folder that the filesystem view treat as the root folder.

Additional context

An example:

  • Included folders: ~/_MP3Repo/20220712/Music/ ~/_MP3Repo/20220712/ScoreChecks/
  • Filesystem view "chroot": ~/_MP3Repo/20220712/

yezhiyi9670 avatar Dec 13 '24 06:12 yezhiyi9670

I second this, having a whitelist approach (with an option to not ignore folders with .nomedia) makes so much more sense than a blacklist approach, most people don't scatter their music files across the entire file sytem

daoxi avatar Dec 17 '24 02:12 daoxi

with an option to not ignore folders with .nomedia

This is out-of-scope and not planned

nift4 avatar Dec 17 '24 08:12 nift4

with an option to not ignore folders with .nomedia

Note: .nomedia is an Android media store feature. To include folders with .nomedia, the app have to manually scan the storage, which is both time-consuming and difficult to implement.

yezhiyi9670 avatar Dec 17 '24 09:12 yezhiyi9670

with an option to not ignore folders with .nomedia

Note: .nomedia is an Android media store feature. To include folders with .nomedia, the app have to manually scan the storage, which is both time-consuming and difficult to implement.

No no no... you guys misunderstood what I meant (or maybe I didn't express myself clearly). I meant when you're already specifying which folder(s) to scan (i.e. whitelist), the app should scan/include everything in those specified folder(s) even if there are .nomedia file(s) there (i.e. just ignore the existence of those .nomedia file(s)).

The reason is that it's a common practice to store album cover art as seperate image files (either as a single cover.jpg file for each album folder, or as multiple same-filename-as-music-file.jpg files for each music file (similar to how .lrc files work)), and usually in these cases, a .nomedia file would be included to prevent those music cover art image files from being scanned by other image viewing/editing apps on your phone, but that same .nomedia file is now also preventing Gramophone from scanning any music files stored in that music folder (which is not ideal, hence my original suggestion)

daoxi avatar Dec 19 '24 01:12 daoxi

Unfortunately, we have not misunderstood. Gramophone has no code at all related to .nomedia files because the Android system handles them and their existence automatically by not scanning music, video and image files in folders with .nomedia - and there is no way to force Android to ignore the file for just audio. (Gramophone does not read all audio files on startup to extract tags, nor does it keep it's own database of tags, we use Android's MediaStore.) This also implies that the whitelist feature will never will make more music files show up than an empty blacklist.

nift4 avatar Dec 19 '24 05:12 nift4

An option to "chroot" the filesystem view, i.e. select a folder that the filesystem view treat as the root folder.

Do you think automatically entering folders until there is more than one subfolder with scanned media would be sufficient? Or do you need to not be able to go upwards a certain level (if so, why?)? Or do you want to set a folder as starting folder even if there are other folders with scanned media above the starting point?

nift4 avatar Oct 25 '25 16:10 nift4

Do you think automatically entering folders until there is more than one subfolder with scanned media would be sufficient? Or do you need to not be able to go upwards a certain level (if so, why?)? Or do you want to set a folder as starting folder even if there are other folders with scanned media above the starting point?

In my opinion, the first option is sufficient. The third one might be useful in certain complex scenarios, but not the case for me.

yezhiyi9670 avatar Nov 26 '25 03:11 yezhiyi9670

An option to "chroot" the filesystem view, i.e. select a folder that the filesystem view treat as the root folder.

Do you think automatically entering folders until there is more than one subfolder with scanned media would be sufficient? Or do you need to not be able to go upwards a certain level (if so, why?)? Or do you want to set a folder as starting folder even if there are other folders with scanned media above the starting point?

I understand you're asking another person, but I do think the third option ("set a folder as starting folder even if there are other folders with scanned media above the starting point") would probably be the most straightforward and intuitive. Because when people set their designated music folder they probably just want this folder (including its subfolders) to contain all their music (instead of scattering their music files all over their file system) (even the original post also said "many people who stick to offline music, including me, organize all their songs well in one particular "music library" folder.").

Having to include other folders above the "starting point" seems unnecessary (because the whole point of this "starting point" is to indicate which folder should be viewed as the "music library" folder) and sometimes even unwanted (e.g. if a person has any non-music audio files stored outside of their music folder)

daoxi avatar Nov 28 '25 09:11 daoxi

Hi, thanks for the feedback. It sounds like you are interested in folder whitelist feature #570. It's also on my plan. I think it serves your usecase well if combined with option 1 from this issue (as it will then automatically enter the only whitelisted folder, if you only whitelist one)? A seperate function to set one specific folder only doesn't seem required for now if I understand you two correctly. As I implemented option 1 and folder whitelist is tracked by another issue, I will close this for now.

nift4 avatar Nov 28 '25 09:11 nift4