Simple streamlink support (#97)
* Simple streamlink support Relies on settings entry & loads best available quality by default.
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
#include <QPainter>
|
||||
#include <QShortcut>
|
||||
#include <QVBoxLayout>
|
||||
#include <QFileInfo>
|
||||
#include <QProcess>
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
#include <functional>
|
||||
@@ -270,5 +272,20 @@ void ChatWidget::doOpenPopupPlayer()
|
||||
<< QString::fromStdString(this->channelName.getValue()) << "/popout";
|
||||
}
|
||||
|
||||
void ChatWidget::doOpenStreamlink()
|
||||
{
|
||||
SettingsManager &settings = SettingsManager::getInstance();
|
||||
QString path = QString::fromStdString(settings.streamlinkPath.getValue());
|
||||
QFileInfo fileinfo = QFileInfo(path);
|
||||
// TODO(Confuseh): Add default checks for streamlink/livestreamer
|
||||
// TODO(Confuseh): Add quality switcher
|
||||
if (fileinfo.exists() && fileinfo.isExecutable()) {
|
||||
// works on leenux, idk whether it would work on whindows or mehOS
|
||||
QProcess::startDetached(path,
|
||||
QStringList({"twitch.tv/" + QString::fromStdString(this->channelName.getValue()),
|
||||
"best"}));
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace widgets
|
||||
} // namespace chatterino
|
||||
|
||||
Reference in New Issue
Block a user