aboutsummaryrefslogtreecommitdiff
path: root/src/VideoPlayer.cpp
diff options
context:
space:
mode:
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");