Commit Graph

72 Commits

Author SHA1 Message Date
syeopite f466116cd7 Extract label for transcript in YouTube response 2024-06-13 09:07:20 -07:00
syeopite 5b519123a7 Raise error when transcript does not exist 2024-06-11 18:46:34 -07:00
syeopite 0224162ad2 Rewrite transcript logic to be more generic
The transcript logic in Invidious was written specifically
as a workaround for captions, and not transcripts as a feature.

This commit genericises the logic a bit as so it can be used for
implementing transcripts within Invidious' API and UI as well.

The most notable change is the added parsing of section headings
when it was previously skipped over in favor of regular lines.
2024-06-11 18:23:01 -07:00
Samantaz Fox 0ab6d9e748 Videos: Use android test suite client (#4650)
"Temporary" fix, until a better and more permanent solution is found.

Closes issue 4584
2024-04-26 23:54:24 +02:00
Samantaz Fox 7c1d2714e0 Comments: Add support for new format (#4576)
The new comment format is similar to the description's commandRuns.

This should fix the issues with most comments but there are still
some more changes that would need to be made like adding support for
formatting (bold, italic, underline) and channel emojis.

Fixes issue 4566
2024-04-26 23:48:15 +02:00
Samantaz Fox c94c6f4b83 Remove legacy proxy code (#4570)
Also fixes the build on nightly as the offending code was removed.

Related to
https://github.com/iv-org/invidious/pull/4270#issuecomment-1858876952
2024-04-26 23:44:47 +02:00
Samantaz Fox f1fd197cbc API: convey info "is post live" from Youtube response (#4569)
Returns the 'isPostLiveDvr' field in the videos API when the video
is a post-live DVR (= ended livestream that hasn't been reprocessed
into VOD yet).

Example taken 10 minutes after that livestream ended:
/api/v1/videos/euqnWk-uP6M

{
  ...
  "isPostLiveDvr": true,
  ...
}

Partially fixes 4421
2024-04-26 23:44:30 +02:00
Samantaz Fox 48ad864572 Videos: Add support for new likes format (#4462)
YouTube added a new format for like data in December 2023.
This PR adds support for parsing saod new format.

Related: LuanRT/YouTube.js issue 557

Closes 4419
2024-04-26 23:30:30 +02:00
Samantaz Fox 33f316c864 Videos: Remove AndroidScreenEmbed client 2024-04-26 23:15:34 +02:00
Samantaz Fox be291e8f0f Videos: Copy captions over between responses 2024-04-26 22:33:08 +02:00
Samantaz Fox 7f3ddad12e Videos: Use android test suite client 2024-04-26 22:03:59 +02:00
ChunkyProgrammer fbf07e18aa Parse links in the comments
Co-Authored-By: Samantaz Fox <coding@samantaz.fr>
2024-04-11 08:58:33 -04:00
syeopite 990931ff67 Remove legacy proxy code 2024-04-07 11:08:12 -07:00
ChunkyProgrammer bfd9c9876e Parse if video is post live dvr and include it in API 2024-04-07 10:26:33 -04:00
Brahim Hadriche 1a2d408d38 Update shorts params 2024-03-31 11:37:13 -04:00
ChunkyProgrammer 5ceeefa236 add support for new likes format 2024-03-01 23:45:29 -05:00
ChunkyProgrammer 7da4a7f72b add null safety to clip parsing 2023-12-26 22:05:09 -05:00
ChunkyProgrammer b344d98c25 Add API endpoint for Clips 2023-12-07 09:39:04 -05:00
syeopite 438467f69a Add playback success rate to /api/v1/stats (#4085)
* Add stats-based /videoplayback blockage status

* Count when YouTube returns wrong video as failure

* Cast playback stats hash type prior to return

* Bump stats refresh timer to 10 minutes
2023-11-04 13:52:30 +00:00
Émilien (perso) 0e4d3d89fc update params for fetching stream data (#4156)
* update params for fetching stream data

* Remove link about special parameter
2023-10-20 08:48:56 +02:00
syeopite be2feba17c Lint 2023-09-23 09:57:26 -04:00
syeopite d371eb50f2 WebVTT::Builder: rename #line to #cue 2023-09-23 09:41:41 -04:00
syeopite 0cb7d0b441 Refactor Invidious's VTT logic to use WebVtt.build 2023-09-23 09:40:04 -04:00
Samantaz Fox 842e9fade5 Captions: Add ability to use Innertube's transcripts API (#4001) 2023-09-18 23:31:56 +02:00
syeopite 3615bb0e62 Update src/invidious/videos/caption.cr
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
2023-08-24 16:21:05 -07:00
syeopite 7d435f082b Update src/invidious/videos/transcript.cr
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
2023-08-24 23:20:20 +00:00
syeopite 1f7592e599 Refactor structure of caption.cr
Rename CaptionsMetadata to Metadata
Nest Metadata under Captions
Unnest LANGUAGES constant from Metadata to main Captions module
2023-08-24 16:00:02 -07:00
syeopite 6b17bb5250 Regression from #4037 | Fix storyboards
PR #4037 introduced a workaround around YouTube's new integrity checks
on streaming URLs. However, the usage of this workaround prevents
storyboard data from being returned by InnerTube.

This commit fixes that by only using the workaround when calling try_fetch_streaming_data
2023-08-08 15:28:01 -07:00
syeopite 2f6b2688bb Use workaround for fetching streaming URLs
YouTube appears to be A/B testing some new integrity checks. Adding the
parameter "CgIQBg" to InnerTube player requests appears to workaround
the problem

See https://github.com/TeamNewPipe/NewPipeExtractor/pull/1084
2023-08-06 12:22:22 -07:00
syeopite e4942b188f Integrate transcript captions into captions API 2023-07-23 14:40:09 -07:00
syeopite caac7e2166 Add method to convert transcripts response to vtt 2023-07-23 14:40:08 -07:00
syeopite 4b3ac1a757 Add method to parse transcript JSON into structs 2023-07-23 14:40:08 -07:00
syeopite 8e18d445a7 Add method to generate params for transcripts api 2023-07-23 14:40:08 -07:00
syeopite 7e5935a9da Rename Caption struct to CaptionMetadata
The Caption object does not actually store any text lines for the
subtitles. Instead it stores the metadata needed to display and fetch
the actual captions from the YT timedtext API.

Therefore it may be wiser to rename the struct to be more reflective of
its current usage as well as the future usage once the current caption
retrival system is replaced via InnerTube's transcript API
2023-07-23 14:40:08 -07:00
Emilien Devos 8e4833d21a temp explanation about video not available issue 2023-06-11 16:54:30 +02:00
chunky programmer 1b10446e5e move url parsing to utils method 2023-04-30 18:58:39 -04:00
chunky programmer d420741cc1 Allow channel urls to be displayed in YT description 2023-04-30 18:58:08 -04:00
Samantaz Fox adc605024f Videos: Add support for attributed descriptions (#3701) 2023-04-10 17:54:22 +02:00
Samantaz Fox b3c0afef02 Videos: fix description text offset when emojis are present 2023-04-05 23:43:41 +02:00
techmetx11 73d2ed6f77 Optimize some redundant stuff 2023-03-29 23:33:23 +00:00
ChunkyProgrammer f840addd93 Fix error when song title is missing from the track 2023-03-27 22:10:28 -04:00
techmetx11 7755ed4ac8 Fix regexs 2023-03-23 20:12:54 +00:00
techmetx11 49ddf8b6bd Added attributed description support 2023-03-23 05:10:21 +00:00
Samantaz Fox 8a44bd11d2 Videos: Fix 0 views and empty license field (#3557) 2023-03-20 19:15:12 +01:00
Samantaz Fox 4ae158ef6d Videos: Add back support for views on livestreams 2023-03-19 22:44:59 +01:00
ChunkyProgrammer e3081ef1a9 Apply style change suggestions
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
2023-03-07 14:23:08 -05:00
ChunkyProgrammer 742c951bc9 support videos with multiple songs 2023-03-07 13:06:15 -05:00
ChunkyProgrammer d8e23d34b6 add song title for music tracks 2023-03-07 11:38:09 -05:00
techmetx11 8eca5b270e Video: Fix 0 views, and empty license field 2023-02-26 14:01:08 +01:00
Samantaz Fox c7f34042a2 Video: Add support for the music description section (#3559) 2023-02-02 21:49:09 +01:00