Added option to log streams by their ID, allowing for easier "per-stream" log analyzing (#5507)
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user