Improve Streamlink documentation (#5076)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
fraxx
2024-01-12 22:15:42 +02:00
committed by GitHub
parent 5c9747e08f
commit 06f950a55b
4 changed files with 87 additions and 97 deletions
@@ -1,9 +1,10 @@
#include "ExternalToolsPage.hpp"
#include "widgets/settingspages/ExternalToolsPage.hpp"
#include "singletons/Settings.hpp"
#include "util/Helpers.hpp"
#include "util/LayoutCreator.hpp"
#include "util/RemoveScrollAreaBackground.hpp"
#include "util/StreamLink.hpp"
#include <QFormLayout>
#include <QGroupBox>
@@ -28,7 +29,7 @@ ExternalToolsPage::ExternalToolsPage()
auto group = layout.emplace<QGroupBox>("Streamlink");
auto groupLayout = group.setLayoutType<QFormLayout>();
auto description = new QLabel(
auto *description = new QLabel(
"Streamlink is a command-line utility that pipes video streams "
"from various "
"services into a video player, such as VLC. Make sure to edit the "
@@ -36,7 +37,7 @@ ExternalToolsPage::ExternalToolsPage()
description->setWordWrap(true);
description->setStyleSheet("color: #bbb");
auto links = new QLabel(
auto *links = new QLabel(
formatRichNamedLink("https://streamlink.github.io/", "Website") +
" " +
formatRichNamedLink(
@@ -54,13 +55,21 @@ ExternalToolsPage::ExternalToolsPage()
groupLayout->setWidget(0, QFormLayout::SpanningRole, description);
groupLayout->setWidget(1, QFormLayout::SpanningRole, links);
auto customPathCb =
auto *customPathCb =
this->createCheckBox("Use custom path (Enable if using "
"non-standard streamlink installation path)",
getSettings()->streamlinkUseCustomPath);
groupLayout->setWidget(2, QFormLayout::SpanningRole, customPathCb);
auto customPath = this->createLineEdit(getSettings()->streamlinkPath);
auto *note = new QLabel(
QStringLiteral(
"Chatterino expects the executable to be called \"%1\".")
.arg(STREAMLINK_BINARY_NAME));
note->setWordWrap(true);
note->setStyleSheet("color: #bbb");
groupLayout->setWidget(3, QFormLayout::SpanningRole, note);
auto *customPath = this->createLineEdit(getSettings()->streamlinkPath);
customPath->setPlaceholderText(
"Path to folder where Streamlink executable can be found");
groupLayout->addRow("Custom streamlink path:", customPath);
@@ -84,7 +93,7 @@ ExternalToolsPage::ExternalToolsPage()
auto group = layout.emplace<QGroupBox>("Custom stream player");
auto groupLayout = group.setLayoutType<QFormLayout>();
const auto description = new QLabel(
auto *description = new QLabel(
"You can open Twitch streams directly in any video player that "
"has built-in Twitch support and has own URI Scheme.\nE.g.: "
"IINA for macOS and Potplayer (with extension) for "
@@ -96,7 +105,7 @@ ExternalToolsPage::ExternalToolsPage()
groupLayout->setWidget(0, QFormLayout::SpanningRole, description);
auto lineEdit = this->createLineEdit(getSettings()->customURIScheme);
auto *lineEdit = this->createLineEdit(getSettings()->customURIScheme);
lineEdit->setPlaceholderText("custom-player-scheme://");
groupLayout->addRow("Custom stream player URI Scheme:", lineEdit);
}
@@ -106,7 +115,7 @@ ExternalToolsPage::ExternalToolsPage()
auto group = layout.emplace<QGroupBox>("Image Uploader");
auto groupLayout = group.setLayoutType<QFormLayout>();
const auto description = new QLabel(
auto *description = new QLabel(
"You can set custom host for uploading images, like "
"imgur.com or s-ul.eu.<br>Check " +
formatRichNamedLink("https://chatterino.com/help/image-uploader",