mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Merge branch 'master' of https://github.com/Confuseh/chatterino2 into Confuseh-master
This commit is contained in:
commit
74fec12848
|
@ -52,6 +52,7 @@ public:
|
|||
FloatSetting mouseScrollMultiplier = {"/behaviour/mouseScrollMultiplier", 1.0};
|
||||
QStringSetting streamlinkPath = {"/behaviour/streamlink/path", ""};
|
||||
QStringSetting preferredQuality = {"/behaviour/streamlink/quality", "Choose"};
|
||||
QStringSetting streamlinkOpts = {"/behaviour/streamlink/options", ""};
|
||||
BoolSetting pauseChatHover = {"/behaviour/pauseChatHover", false};
|
||||
|
||||
/// Commands
|
||||
|
|
|
@ -12,6 +12,7 @@ QualityPopup::QualityPopup(const QString &channel, const QString &path, QStringL
|
|||
{
|
||||
this->ui.okButton.setText("OK");
|
||||
this->ui.cancelButton.setText("Cancel");
|
||||
this->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
||||
QObject::connect(&this->ui.okButton, &QPushButton::clicked, this,
|
||||
&QualityPopup::okButtonClicked);
|
||||
|
@ -33,7 +34,7 @@ QualityPopup::QualityPopup(const QString &channel, const QString &path, QStringL
|
|||
|
||||
void QualityPopup::showDialog(const QString &channel, const QString &path, QStringList options)
|
||||
{
|
||||
static QualityPopup *instance = new QualityPopup(channel, path, options);
|
||||
QualityPopup *instance = new QualityPopup(channel, path, options);
|
||||
|
||||
instance->show();
|
||||
instance->activateWindow();
|
||||
|
@ -43,8 +44,9 @@ void QualityPopup::showDialog(const QString &channel, const QString &path, QStri
|
|||
|
||||
void QualityPopup::okButtonClicked()
|
||||
{
|
||||
singletons::SettingManager &settings = singletons::SettingManager::getInstance();
|
||||
QProcess::startDetached(this->path,
|
||||
{"twitch.tv/" + this->channel, this->ui.selector.currentText()});
|
||||
{"twitch.tv/" + this->channel, this->ui.selector.currentText(), settings.streamlinkOpts});
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <QWidget>
|
||||
|
||||
#include "basewindow.hpp"
|
||||
#include "singletons/settingsmanager.hpp"
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ BehaviourPage::BehaviourPage()
|
|||
groupLayout->addRow("Streamlink path:", this->createLineEdit(settings.streamlinkPath));
|
||||
groupLayout->addRow("Prefered quality:",
|
||||
this->createComboBox({STREAMLINK_QUALITY}, settings.preferredQuality));
|
||||
groupLayout->addRow("Additional options:", this->createLineEdit(settings.streamlinkOpts));
|
||||
}
|
||||
|
||||
layout->addStretch(1);
|
||||
|
|
|
@ -422,6 +422,7 @@ void Split::doOpenStreamlink()
|
|||
args << quality;
|
||||
if (exclude != "")
|
||||
args << "--stream-sorting-excludes" << exclude;
|
||||
args << settings.streamlinkOpts;
|
||||
QProcess::startDetached(path, args);
|
||||
} else {
|
||||
QProcess *p = new QProcess();
|
||||
|
|
Loading…
Reference in a new issue