diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-02-07 08:29:09 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-02-07 08:29:09 +0100 |
commit | 8c7e64991b6c05d57aaa8dda2df2dc53d789d6c4 (patch) | |
tree | 20fe0960166fa8842b69a4d36f0ca6d7a80054dc /src/VideoPlayer.cpp | |
parent | 0d4b8bacce933e34a41769b1051b25f82f922201 (diff) |
Dont download video with --no-video option, ignore events with state_key set if the event is not a m.room.member type
Diffstat (limited to 'src/VideoPlayer.cpp')
-rw-r--r-- | src/VideoPlayer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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(), { |