aboutsummaryrefslogtreecommitdiff
path: root/src/QuickMedia.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-08-07 16:21:05 +0200
committerdec05eba <dec05eba@protonmail.com>2021-08-07 16:21:33 +0200
commiteb89e4048642a4ebf73635730e2a0aa960e7ecdd (patch)
tree14158bcdd86a82ce746e1fce583bfaa192f18f4e /src/QuickMedia.cpp
parentfc4d55f8464779e0912be771973ebd94a27df951 (diff)
Fix seeking in youtube videos larger than 2gb, launch launcher when running qm without any args
Diffstat (limited to 'src/QuickMedia.cpp')
-rw-r--r--src/QuickMedia.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index bb92484..86177dc 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -347,7 +347,7 @@ namespace QuickMedia {
}
static void usage() {
- fprintf(stderr, "usage: quickmedia <plugin> [--no-video] [--use-system-mpv-config] [--dir <directory>] [-e <window>] [youtube-url]\n");
+ fprintf(stderr, "usage: quickmedia [plugin] [--no-video] [--use-system-mpv-config] [--dir <directory>] [-e <window>] [youtube-url]\n");
fprintf(stderr, "OPTIONS:\n");
fprintf(stderr, " plugin The plugin to use. Should be either launcher, 4chan, manga, manganelo, manganelos, mangatown, mangakatana, mangadex, readm, onimanga, youtube, soundcloud, nyaa.si, matrix, saucenao, hotexamples, file-manager, stdin, pornhub, spankbang, xvideos or xhamster\n");
fprintf(stderr, " --no-video Only play audio when playing a video. Disabled by default\n");
@@ -357,7 +357,7 @@ namespace QuickMedia {
fprintf(stderr, " --dir <directory> Set the start directory when using file-manager. Default is the the users home directory\n");
fprintf(stderr, " -e <window> Embed QuickMedia into another window\n");
fprintf(stderr, "EXAMPLES:\n");
- fprintf(stderr, " quickmedia launcher\n");
+ fprintf(stderr, " quickmedia\n");
fprintf(stderr, " quickmedia --upscale-images-always manganelo\n");
fprintf(stderr, " quickmedia https://www.youtube.com/watch?v=jHg91NVHh3s\n");
fprintf(stderr, " echo -e \"hello\\nworld\" | quickmedia stdin\n");
@@ -381,11 +381,14 @@ namespace QuickMedia {
}
int Program::run(int argc, char **argv) {
- if(argc < 2) {
+ if(argc < 1) {
usage();
return -1;
}
+ if(argc == 1)
+ plugin_name = "launcher";
+
Window parent_window = None;
std::vector<Tab> tabs;
const char *url = nullptr;