Fix and improve Streamlink code

Move streamlink code to its own file

Fixes #275

Untested on linux, but should work decently there as well.
This commit is contained in:
Rasmus Karlsson
2018-03-24 14:13:04 +01:00
parent 6c56e9cc82
commit 41fbcc738b
6 changed files with 237 additions and 98 deletions
+27
View File
@@ -0,0 +1,27 @@
#pragma once
#include <QString>
#include <stdexcept>
#include <string>
namespace chatterino {
namespace streamlink {
class Exception : public std::runtime_error
{
public:
using std::runtime_error::runtime_error;
};
// Open streamlink for given channel, quality and extra arguments
// the "Additional arguments" are fetched and added at the beginning of the streamlink call
void OpenStreamlink(const QString &channelURL, const QString &quality,
QStringList extraArguments = QStringList());
// Start opening streamlink for the given channel, reading settings like quality from settings
// and opening a quality dialog if the quality is "Choose"
void Start(const QString &channel);
} // namespace streamlink
} // namespace chatterino