[duplicated subtitle] Initialize subtitle cache directory for SubtitleDeduplicator
- Configure cache directory as `/storage/emulated/0/Android/data/<package_name>/cache/subtitle_cache`, otherwise it will be 'null', and subtitle deduplication will be skipped. - Ensures this initialization is called before `checkAndDeduplicate()` in `SubtitleDeduplicator.java` (NewPipeExtractor).
This commit is contained in:
parent
addf1e23b3
commit
f99d53a94e
@ -31,6 +31,7 @@ import androidx.core.os.BundleCompat;
|
||||
|
||||
import org.schabi.newpipe.BuildConfig;
|
||||
import org.schabi.newpipe.MainActivity;
|
||||
import org.schabi.newpipe.extractor.utils.SubtitleDeduplicator;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
@ -70,6 +71,8 @@ public final class StateSaver {
|
||||
if (TextUtils.isEmpty(cacheDirPath)) {
|
||||
cacheDirPath = context.getCacheDir().getAbsolutePath();
|
||||
}
|
||||
|
||||
SubtitleDeduplicator.setCacheDirPath(cacheDirPath);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user