From 912b9b89b34d6659407c74be484b5fe06534fac7 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sun, 17 Dec 2017 16:34:01 +0100 Subject: [PATCH] Fix streamlink "choose" option if user has a default quality in config Fixes #146 --- src/widgets/split.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/widgets/split.cpp b/src/widgets/split.cpp index 30c8fa10c..55f69702f 100644 --- a/src/widgets/split.cpp +++ b/src/widgets/split.cpp @@ -360,12 +360,9 @@ void Split::doOpenStreamlink() QProcess *p = new QProcess(); // my god that signal though QObject::connect(p, static_cast(&QProcess::finished), this, - [path, channel, p](int exitCode) { - if (exitCode > 0) { - return; - } + [path, channel, p](int) { QString lastLine = QString(p->readAllStandardOutput()); - lastLine = lastLine.trimmed().split('\n').last(); + lastLine = lastLine.trimmed().split('\n').last().trimmed(); if (lastLine.startsWith("Available streams: ")) { QStringList options; QStringList split = @@ -385,7 +382,7 @@ void Split::doOpenStreamlink() QualityPopup::showDialog(channel, path, options); } }); - p->start(path, {"twitch.tv/" + channel}); + p->start(path, {"twitch.tv/" + channel, "--default-stream=KKona"}); } }