Live streams that are marked as reruns now mark a tab as yellow instead of red (#5176)
This commit is contained in:
@@ -471,6 +471,15 @@ void TwitchChannel::updateStreamStatus(
|
||||
|
||||
status->rerun = false;
|
||||
status->streamType = stream.type;
|
||||
for (const auto &tag : stream.tags)
|
||||
{
|
||||
if (QString::compare(tag, "Rerun", Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
status->rerun = true;
|
||||
status->streamType = "rerun";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this->setLive(true))
|
||||
{
|
||||
@@ -797,6 +806,11 @@ bool TwitchChannel::isLive() const
|
||||
return this->streamStatus_.accessConst()->live;
|
||||
}
|
||||
|
||||
bool TwitchChannel::isRerun() const
|
||||
{
|
||||
return this->streamStatus_.accessConst()->rerun;
|
||||
}
|
||||
|
||||
SharedAccessGuard<const TwitchChannel::StreamStatus>
|
||||
TwitchChannel::accessStreamStatus() const
|
||||
{
|
||||
|
||||
@@ -138,6 +138,7 @@ public:
|
||||
const QString &popoutPlayerUrl();
|
||||
int chatterCount() const;
|
||||
bool isLive() const override;
|
||||
bool isRerun() const override;
|
||||
QString roomId() const;
|
||||
SharedAccessGuard<const RoomModes> accessRoomModes() const;
|
||||
SharedAccessGuard<const StreamStatus> accessStreamStatus() const;
|
||||
|
||||
@@ -69,6 +69,9 @@ struct HelixStream {
|
||||
QString language;
|
||||
QString thumbnailUrl;
|
||||
|
||||
// This is the names, the IDs are now always empty
|
||||
std::vector<QString> tags;
|
||||
|
||||
HelixStream()
|
||||
: id("")
|
||||
, userId("")
|
||||
@@ -99,6 +102,11 @@ struct HelixStream {
|
||||
, language(jsonObject.value("language").toString())
|
||||
, thumbnailUrl(jsonObject.value("thumbnail_url").toString())
|
||||
{
|
||||
const auto jsonTags = jsonObject.value("tags").toArray();
|
||||
for (const auto &tag : jsonTags)
|
||||
{
|
||||
this->tags.push_back(tag.toString());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user