aboutsummaryrefslogtreecommitdiff
path: root/src/VideoPlayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/VideoPlayer.cpp')
-rw-r--r--src/VideoPlayer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/VideoPlayer.cpp b/src/VideoPlayer.cpp
index 7f01912..3e22b8b 100644
--- a/src/VideoPlayer.cpp
+++ b/src/VideoPlayer.cpp
@@ -133,6 +133,7 @@ namespace QuickMedia {
wid_arg += parent_window_str;
std::string input_conf = "--input-conf=" + resource_root + "input.conf";
+ std::string cache_dir = "--cache-dir=" + std::move(get_cache_dir().join("media").data);
// TODO: Resume playback if the last video played matches the first video played next time QuickMedia is launched
args.insert(args.end(), {
@@ -149,6 +150,10 @@ namespace QuickMedia {
"--force-seekable=yes",
"--image-display-duration=5",
"--cache-pause=yes",
+ "--cache=yes",
+ "--cache-on-disk=yes",
+ "--cache-secs=86400", // 24 hours
+ cache_dir.c_str(),
input_conf.c_str(),
wid_arg.c_str()
});