-
-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support for multiple audio/subtitle downloads
- Loading branch information
1 parent
fd8dd26
commit f1d16ba
Showing
10 changed files
with
133 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 0 additions & 21 deletions
21
app/src/main/java/ani/dantotsu/addons/download/DownloadAddonApi.kt
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
app/src/main/java/ani/dantotsu/addons/download/DownloadAddonApiV2.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters