twitch: Exclude highlights and only use stream_id for archives

This commit is contained in:
Mattéo Delabre 2021-09-13 15:33:35 +02:00
parent 90858fbf7b
commit f22a758e2e
Signed by: matteo
GPG Key ID: AE3FBD02DC583ABB
1 changed files with 4 additions and 1 deletions

View File

@ -44,7 +44,10 @@ def construct_rss(client: APIClient, login: str) -> str:
item = {}
if video.get("stream_id") is not None:
if video.get("type") not in ("upload", "archive"):
continue
if video.get("type") == "archive":
if stream is not None and stream["id"] == video["stream_id"]:
# Do not add a second item for the active stream
continue