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

Videos: Use start time and end time for clips #4264

Conversation

ChunkyProgrammer
Copy link
Contributor

@ChunkyProgrammer ChunkyProgrammer commented Nov 15, 2023

This PR parses the start and end time for clips.
closes #3921
FreeTubeApp/FreeTube#4323

Ex url: https://www.youtube.com/clip/UgkxxPM3BRphCAPLP88YoUGuj79KXPfpNNO_
API url: /api/v1/clips/UgkxxPM3BRphCAPLP88YoUGuj79KXPfpNNO_?pretty=1

API Response:

{
  "startTime": 8842.645,
  "endTime": 8855.856,
  "clipTitle": "✂️ Kirby is pink!",
  "video": [Video Object](https://docs.invidious.io/api/common_types/#videoobject)
}

@ChunkyProgrammer ChunkyProgrammer requested a review from a team as a code owner November 15, 2023 04:56
@ChunkyProgrammer ChunkyProgrammer requested review from syeopite and removed request for a team November 15, 2023 04:56
@ChunkyProgrammer ChunkyProgrammer force-pushed the use-start-time-and-end-time-for-clips branch from 26e660c to a596689 Compare November 15, 2023 04:59
@ChunkyProgrammer ChunkyProgrammer force-pushed the use-start-time-and-end-time-for-clips branch from a596689 to b344d98 Compare December 7, 2023 14:39
src/invidious/videos/clip.cr Outdated Show resolved Hide resolved
src/invidious/routes/watch.cr Outdated Show resolved Hide resolved
@ChunkyProgrammer ChunkyProgrammer force-pushed the use-start-time-and-end-time-for-clips branch from acb247c to 07d47da Compare December 20, 2023 03:51
@SamantazFox SamantazFox added the need-testing This feature needs to be deployed and tested to see if it's working, and doesn't break something label Jan 7, 2024
@SamantazFox SamantazFox added ready and removed need-testing This feature needs to be deployed and tested to see if it's working, and doesn't break something labels Jan 14, 2024
@SamantazFox SamantazFox changed the title Use start time and end time for clips Videos: Use start time and end time for clips Feb 12, 2024
SamantazFox added a commit that referenced this pull request Feb 12, 2024
This PR parses the start and end time for clips.

It also adds a new, dedicated API endpoint (`/api/v1/clips/{id}`) for
retrieving the start and end time of a clip.

Here is a sample response from that new endpoint (`video` is a video object,
as described in https://docs.invidious.io/api/common_types/#videoobject):

GET `/api/v1/clips/UgkxxPM3BRphCAPLP88YoUGuj79KXPfpNNO_?pretty=1`

Response:
```
{
  "startTime": 8842.645,
  "endTime": 8855.856,
  "clipTitle": "✂️ Kirby is pink!",
  "video": {}
}
```

Closes issue 3921
@SamantazFox
Copy link
Member

For some reason, Github didn't automatically close this PR when it was merged...

@ChunkyProgrammer ChunkyProgrammer deleted the use-start-time-and-end-time-for-clips branch February 13, 2024 00:24
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.

[Enhancement] Link Youtube Clips to the correct timestamp
3 participants