aboutsummaryrefslogtreecommitdiff
path: root/src/VideoPlayer.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-03-06 05:14:51 +0100
committerdec05eba <dec05eba@protonmail.com>2022-03-06 05:14:51 +0100
commit123124a4a89d83f605d67d94145b4008b9a5b1d7 (patch)
treed09c4a9714f3eb89dd9720e51f8ef799ad2d189b /src/VideoPlayer.cpp
parent0a64acc3d68fecf5e7f23c6b0a013272f9288af8 (diff)
Do not cache local-anime, reseek to anime on progress update
Diffstat (limited to 'src/VideoPlayer.cpp')
-rw-r--r--src/VideoPlayer.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/VideoPlayer.cpp b/src/VideoPlayer.cpp
index 26e2013..3d3fcc7 100644
--- a/src/VideoPlayer.cpp
+++ b/src/VideoPlayer.cpp
@@ -182,21 +182,26 @@ namespace QuickMedia {
"--force-seekable=yes",
"--image-display-duration=5",
"--cache-pause=yes",
- "--cache=yes",
- "--cache-on-disk=yes",
- "--cache-secs=86400", // 24 hours
"--sub-font-size=50",
"--sub-margin-y=60",
"--sub-border-size=2.0",
"--sub-bold=yes",
"--input-default-bindings=yes",
"--input-vo-keyboard=yes",
- cache_dir.c_str(),
wid_arg.c_str(),
"--ipc-fd",
ipc_fd.c_str()
});
+ if(startup_args.cache_on_disk) {
+ args.insert(args.end(), {
+ "--cache=yes",
+ "--cache-on-disk=yes",
+ "--cache-secs=86400", // 24 hours
+ cache_dir.c_str()
+ });
+ }
+
if(startup_args.resume) {
args.push_back("--save-position-on-quit=yes");
args.push_back("--resume-playback=yes");