Skip to content

Conversation

@bastimeyer
Copy link
Member

  • Remove rerun check and disable --twitch-disable-reruns plugin argument
  • Implement a new _check_is_live() which checks the channel and stream status, based on the previously used StreamMetadata GQL query
  • Update tests

Fixes #5703
Resolves #5656

Twitch doesn't list this in their API changelog, but reruns were removed some time ago, and streamers can't use VODs anymore to go live automatically. This means that the --twitch-disable-reruns plugin argument and the API check it did has to be removed.

In #5703 I initially commented about a different GQL query, but the old StreamMetadata query previously used by the rerun check can be reused here, as it returns the same data, in addition to more data we don't care about.


Quick test:

unknown channel

$ streamlink twitch.tv/dxtcfyvghbujyughubjk
[cli][info] Found matching plugin twitch for URL twitch.tv/dxtcfyvghbujyughubjk
[plugins.twitch][error] Unknown channel
error: No playable streams found on this URL: twitch.tv/dxtcfyvghbujyughubjk

offline channel

$ streamlink twitch.tv/twitch
[cli][info] Found matching plugin twitch for URL twitch.tv/twitch
[plugins.twitch][error] Channel is offline
error: No playable streams found on this URL: twitch.tv/twitch

live channel

$ streamlink twitch.tv/eslcs
[cli][info] Found matching plugin twitch for URL twitch.tv/eslcs
Available streams: audio_only, 160p (worst), 360p, 480p, 720p, 720p60, 1080p60 (best)

suppressed plugin argument

$ streamlink twitch.tv/eslcs --twitch-disable-reruns 
[cli][info] Found matching plugin twitch for URL twitch.tv/eslcs
Available streams: audio_only, 160p (worst), 360p, 480p, 720p, 720p60, 1080p60 (best)

retry streams with cleaner error message

$ streamlink twitch.tv/paymoneywubby --retry-streams 5
[cli][info] Found matching plugin twitch for URL twitch.tv/paymoneywubby
[plugins.twitch][error] Channel is offline
[cli][info] Waiting for streams, retrying every 5.0 second(s)
[plugins.twitch][error] Channel is offline
[plugins.twitch][error] Channel is offline
[plugins.twitch][error] Channel is offline
^CInterrupted! Exiting...

@bastimeyer bastimeyer added the plugin issue A Plugin does not work correctly label Dec 5, 2023
@bastimeyer
Copy link
Member Author

No idea where the linting issue is coming from. I have the same deps on my system.
Will check this later...

@bastimeyer bastimeyer force-pushed the plugins/twitch/drop-disable-reruns branch from de79408 to ff15b78 Compare December 5, 2023 13:02
- Remove rerun check and disable --twitch-disable-reruns plugin argument
- Implement a new `_check_is_live()` which checks the channel and stream
  status, based on the previously used `StreamMetadata` GQL query
- Update tests
@bastimeyer bastimeyer force-pushed the plugins/twitch/drop-disable-reruns branch from ff15b78 to 8eb16ea Compare December 5, 2023 13:08
@bastimeyer bastimeyer merged commit e58fe24 into streamlink:master Dec 5, 2023
@bastimeyer bastimeyer deleted the plugins/twitch/drop-disable-reruns branch December 5, 2023 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin issue A Plugin does not work correctly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plugins.twitch: returns streams while channel is offline plugins.twitch: latest update started flooding console with confusing messages

1 participant