From 4dfb005d6909c37b16e08ec76f101e179d93d3f3 Mon Sep 17 00:00:00 2001 From: NamedKitten Date: Mon, 15 Oct 2018 16:11:11 +0100 Subject: [PATCH] Make MPV less verbose and make arg parsing better... --- src/mpvobject.cpp | 2 +- src/qml/main.qml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mpvobject.cpp b/src/mpvobject.cpp index 3f3bab4..15d603f 100644 --- a/src/mpvobject.cpp +++ b/src/mpvobject.cpp @@ -169,7 +169,7 @@ MpvObject::MpvObject(QQuickItem * parent) throw std::runtime_error("could not create mpv context"); mpv_set_option_string(mpv, "terminal", "yes"); - mpv_set_option_string(mpv, "msg-level", "all=v"); + //mpv_set_option_string(mpv, "msg-level", "all=v"); if (mpv_initialize(mpv) < 0) throw std::runtime_error("could not initialize mpv context"); diff --git a/src/qml/main.qml b/src/qml/main.qml index d2f51db..9096dfb 100644 --- a/src/qml/main.qml +++ b/src/qml/main.qml @@ -131,11 +131,11 @@ ApplicationWindow { Component.onCompleted: { var args = Qt.application.arguments var len = Qt.application.arguments.length - var argNo = 0 + var argNo = 1 renderer.setOption("ytdl-format", "bestvideo[width<=" + Screen.width + "][height<=" + Screen.height + "]+bestaudio") if (len > 1) { - for (argNo = 0; argNo < len; argNo++) { + for (argNo = 1; argNo < len; argNo++) { var argument = args[argNo] if (argument.startsWith("--")) { argument = argument.substr(2) @@ -215,7 +215,7 @@ ApplicationWindow { TextField { id: pathText - text: "/home/kitteh/babyshark.mkv" + text: "/home/kitteh/test.mkv" placeholderText: qsTr("URL / File Path") } }