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

feat: Add is_live and is_upcoming to VideoDetails #271

Merged
merged 2 commits into from
Jan 3, 2023

Conversation

absidue
Copy link
Collaborator

@absidue absidue commented Jan 2, 2023

Description

The current is_live_content property only tells you whether the video is a normal one or a live stream, it doesn't provide enough granularity on whether the live stream is live, upcoming or a live stream replay, it's true for all three of those. Extracting the is_live and is_upcoming properties as well, solves that.

Below is a table of the values of those 3 properties for the 4 types of videos mentioned above.

Type is_live is_live_content is_upcoming
currently live live stream true true false
live stream replay false true false
upcoming live stream false true true
normal video false false false

I haven't added any tests as it'll be hard to find continously running live streams and upcoming live streams that never actually start.

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have checked my code and corrected any misspellings

@github-actions github-actions bot added enhancement New feature or request parser xsmall-diff labels Jan 2, 2023
@ChunkyProgrammer
Copy link
Contributor

I believe this is a continuous livestream:
https://youtu.be/jfKfPfyJRdk

And we used this for a test in yt-channel-info but we might need a better example:
https://youtu.be/O3cCYok_ukk

@absidue
Copy link
Collaborator Author

absidue commented Jan 3, 2023

Added test now.

@LuanRT LuanRT merged commit 22b9c17 into LuanRT:main Jan 3, 2023
@absidue absidue deleted the is-live-upcoming branch January 4, 2023 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants