Fixed SAF file creation to ignore mime type

This commit is contained in:
Nite 2023-01-13 20:48:11 +00:00
parent 2da16c7046
commit 8d43717a5e
2 changed files with 3 additions and 3 deletions

View File

@ -328,7 +328,7 @@ class DownloadService : Service(), KoinComponent {
}
filteredTracks = filteredTracks.filter {
!downloadQueue.contains(it.id) && !activeDownloads.contains(it.id)
!downloadQueue.any { i -> i.id == it.id } && !activeDownloads.containsKey(it.id)
}
// The remainder tracks should be added to the download queue

View File

@ -265,8 +265,8 @@ class StorageFile(
val createdUri = DocumentsContract.createDocument(
UApp.applicationContext().contentResolver,
parent.uri,
mimeTypeMap.getMimeTypeFromExtension(name.extension())!!,
name.withoutExtension()
"*/*",
name
) ?: throw IOException("Can't create file")
return StorageFile(parent, createdUri, name, false)