Skip to content
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

[ie/orf:on] Support segmented episodes #10053

Merged
merged 5 commits into from
May 29, 2024
Merged

Conversation

seproDev
Copy link
Collaborator

IMPORTANT: PRs without the template will be CLOSED

Description of your pull request and other information

Fixes #9930

Template

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

@seproDev seproDev added the site-enhancement Feature request for some website label May 28, 2024
yt_dlp/extractor/orf.py Outdated Show resolved Hide resolved
return traverse_obj(api_json, {
'id': ('id', {int}, {str_or_none}),
'age_limit': ('age_classification', {parse_age_limit}),
'duration': ('exact_duration', {functools.partial(float_or_none, scale=1000)}),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surely a sensible set of short names for functools expressions like these can be agreed by now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No decision has been made yet. It will be a task of 5 minutes to clean up all instances once a helper method is added.

- Not a segmented episode: return single video
- Segmented episode without valid segment id: return entire playlist
- Segmented episode with valid segment id and yes-playlist: return entire playlist
- Segmented episode with valid segment id and no-playlist: return single video corresponding to segment id

In case a multi_video playlist is supposed to be returned, but an unsegmented source exists, that source is chosen instead.
@seproDev seproDev changed the title [ie/orf:on] Add support for collections [ie/orf:on] Support segmented episodes May 29, 2024
@seproDev seproDev merged commit 8b46ad4 into yt-dlp:master May 29, 2024
6 checks passed
@seproDev seproDev deleted the orf-segments branch May 29, 2024 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-enhancement Feature request for some website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

orf.on No video formats found!
3 participants