Ignore blacklist and other things, so any song can be played when opened from File Managers, and also from Folders tab.

This commit is contained in:
Prathamesh More 2022-01-12 14:05:19 +05:30
parent 4d9396873e
commit 5415d3869a
5 changed files with 68 additions and 41 deletions

View file

@ -1,5 +1,6 @@
package code.name.monkey.retromusic.fragments.backup
import android.content.ContentResolver
import android.net.Uri
import android.os.Bundle
import android.provider.MediaStore
@ -65,10 +66,10 @@ class RestoreActivity : AppCompatActivity() {
private fun getFileName(uri: Uri?): String? {
when (uri?.scheme) {
"file" -> {
ContentResolver.SCHEME_FILE -> {
return uri.lastPathSegment
}
"content" -> {
ContentResolver.SCHEME_CONTENT -> {
val proj = arrayOf(MediaStore.Files.FileColumns.DISPLAY_NAME)
contentResolver.query(
uri, proj, null, null, null

View file

@ -308,7 +308,7 @@ class FoldersFragment : AbsMainActivityFragment(R.layout.fragment_folder),
openQueue(songs, startIndex, true)
} else {
Snackbar.make(
binding.root,
mainActivity.slidingPanel,
Html.fromHtml(
String.format(
getString(R.string.not_listed_in_media_store), file1.name