mirror of
https://gitlab.com/ultrasonic/ultrasonic.git
synced 2025-06-16 23:42:12 +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 {
|
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
|
// The remainder tracks should be added to the download queue
|
||||||
|
@ -265,8 +265,8 @@ class StorageFile(
|
|||||||
val createdUri = DocumentsContract.createDocument(
|
val createdUri = DocumentsContract.createDocument(
|
||||||
UApp.applicationContext().contentResolver,
|
UApp.applicationContext().contentResolver,
|
||||||
parent.uri,
|
parent.uri,
|
||||||
mimeTypeMap.getMimeTypeFromExtension(name.extension())!!,
|
"*/*",
|
||||||
name.withoutExtension()
|
name
|
||||||
) ?: throw IOException("Can't create file")
|
) ?: throw IOException("Can't create file")
|
||||||
|
|
||||||
return StorageFile(parent, createdUri, name, false)
|
return StorageFile(parent, createdUri, name, false)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user