Added option to log streams by their ID, allowing for easier "per-stream" log analyzing (#5507)

This commit is contained in:
pajlada
2024-07-14 11:45:21 +02:00
committed by GitHub
parent b9f669d3a5
commit 9788d0f8f7
12 changed files with 150 additions and 68 deletions
+12
View File
@@ -457,6 +457,7 @@ void TwitchChannel::updateStreamStatus(
auto stream = *helixStream;
{
auto status = this->streamStatus_.access();
status->streamId = stream.id;
status->viewerCount = stream.viewerCount;
status->gameId = stream.gameId;
status->game = stream.gameName;
@@ -770,6 +771,17 @@ void TwitchChannel::reconnect()
getIApp()->getTwitchAbstract()->connect();
}
QString TwitchChannel::getCurrentStreamID() const
{
auto streamStatus = this->accessStreamStatus();
if (streamStatus->live)
{
return streamStatus->streamId;
}
return {};
}
QString TwitchChannel::roomId() const
{
return *this->roomID_.access();
+2
View File
@@ -87,6 +87,7 @@ public:
QString uptime;
int uptimeSeconds = 0;
QString streamType;
QString streamId;
};
struct RoomModes {
@@ -133,6 +134,7 @@ public:
bool hasHighRateLimit() const override;
bool canReconnect() const override;
void reconnect() override;
QString getCurrentStreamID() const override;
void createClip();
// Data