From 8c7e64991b6c05d57aaa8dda2df2dc53d789d6c4 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 7 Feb 2021 08:29:09 +0100 Subject: Dont download video with --no-video option, ignore events with state_key set if the event is not a m.room.member type --- src/VideoPlayer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/VideoPlayer.cpp') diff --git a/src/VideoPlayer.cpp b/src/VideoPlayer.cpp index 4653c5b..3b93c44 100644 --- a/src/VideoPlayer.cpp +++ b/src/VideoPlayer.cpp @@ -91,7 +91,11 @@ namespace QuickMedia { create_directory_recursive(mpv_watch_later_dir); std::string watch_later_dir = "--watch-later-directory=" + mpv_watch_later_dir.data; - std::string ytdl_format = "--ytdl-format=bestvideo[height<=?" + std::to_string(monitor_height) + "]+bestaudio/best"; + std::string ytdl_format; + if(no_video) + ytdl_format = "--ytdl-format=bestaudio/best"; + else + ytdl_format = "--ytdl-format=bestvideo[height<=?" + std::to_string(monitor_height) + "]+bestaudio/best"; // TODO: Resume playback if the last video played matches the first video played next time QuickMedia is launched args.insert(args.end(), { -- cgit v1.2.3