Thanks to visit codestin.com
Credit goes to github.com

Skip to content

plugins.soop: fix return_type for lg_cdn#6749

Merged
bastimeyer merged 1 commit into
streamlink:masterfrom
yayokorea:fix-soop-lg-cdn
Dec 18, 2025
Merged

plugins.soop: fix return_type for lg_cdn#6749
bastimeyer merged 1 commit into
streamlink:masterfrom
yayokorea:fix-soop-lg-cdn

Conversation

@yayokorea

Copy link
Copy Markdown
Contributor

Summary

Soop has started returning lg_cdn as the CDN identifier (previously gs_cdn).
The plugin maps CDN identifiers to *_pc_web for the return_type parameter, so lg_cdn needs to be converted to lg_cdn_pc_web as well.

Changes

  • Map lg_cdn -> lg_cdn_pc_web in Soop.CDN_TYPE_MAPPING

Reproduction

streamlink https://play.sooplive.co.kr/sirianrain/290044878

Debug log (before)

error: Unable to open URL: https://livestream-manager.sooplive.co.kr/broad_stream_assign.html (400 Client Error: Bad Request for url: https://livestream-manager.sooplive.co.kr/broad_stream_assign.html?return_type=lg_cdn&broad_key=290044878-common-sd-hls)

Debug log (after)

Available streams: 360p (worst), 540p, 720p, 1080p (best)

@bastimeyer

Copy link
Copy Markdown
Member

Is this a region-based thing? The stream works fine here from master:

$ streamlink -l debug -o /dev/null https://play.sooplive.co.kr/sirianrain/290044878 best
[cli][debug] OS:         Linux-6.18.0-1-git-x86_64-with-glibc2.42
[cli][debug] Python:     3.14.2
[cli][debug] OpenSSL:    OpenSSL 3.6.0 1 Oct 2025
[cli][debug] Streamlink: 8.1.0+2.g3311df6f
[cli][debug] Dependencies:
[cli][debug]  certifi: 2025.11.12
[cli][debug]  isodate: 0.7.2
[cli][debug]  lxml: 6.0.2
[cli][debug]  pycountry: 24.6.1
[cli][debug]  pycryptodome: 3.23.0
[cli][debug]  PySocks: 1.7.1
[cli][debug]  requests: 2.32.5
[cli][debug]  trio: 0.32.0
[cli][debug]  trio-websocket: 0.12.2
[cli][debug]  urllib3: 2.6.2
[cli][debug]  websocket-client: 1.9.0
[cli][debug] Arguments:
[cli][debug]  url=https://play.sooplive.co.kr/sirianrain/290044878
[cli][debug]  stream=['best']
[cli][debug]  --loglevel=debug
[cli][debug]  --player=mpv
[cli][debug]  --output=/dev/null
[cli][debug]  --webbrowser-headless=True
[cli][info] Found matching plugin soop for URL https://play.sooplive.co.kr/sirianrain/290044878
[cli][info] Available streams: 360p (worst), 540p, 720p, 1080p (best)
[cli][info] Opening stream: 1080p (hls)
[cli][info] Writing output to
/dev/null
[cli][debug] Checking file output
[stream.hls][debug] Reloading playlist
[cli][debug] Pre-buffering 8192 bytes
[stream.hls][debug] First Sequence: 22680; Last Sequence: 22685
[stream.hls][debug] Start offset: 0; Duration: 0.0; Start Sequence: 22683; End Sequence: None
[stream.segmented][debug] Queuing HLSSegment(num=22683, init=False, discontinuity=False, duration=2.021, title=None, key=None, byterange=None, date=None, map=None, fileext='TS')
[stream.segmented][debug] Queuing HLSSegment(num=22684, init=False, discontinuity=False, duration=2.005, title=None, key=None, byterange=None, date=None, map=None, fileext='TS')
[stream.segmented][debug] Queuing HLSSegment(num=22685, init=False, discontinuity=False, duration=2.011, title=None, key=None, byterange=None, date=None, map=None, fileext='TS')
[stream.hls][debug] Writing segment 22683 to output
[stream.hls][debug] Segment 22683 complete
[cli][debug] Writing stream to output
[stream.hls][debug] Writing segment 22684 to output
[stream.hls][debug] Segment 22684 complete
[stream.hls][debug] Writing segment 22685 to output
[stream.hls][debug] Segment 22685 complete
[stream.hls][debug] Reloading playlist
[stream.segmented][debug] Queuing HLSSegment(num=22686, init=False, discontinuity=False, duration=2.016, title=None, key=None, byterange=None, date=None, map=None, fileext='TS')
[stream.hls][debug] Writing segment 22686 to output
[stream.hls][debug] Segment 22686 complete
[stream.hls][debug] Reloading playlist
[stream.segmented][debug] Queuing HLSSegment(num=22687, init=False, discontinuity=False, duration=2.021, title=None, key=None, byterange=None, date=None, map=None, fileext='TS')
[stream.hls][debug] Writing segment 22687 to output
[stream.hls][debug] Segment 22687 complete
[stream.hls][debug] Reloading playlist
[stream.segmented][debug] Queuing HLSSegment(num=22688, init=False, discontinuity=False, duration=2.005, title=None, key=None, byterange=None, date=None, map=None, fileext='TS')
[stream.hls][debug] Writing segment 22688 to output
[stream.hls][debug] Segment 22688 complete
[stream.segmented][debug] Closing worker thread
[stream.segmented][debug] Closing writer thread
[cli][info] Stream ended
Interrupted! Exiting...
[cli][info] Closing currently open stream...
[download] Written 11.98 MiB to /dev/null (6s @ 1.92 MiB/s)

@bastimeyer bastimeyer added the plugin issue A Plugin does not work correctly label Dec 18, 2025
@yayokorea

Copy link
Copy Markdown
Contributor Author

Yes, it seems to be region-based.

From a KR IP, the API returns CDN=lg_cdn, and Streamlink then calls
broad_stream_assign.html?return_type=lg_cdn, which consistently returns HTTP 400 for me.

This PR maps lg_cdn to lg_cdn_pc_web, similar to the existing gs_cdn handling.
After that change, the stream works as expected from KR.

It likely works fine on master in other regions because a different CDN value is returned there.

@bastimeyer bastimeyer merged commit b224e16 into streamlink:master Dec 18, 2025
18 checks passed
@bastimeyer

Copy link
Copy Markdown
Member

Thanks

@yayokorea yayokorea deleted the fix-soop-lg-cdn branch December 18, 2025 20:01
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.

2 participants