Repository: yt-dlp
Issue: [Mediasite] Slide extraction broken
Labels: site-bug,triage

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting that yt-dlp is broken on a **supported** site
- [X] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#video-url-contains-an-ampersand--and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [X] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required

### Region

_No response_

### Provide a description that is worded well enough to be understood

I am trying to download a lecture as slides from mediasite and combine it with the audio, since the video recording offered is 400x224 (unreadable) but the slides are 1920x1080. Support for the ability to download as slides was added in https://github.com/yt-dlp/yt-dlp/pull/343/. Unfortunately, while I can now download mediasite video and audio recordings since https://github.com/yt-dlp/yt-dlp/issues/10270 was resolved, I cannot download the slides and it doesn't show up as an option for any video.

I believe the issue is somewhere around line 247 at https://github.com/yt-dlp/yt-dlp/blob/master/yt_dlp/extractor/mediasite.py#L247 as there were issues around there which had to be fixed recently and that yt-dlp having an issue with the conditions in the code on adding the slide stream as an option.

**Reference**
This part is implemented already at https://github.com/yt-dlp/yt-dlp/blob/master/yt_dlp/extractor/mediasite.py#L118 but I figured it might save some time to avoid having to figure things out from scratch if unfamiliar with this extractor. I don't think this is the issue, I think the issue is with the condition for fetching the slide stream and adding it to the options.

For reference, when yt-dlp tries to download an entry from mediasite, it will download a json called GetPlayerOptions, which contains all the video/audio links and slide links. The different options for video/audio or slide streams are found under `Presentation.Streams in GetPlayerOptions` and in each stream, there is a key called `HasSlideContent` which will be `true` if it has slides or `false` if it is a video.

The slides are stored as jpg files on the server. The location of the slides will be in the URL found in a format, for example of `Presentation.Streams.0.SlideBaseUrl` + slide_ + `Presentation.Streams.0.Slides.0.Number` + .jpg?playbackticket= + `Presentation.Streams.0.SlidePlaybackTicketId`. The actual digit will in place of 0 will vary obviously but that's the gist of it.

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [ ] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
me@Laptop % yt-dlp -vU -f - https://events7.mediasite.com/Mediasite/Play/a7812390a2d44739ae857527e05776091d
[debug] Command-line config: ['-vU', '-f', '-', 'https://events7.mediasite.com/Mediasite/Play/a7812390a2d44739ae857527e05776091d']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2024.06.30.232744 from yt-dlp/yt-dlp-nightly-builds [24f3097ea] (darwin_exe)
[debug] Python 3.12.4 (CPython arm64 64bit) - macOS-14.5-arm64-arm-64bit (OpenSSL 3.0.13 30 Jan 2024)
[debug] exe versions: ffmpeg 7.0.1 (setts), ffprobe 7.0.1, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.06.02, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.32.3, sqlite3-3.45.3, urllib3-2.2.2, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1824 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Latest version: nightly@2024.06.30.232744 from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date (nightly@2024.06.30.232744 from yt-dlp/yt-dlp-nightly-builds)
[Mediasite] Extracting URL: https://events7.mediasite.com/Mediasite/Play/a7812390a2d44739ae857527e05776091d
[Mediasite] a7812390a2d44739ae857527e05776091d: Downloading webpage
[Mediasite] a7812390a2d44739ae857527e05776091d: Downloading JSON metadata
[Mediasite] a7812390a2d44739ae857527e05776091d: Downloading m3u8 information
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id
[info] Available formats for a7812390a2d44739ae857527e05776091d:
ID                        EXT           RESOLUTION │   FILESIZE   TBR PROTO │ VCODEC        VBR ACODEC     MORE INFO
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
video1-0.0-audio1-English unknown_video audio only │                  m3u8  │ audio only        unknown    [eng] English
video1-0.0-796            mp4           640x360    │ ~229.21MiB  796k m3u8  │ avc1.42401e  796k video only
video1-0.0-1296           mp4           640x360    │ ~373.18MiB 1296k m3u8  │ avc1.4d401e 1296k video only
video1-0.0-3313           mp4           1280x720   │ ~953.97MiB 3313k m3u8  │ avc1.4d401f 3313k video only

Enter format selector (Press ENTER for default, or Ctrl+C to quit):
```