mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Fix streamlink "choose" option if user has a default quality in config
Fixes #146
This commit is contained in:
parent
151ff057a6
commit
912b9b89b3
|
@ -360,12 +360,9 @@ void Split::doOpenStreamlink()
|
||||||
QProcess *p = new QProcess();
|
QProcess *p = new QProcess();
|
||||||
// my god that signal though
|
// my god that signal though
|
||||||
QObject::connect(p, static_cast<void (QProcess::*)(int)>(&QProcess::finished), this,
|
QObject::connect(p, static_cast<void (QProcess::*)(int)>(&QProcess::finished), this,
|
||||||
[path, channel, p](int exitCode) {
|
[path, channel, p](int) {
|
||||||
if (exitCode > 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
QString lastLine = QString(p->readAllStandardOutput());
|
QString lastLine = QString(p->readAllStandardOutput());
|
||||||
lastLine = lastLine.trimmed().split('\n').last();
|
lastLine = lastLine.trimmed().split('\n').last().trimmed();
|
||||||
if (lastLine.startsWith("Available streams: ")) {
|
if (lastLine.startsWith("Available streams: ")) {
|
||||||
QStringList options;
|
QStringList options;
|
||||||
QStringList split =
|
QStringList split =
|
||||||
|
@ -385,7 +382,7 @@ void Split::doOpenStreamlink()
|
||||||
QualityPopup::showDialog(channel, path, options);
|
QualityPopup::showDialog(channel, path, options);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
p->start(path, {"twitch.tv/" + channel});
|
p->start(path, {"twitch.tv/" + channel, "--default-stream=KKona"});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue