mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
fixed #580
This commit is contained in:
parent
ae6dfe6a49
commit
c191d16b01
1 changed files with 10 additions and 0 deletions
|
@ -1055,6 +1055,16 @@ object VideoDownloadManager {
|
||||||
): Int {
|
): Int {
|
||||||
val displayName = getDisplayName(name, extension)
|
val displayName = getDisplayName(name, extension)
|
||||||
|
|
||||||
|
// delete all subtitle files
|
||||||
|
if (extension == "mp4") {
|
||||||
|
try {
|
||||||
|
delete(context, name, folder, "vtt", parentId, basePath)
|
||||||
|
delete(context, name, folder, "srt", parentId, basePath)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
logError(e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If scoped storage and using download dir (not accessible with UniFile)
|
// If scoped storage and using download dir (not accessible with UniFile)
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && basePath.isDownloadDir()) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && basePath.isDownloadDir()) {
|
||||||
val relativePath = getRelativePath(folder)
|
val relativePath = getRelativePath(folder)
|
||||||
|
|
Loading…
Reference in a new issue