feat(media_downloader): download the whole dash media
This commit is contained in:
@@ -229,6 +229,7 @@ class DownloadsSection : Section() {
|
||||
}
|
||||
//open
|
||||
FilledIconButton(onClick = {
|
||||
if (download.outputFile == null) return@FilledIconButton
|
||||
val fileType = runCatching {
|
||||
context.androidContext.contentResolver.openInputStream(Uri.parse(download.outputFile))?.use { input ->
|
||||
FileType.fromInputStream(input)
|
||||
|
||||
@@ -364,6 +364,14 @@ class MediaDownloader : MessagingRuleFeature("MediaDownloader", MessagingRuleTyp
|
||||
selectedChapters.remove(which)
|
||||
}
|
||||
}
|
||||
setNegativeButton("Cancel") { dialog, _ -> dialog.dismiss() }
|
||||
setNeutralButton("Download all") { _, _ ->
|
||||
provideDownloadManagerClient(
|
||||
mediaIdentifier = paramMap["STORY_ID"].toString(),
|
||||
downloadSource = MediaDownloadSource.PUBLIC_STORY,
|
||||
mediaAuthor = storyName
|
||||
).downloadDashMedia(playlistUrl, 0, null)
|
||||
}
|
||||
setPositiveButton("Download") { dialog, which ->
|
||||
val groups = mutableListOf<MutableList<SnapChapterInfo>>()
|
||||
var currentGroup = mutableListOf<SnapChapterInfo>()
|
||||
|
||||
Reference in New Issue
Block a user