Skip to content

plugins.tvp: fix channel ID lookup #4997

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 24, 2022

Conversation

bastimeyer
Copy link
Member

  • Fix channel ID lookup
  • Fix validation schema on missing data
  • Add more stream types to live streams: HTTPStream for content restriction clips, and DASHStream where HLS is not available
  • Apply minor code refactoring

Resolves #4996

I didn't check anything VOD related...

@HappyPlotter could you please test and verify these changes? Thanks.

@bastimeyer bastimeyer added the plugin issue A Plugin does not work correctly label Nov 24, 2022
@HappyPlotter
Copy link
Contributor

It seems to be working fine, I could not test the VOD but for the live I did get the playlist. Thank you

@HappyPlotter
Copy link
Contributor

HappyPlotter commented Nov 24, 2022

I seem to get the wrong qualities

[04:26:52.355955][cli][info] streamlink is running as root! Be careful!
[04:26:52.374621][cli][debug] OS:         Linux-5.4.0-132-generic-x86_64-with-glibc2.29
[04:26:52.374812][cli][debug] Python:     3.8.10
[04:26:52.374915][cli][debug] Streamlink: 5.1.1+2.g29d1f392
[04:26:52.376123][cli][debug] Dependencies:
[04:26:52.379605][cli][debug]  certifi: 2022.6.15
[04:26:52.381488][cli][debug]  isodate: 0.6.1
[04:26:52.383097][cli][debug]  lxml: 4.6.5
[04:26:52.385229][cli][debug]  pycountry: 22.3.5
[04:26:52.386759][cli][debug]  pycryptodome: 3.9.9
[04:26:52.390074][cli][debug]  PySocks: 1.6.8
[04:26:52.391394][cli][debug]  requests: 2.27.1
[04:26:52.394885][cli][debug]  urllib3: 1.26.12
[04:26:52.396232][cli][debug]  websocket-client: 1.3.2
[04:26:52.399519][cli][debug]  importlib-metadata: 1.5.0
[04:26:52.399831][cli][debug] Arguments:
[04:26:52.399948][cli][debug]  url=https://tvpstream.vod.tvp.pl/?channel_id=1455
[04:26:52.400072][cli][debug]  --loglevel=all
[04:26:52.400490][cli][info] Found matching plugin tvp for URL https://tvpstream.vod.tvp.pl/?channel_id=1455
[04:26:53.824103][plugins.tvp][debug] video ID: 14812849
[04:26:54.328928][utils.l10n][debug] Language code: en_US
[04:26:54.790477][stream.hls_playlist][all] #EXT-X-VERSION:3
[04:26:54.790676][stream.hls_playlist][all] #EXT-X-STREAM-INF:BANDWIDTH=1320000,RESOLUTION=720x404
[04:26:54.790800][stream.hls_playlist][all] stream_3.m3u8
[04:26:54.791014][stream.hls_playlist][all] #EXT-X-STREAM-INF:BANDWIDTH=1100000,RESOLUTION=720x404
[04:26:54.791144][stream.hls_playlist][all] stream_4.m3u8
[04:26:54.791316][stream.hls_playlist][all] #EXT-X-STREAM-INF:BANDWIDTH=770000,RESOLUTION=512x288
[04:26:54.791435][stream.hls_playlist][all] stream_5.m3u8
[04:26:54.791615][stream.hls_playlist][all] #EXT-X-STREAM-INF:BANDWIDTH=440000,RESOLUTION=512x288
[04:26:54.791741][stream.hls_playlist][all] stream_6.m3u8
Available streams: 288p_alt (worst), 288p, 404p_alt, 404p (best)

720 and 1080 are missing

- Fix channel ID lookup
- Fix validation schema on missing data
- Add more stream types to live streams: HTTPStream for content
  restriction clips, and DASHStream where HLS is not available
- Apply minor code refactoring
@bastimeyer
Copy link
Member Author

Some channels appear to have multiple entries for hls streams with the first one having all qualities available. Since the order of other stream types in the whole response data is not guaranteed and the streams can't be iterated in the returned order, I had to implement a kinda awkward workaround, so that it always gets HLS streams first. Should be working fine now.

@HappyPlotter
Copy link
Contributor

Yes, it works fine now. Thank you

@bastimeyer bastimeyer merged commit f51bff0 into streamlink:master Nov 24, 2022
@bastimeyer bastimeyer deleted the plugins/tvp/fix-4996 branch November 24, 2022 17:08
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.tvp: Unable to validate value of key 'result'
2 participants