Commit graph

5045 commits

Author SHA1 Message Date
syeopite
36ed5d3418
Lint 2024-04-28 21:07:03 -07:00
syeopite
f48aa0a2c2
Don't use generic click handler for chapter widget 2024-04-28 20:15:38 -07:00
syeopite
93a6464bbe
Code quality fixes 2024-04-28 20:15:38 -07:00
syeopite
503ace90f5
Refactor: Add object to represent chapters
Prior to this commit we used an Array of Chapter structs to represent
a video's chapters. However, as we often needed to apply operations on
the entire sequence of chapters, multiple isolated functions had to be
created and in turn clogged up the code.

By grouping everything together under a chapters struct that stores a
sequence of chapters, these functions can be grouped together, and can
be simplifed due to instance variables containing the data that they need.

Co-authored-by: Samantaz Fox <coding@samantaz.fr>
2024-04-28 20:15:38 -07:00
syeopite
2744ea2244
Use Time::Span for timestamps in chapter struct 2024-04-28 20:15:38 -07:00
syeopite
b0e0e19017
Use WebVTT.build for chapters vtt file 2024-04-28 20:15:38 -07:00
syeopite
310825997f
Use proxy url for chapter thumbnails in JSON API 2024-04-28 20:15:38 -07:00
syeopite
2dc17d7409
Add data for chapters to JSON endpoint for videos 2024-04-28 20:15:37 -07:00
syeopite
6bddcea178
Add separate method for constructing chapters json 2024-04-28 20:15:37 -07:00
syeopite
3860c69a52
Move parsed chapters info to "extra video infos" 2024-04-28 20:15:36 -07:00
syeopite
9535009864
Use short-hand block notation for parsing chapters 2024-04-28 20:14:40 -07:00
syeopite
6f62de36d7
Properly camelcase auto gen chapters attribute 2024-04-28 20:14:40 -07:00
syeopite
6f295bb33b
Escape localization for desc chapters widget 2024-04-28 20:14:40 -07:00
syeopite
e53a483bcb
Change order of chapters button within the player 2024-04-28 20:14:40 -07:00
syeopite
5732a2a394
Add field for whether or not chapter is auto gen 2024-04-28 20:14:39 -07:00
syeopite
65d9914329
Remove extraneous space between desc and date 2024-04-28 20:14:39 -07:00
syeopite
9f43a74871
Localize chapters label 2024-04-28 20:14:38 -07:00
syeopite
a569b8f3d9
Add message for when chapters are auto generated 2024-04-28 20:14:09 -07:00
syeopite
00d16dff1f
Add data-jump-time attribute to chapters component
Allows automatically jumping to specified time instead of reloading the
page.
2024-04-28 20:14:09 -07:00
syeopite
08d82cc749
Fix missing timestamp on first chapter 2024-04-28 20:14:09 -07:00
syeopite
3fba6f5728
Fix description chapter component design 2024-04-28 20:14:09 -07:00
syeopite
2cd3ded93b
Remove whitespace in chapters component 2024-04-28 20:14:09 -07:00
syeopite
ddd931573a
Fetch chapter thumbnails for selector in desc 2024-04-28 20:14:09 -07:00
syeopite
48ba6373df
Remove initial whitespace from video description 2024-04-28 20:14:09 -07:00
syeopite
0afd95fb78
Add initial html for chapters selector in desc 2024-04-28 20:14:09 -07:00
syeopite
d9aeb2c360
Add chapters track to player.ecr 2024-04-28 20:14:09 -07:00
syeopite
39b0229835
Add method to convert chapters to vtt 2024-04-28 20:14:09 -07:00
syeopite
98c6cee383
Add chapters data to API 2024-04-28 20:14:08 -07:00
syeopite
371dbd73fe
Add logic to parse video chapters 2024-04-28 20:10:25 -07:00
Samantaz Fox
eda7444ca4
Update changelog 2024-04-27 00:17:01 +02:00
Samantaz Fox
79b342aee5
Rename legacy changelog file 2024-04-27 00:14:46 +02: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
6f889dc695
Trending: Un-nest category if this is the only one (#4600)
Trending music was returning less than 24 videos which was getting
filtered out. Since multiple categories only appears on the default
trending page, we don't need to do that filtering for Music, Gaming or movies.

Closes issue 4596
2024-04-26 23:52:44 +02:00
Samantaz Fox
8eaaeb1c74
API: Add bitrate to formatStreams too (#4590)
Before this PR, the bitrate was only returned for the 'adaptiveFormats'.
They are now also returned the 'formatStreams'.

No linked issue
2024-04-26 23:49:44 +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
bd549f21e9
API: Add 'authorVerified' field on recommended videos (#4562)
Closes 3323
2024-04-26 23:36:08 +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
bcb679e653
Proxy: Handle non-200 HTTP codes on DASH manifests (#4429)
Before this PR, Invidious assumed that fetching the DASH manifest from
YouTube will always be successful and didn't check the status code.

That meant that if YouTube gave a rate-limiting page, invidious would
return an HTTP 200 response with the 'application/dash+xml' Content-Type
header and the YouTube ratelimiting page as the body.

No associated issue
2024-04-26 23:25:54 +02:00
Samantaz Fox
b163afecb7
API: Parse channel's tags (#4294)
Example from an auto generated channel (Minecraft - Topic):
/api/v1/channels/UCQvWX73GQygcwXOTSf_VDVg

{
  ...
  "tags":[
    "Video game","Indie game","Xbox One","New Nintendo 3DS",
    "PS3","Nintendo Switch","Wii U","Fire OS",
    "Mac operating systems","Apple TV","Xbox 360",
    "PlayStation Vita","PS4","Windows","Linux","Nintendo 3DS",
    "iOS","Windows Phone","iPadOS","Java","Android","tvOS",
    "ChromeOS"
  ]
  ...
}

Example from another channel (Mr Beast):
/api/v1/channels/UCX6OQ3DkcsbYNE6H8uQQuVA

{
  ...
  "tags":["mrbeast6000","beast","mrbeast","Mr.Beast","mr"]
  ...
}

No associated issue
2024-04-26 23:20:30 +02:00
Samantaz Fox
5855e9d188
Translations update from Hosted Weblate (#4164) 2024-04-26 23:19:23 +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
d49c762609
YtAPI: Add more client infos for Android test suite 2024-04-26 22:26:45 +02:00
Samantaz Fox
7f3ddad12e
Videos: Use android test suite client 2024-04-26 22:03:59 +02:00
Hosted Weblate
01e2a5e89d
Update Lombard translation
Update translation files

Updated by "Remove blank strings" hook in Weblate.

Update Lombard translation

Add Lombard translation

Co-authored-by: Federico <fv4@users.noreply.hosted.weblate.org>
Co-authored-by: Hosted Weblate <hosted@weblate.org>
Translate-URL: https://hosted.weblate.org/projects/invidious/translations/
Translation: Invidious/Invidious Translations
2024-04-25 18:35:09 +02:00
Hosted Weblate
bff0b5c85a
Update Serbian (cyrillic) translation
Update Serbian (cyrillic) translation

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: NEXI <nexiphotographer@gmail.com>
2024-04-25 18:35:09 +02:00
Hosted Weblate
2da63bf36d
Update Chinese (Simplified) translation
Update Chinese (Simplified) translation

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: 大王叫我来巡山 <hamburger2048@users.noreply.hosted.weblate.org>
2024-04-25 18:35:09 +02:00
Hosted Weblate
7546cb511d
Update Chinese (Traditional) translation
Update Chinese (Traditional) translation

Co-authored-by: Hosted Weblate <hosted@weblate.org>
Co-authored-by: Jeff Huang <s8321414@gmail.com>
2024-04-25 18:35:09 +02:00