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

Better live video support #28

Merged
merged 1 commit into from
Nov 12, 2020
Merged

Better live video support #28

merged 1 commit into from
Nov 12, 2020

Conversation

dgw
Copy link
Member

@dgw dgw commented Aug 21, 2020

Drafted on top of #27, for the next feature release.

@dgw dgw added this to the 0.4.0 milestone Aug 21, 2020
@dgw dgw marked this pull request as ready for review November 12, 2020 06:55
* Split the upload-date ("publishedAt") "parse" function into two, one
  that really *only* parses, and another that formats
* Request additional video details pertaining to live-stream status from
  the YouTube API
* Conditionally output certain pieces of information depending on
  whether the video is a scheduled or active live stream
  * For example, view count is irrelevant for a "live" video, but it's
    interesting to see how many people are currently watching
  * An "upcoming" stream has no viewer info available (YT doesn't expose
    the "waiting" count via the API, AFAICT), so the "views" info item
    can be skipped for these
  * Upload date, comments, and length/duration also adapt or skip
    themselves depending on the video's live status

This patch contains Yet Another Reason why Sopel should make the
prepositions outputted by `tools.time.seconds_to_human()` optional.
Honestly, I can't remember ever writing code using that function
*without* needing to remove the ' ago' or 'in ' from its output.
@dgw dgw force-pushed the live-stream-support branch from 5952752 to 52c7bca Compare November 12, 2020 06:56
@dgw dgw merged commit ee3ded1 into master Nov 12, 2020
@dgw dgw deleted the live-stream-support branch November 12, 2020 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant