close
The Wayback Machine - https://web.archive.org/web/20201002190627/https://github.com/enricocid/Music-Player-GO/issues/48
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

Scan specific folders for music #48

Open
toastedice opened this issue Oct 28, 2018 · 13 comments
Open

Scan specific folders for music #48

toastedice opened this issue Oct 28, 2018 · 13 comments

Comments

@toastedice
Copy link

@toastedice toastedice commented Oct 28, 2018

Hello, I am using syncthing for android and I can only do two way sync in its application folder. is there any way to force this music player to scan inside a specific folder?

@enricocid
Copy link
Owner

@enricocid enricocid commented Oct 28, 2018

Nope at the moment. But I can add this feature to my to-do list😉

@enricocid enricocid changed the title music player can't scan music files in sdcard/android/data/ folder Scan specific folders Apr 28, 2019
@enricocid enricocid changed the title Scan specific folders Scan specific folders for music Apr 28, 2019
@g0rdonL
Copy link

@g0rdonL g0rdonL commented Nov 14, 2019

I would like to contribute 👍 are there any contribution guidelines?

@enricocid
Copy link
Owner

@enricocid enricocid commented Nov 14, 2019

You're welcome.

No (not a pro dev, don't even know how to write guidelines), just keep it simple :)

@g0rdonL
Copy link

@g0rdonL g0rdonL commented Nov 15, 2019

@enricocid how would you like the user to choose the path? Also are you using android studio i cant seem to get intellij working

@enricocid
Copy link
Owner

@enricocid enricocid commented Nov 15, 2019

A multi-select dialog? Really don't know

Yes I'm using Android studio.

Just for completion: work on this branch which will be the new MPGO (it has an options tab)

https://github.com/enricocid/Music-Player-GO/tree/master-mpgo-ex

Don't want you to waste time :)

@g0rdonL
Copy link

@g0rdonL g0rdonL commented Nov 16, 2019

I'm still new to this and trying my best to help :) @enricocid would you like something like this https://github.com/hedzr/android-file-chooser just to clarify i should be working on the MusicUtils.getMusicCursor() if i have not mistaken.
Cheers

@enricocid
Copy link
Owner

@enricocid enricocid commented Nov 18, 2019

Exactly!! :)

@g0rdonL
Copy link

@g0rdonL g0rdonL commented Nov 18, 2019

The current implementation is grouping both artists and folders as "Hidden items" I think if we can separate artists and folders, then I can loop through all the hidden folders and exclude them. I tried doing so but it fails :(

@enricocid
Copy link
Owner

@enricocid enricocid commented Nov 20, 2019

You are right. I also don't like the actual implementation.
In fact, I'm actually merging most of the changes to release them to public escluding folders for now. I will separate it for sure and rework hidden items too.

@StarFscker
Copy link

@StarFscker StarFscker commented Jan 28, 2020

Hey this feature is really important because I don't know how to get the music in my Music folder to show up, thank you guys for working on this feature. I really appreciate it and hope it's included soon.

@enricocid
Copy link
Owner

@enricocid enricocid commented Jan 29, 2020

I can actually add an option to select folders we want to show.
So I can use this output as filter. I could also let the user to filter the music by artist.
This is a quick way I can handle this issue.
Anyway, it will require some days as I'm actually using an emu as my test device is broken, so I have to ask to other contacts/devs to test the app on their test devices.
Let me know if this is ok so I can start posting test APKs.

I can't provide a dialog listing the whole memory tree as it is a very complex and would not be compatible with Android 10 + (it is not possible anymore to access raw paths, and it is not suggested even in older Android versions ... ). It would be not worth the effort. Also, docs about storage access framework is not that good. I'm not sure I want saf in my app. It would make it more error prone.
That's the problem. Memory management is changing a lot unfortunately and I have to make sure to keep the code clean and compatible with newer versions without any gimmicks.
Many other devs are experiencing issues in this direction.

I could use a 3rd party library but its output (raw paths) can't be used in Android 10+.

@Baldomo
Copy link

@Baldomo Baldomo commented Mar 2, 2020

Retro Music Player (also FOSS) uses a kind of blacklist for song selection using Android's MediaStore, it may be useful as an example: code

@enricocid
Copy link
Owner

@enricocid enricocid commented Mar 2, 2020

Retro Music Player (also FOSS) uses a kind of blacklist for song selection using Android's MediaStore, it may be useful as an example: code

Thanks but this code is not compatible with scoped storage changes introduced in Android 10.

They are querying data column that returns the raw path of a music file.
In fact, they are using this attribute in the manifest

android:requestLegacyExternalStorage="true"

to opt out scoped storage. These changes will become mandatory in August 2020 and Android 11 so the app won't work on certain devices.

I already added the ability to hide artists and folders.
I can review this feature adding a dialog listing all the folders, letting the users to build a filter.
But again, I can't show the full folders tree as it is not possible to access the raw path but only the folder name.

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

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.