streamlink: trim custom paths (#4834)

this makes sure no spaces are accidentally left in the custom path

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
Brian 2023-09-23 04:20:05 -04:00 committed by GitHub
parent 7ea742c593
commit c71e91200a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View file

@ -5,6 +5,7 @@
- Minor: Migrate to the new Get Channel Followers Helix endpoint, fixing follower count not showing up in usercards. (#4809)
- Minor: The account switcher is now styled to match your theme. (#4817)
- Minor: Add an invisible resize handle to the bottom of frameless user info popups and reply thread popups. (#4795)
- Bugfix: Trimmed custom streamlink paths on all platforms making sure you don't accidentally add spaces at the beginning or end of its path. (#4834)
- Bugfix: Fixed a performance issue when displaying replies to certain messages. (#4807)
- Bugfix: Fixed a data race when disconnecting from Twitch PubSub. (#4771)
- Bugfix: Fixed `/shoutout` command not working with usernames starting with @'s (e.g. `/shoutout @forsen`). (#4800)

View file

@ -75,17 +75,16 @@ namespace {
QProcess *createStreamlinkProcess()
{
auto p = new QProcess;
auto *p = new QProcess;
const QString path = [] {
const QString path = []() -> QString {
if (getSettings()->streamlinkUseCustomPath)
{
return getSettings()->streamlinkPath + "/" + getBinaryName();
}
else
{
return QString{getBinaryName()};
const QString path = getSettings()->streamlinkPath;
return path.trimmed() + "/" + getBinaryName();
}
return {getBinaryName()};
}();
if (Version::instance().isFlatpak())