mirror of
https://gitlab.com/ultrasonic/ultrasonic.git
synced 2025-04-16 09:20:37 +03:00
Fixed SAF file creation to ignore mime type
This commit is contained in:
parent
2da16c7046
commit
8d43717a5e
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user