feat: support for multiple audio/subtitle downloads
This commit is contained in:
parent
fd8dd26435
commit
f1d16ba16a
10 changed files with 137 additions and 117 deletions
|
@ -0,0 +1,32 @@
|
|||
package ani.dantotsu.addons.download
|
||||
|
||||
import android.content.Context
|
||||
import android.net.Uri
|
||||
|
||||
interface DownloadAddonApiV2 {
|
||||
|
||||
fun cancelDownload(sessionId: Long)
|
||||
|
||||
fun setDownloadPath(context: Context, uri: Uri): String
|
||||
|
||||
suspend fun executeFFProbe(
|
||||
videoUrl: String,
|
||||
headers: Map<String, String> = emptyMap(),
|
||||
logCallback: (String) -> Unit
|
||||
)
|
||||
|
||||
suspend fun executeFFMpeg(
|
||||
videoUrl: String,
|
||||
downloadPath: String,
|
||||
headers: Map<String, String> = emptyMap(),
|
||||
subtitleUrls: List<Pair<String, String>> = emptyList(),
|
||||
audioUrls: List<Pair<String, String>> = emptyList(),
|
||||
statCallback: (Double) -> Unit
|
||||
): Long
|
||||
|
||||
fun getState(sessionId: Long): String
|
||||
|
||||
fun getStackTrace(sessionId: Long): String?
|
||||
|
||||
fun hadError(sessionId: Long): Boolean
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue