Make external media follow app preferences (#433)
This commit is contained in:
parent
7a3b67f64b
commit
096dd25a94
1 changed files with 2 additions and 1 deletions
|
@ -222,7 +222,8 @@ class DownloaderImpl(
|
||||||
database.insertMediaStream(mediaStream.toFindroidMediaStreamDto(id, source.id, streamPath.path.orEmpty()))
|
database.insertMediaStream(mediaStream.toFindroidMediaStreamDto(id, source.id, streamPath.path.orEmpty()))
|
||||||
val request = DownloadManager.Request(Uri.parse(mediaStream.path))
|
val request = DownloadManager.Request(Uri.parse(mediaStream.path))
|
||||||
.setTitle(mediaStream.title)
|
.setTitle(mediaStream.title)
|
||||||
.setAllowedNetworkTypes(DownloadManager.Request.NETWORK_WIFI)
|
.setAllowedOverMetered(appPreferences.downloadOverMobileData)
|
||||||
|
.setAllowedOverRoaming(appPreferences.downloadWhenRoaming)
|
||||||
.setNotificationVisibility(DownloadManager.Request.VISIBILITY_HIDDEN)
|
.setNotificationVisibility(DownloadManager.Request.VISIBILITY_HIDDEN)
|
||||||
.setDestinationUri(streamPath)
|
.setDestinationUri(streamPath)
|
||||||
val downloadId = downloadManager.enqueue(request)
|
val downloadId = downloadManager.enqueue(request)
|
||||||
|
|
Loading…
Reference in a new issue