Commit Graph

5347 Commits

Author SHA1 Message Date
syeopite
4a6a0ec2fe
Don't use generic click handler for chapter widget 2024-11-08 16:34:53 -08:00
syeopite
8048a56776
Code quality fixes 2024-11-08 16:34:53 -08:00
syeopite
06cd9bac94
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-11-08 16:34:52 -08:00
syeopite
14bc5b3424
Use Time::Span for timestamps in chapter struct 2024-11-08 16:34:52 -08:00
syeopite
eb48c3a3d1
Use WebVTT.build for chapters vtt file 2024-11-08 16:34:52 -08:00
syeopite
f4b2251bdf
Use proxy url for chapter thumbnails in JSON API 2024-11-08 16:34:52 -08:00
syeopite
c7e046f903
Add data for chapters to JSON endpoint for videos 2024-11-08 16:34:52 -08:00
syeopite
9601de6a24
Add separate method for constructing chapters json 2024-11-08 16:34:52 -08:00
syeopite
4c47ff7463
Move parsed chapters info to "extra video infos" 2024-11-08 16:34:52 -08:00
syeopite
fe8084989b
Use short-hand block notation for parsing chapters 2024-11-08 16:34:52 -08:00
syeopite
51dcbcbf51
Properly camelcase auto gen chapters attribute 2024-11-08 16:34:52 -08:00
syeopite
978580c876
Escape localization for desc chapters widget 2024-11-08 16:34:52 -08:00
syeopite
32266f5d3a
Change order of chapters button within the player 2024-11-08 16:34:52 -08:00
syeopite
874c373499
Add field for whether or not chapter is auto gen 2024-11-08 16:34:52 -08:00
syeopite
fec6d7e091
Remove extraneous space between desc and date 2024-11-08 16:34:52 -08:00
syeopite
df7f78afa2
Localize chapters label 2024-11-08 16:34:52 -08:00
syeopite
c99d06d6de
Add message for when chapters are auto generated 2024-11-08 16:34:51 -08:00
syeopite
f350b869a8
Add data-jump-time attribute to chapters component
Allows automatically jumping to specified time instead of reloading the
page.
2024-11-08 16:34:51 -08:00
syeopite
397e3525d6
Fix missing timestamp on first chapter 2024-11-08 16:34:51 -08:00
syeopite
a587fe1457
Fix description chapter component design 2024-11-08 16:34:51 -08:00
syeopite
5c55c6546a
Remove whitespace in chapters component 2024-11-08 16:34:51 -08:00
syeopite
1903b236d3
Fetch chapter thumbnails for selector in desc 2024-11-08 16:34:51 -08:00
syeopite
dc1c98d500
Remove initial whitespace from video description 2024-11-08 16:34:51 -08:00
syeopite
942cb46c56
Add initial html for chapters selector in desc 2024-11-08 16:34:51 -08:00
syeopite
437476a5cb
Add chapters track to player.ecr 2024-11-08 16:34:51 -08:00
syeopite
59a1b7f583
Add method to convert chapters to vtt 2024-11-08 16:34:51 -08:00
syeopite
2e6e384319
Add chapters data to API 2024-11-08 16:34:50 -08:00
syeopite
560c689ac7
Add logic to parse video chapters 2024-11-08 16:33:32 -08:00
Samantaz Fox
b173d4acf2
Update CHANGELOG.md
Some checks failed
Build and release container directly from master / release (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.10.1, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.11.2, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.12.1, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.13.2, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.14.0, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (nightly, false) (push) Has been cancelled
Invidious CI / build-docker (push) Has been cancelled
Invidious CI / build-docker-arm64 (push) Has been cancelled
Invidious CI / lint (push) Has been cancelled
2024-11-08 23:45:15 +01:00
Samantaz Fox
43d5efd9da
Stale bot updates (#5060)
* Prevents PRs from being considered staled
* Double the stale timer for issues
* Prevent discussion issues from being staled

No related issue
2024-11-08 23:42:45 +01:00
Samantaz Fox
1480e0089f
Channels: Fix "Youtube API returned error 400" (#5059)
This PR also adds sort option to the channel "shorts" tab.
Thanks to iBicha for the original fix of the "livestreams" tab.

Closes 4029, 5021 and 5029
2024-11-08 23:40:34 +01:00
Samantaz Fox
a5fb78bba5
Locales: Add Bulgarian, Welsh and Lombard to the list (#5046)
No related issue
2024-11-08 23:33:36 +01:00
Samantaz Fox
09f5485889
Shards: Update database dependencies (#5034)
No related issue
2024-11-08 23:32:25 +01:00
Samantaz Fox
a760b69cb6
Logger: Add color support for different log levels (#4931)
No related issue
2024-11-08 23:28:51 +01:00
Samantaz Fox
4f7a18a630
Fix named arg syntax when passing force_resolve (#4754)
No related issue
2024-11-08 23:27:22 +01:00
Samantaz Fox
42da2547e3
Use make_client instead of calling HTTP::Client (#4709)
No related issue
2024-11-08 23:26:32 +01:00
Samantaz Fox
2a19dbb1fe
Channels: Use the same structure as in the other ctoken functions
Change explanation, courtesy of iBicha:
The \n is basically a decimal 10, which is 1010 binary. That is a field number
1, and a wire type 2 (length-delimited). Then the $ is a decimal 36, which is
exactly the length of 00000000-0000-0000-0000-000000000000.
So both objects end up being encoded into the same data.
2024-11-08 18:28:58 +01:00
Samantaz Fox
6dd662a5b8
Channels: lockupViewModel is also used in the "playlists" tab 2024-11-08 17:44:36 +01:00
Samantaz Fox
301aeffa78
Channels: Multiple small fixes
Fix the "newest" link not being bold when 'sort_by' uses the default value
Show 60 videos per page, rather than 30
2024-11-08 14:00:35 +01:00
Samantaz Fox
d27a5e7fae
Channels: Rename ctoken generator functions as requested 2024-11-08 14:00:35 +01:00
Samantaz Fox
afc5b27d83
Extractors: Add support for shortsLockupViewModel
The 'shortsLockupViewModel' structure is used in the channel "shorts" tab
2024-11-08 14:00:30 +01:00
Samantaz Fox
1a5047aad9
Extractors: Add support for lockupViewModel
The 'lockupViewModel' structure is used in the channel "podcasts" tab
2024-11-08 14:00:16 +01:00
syeopite
ce910b5269
Prevent discussion issues from being staled 2024-11-07 20:45:23 -08:00
syeopite
78f18b257c
Double stale timer for issues
Days before staling is increased to 730 days
Days before closing is increased to 60 days
2024-11-07 20:42:19 -08:00
syeopite
3196182d4d
Prevent PRs from being considered stale 2024-11-07 20:41:04 -08:00
Samantaz Fox
82248fad02
Channels: Add sort options to shorts 2024-11-07 23:08:36 +01:00
Samantaz Fox
cbc546f032
Channels: Add function to generate the new ctoken objects 2024-11-07 23:08:31 +01:00
Samantaz Fox
792d0d5f6d
CI: Check Crystal lint only on latest version (#5042)
Some checks failed
Build and release container directly from master / release (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.10.1, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.11.2, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.12.1, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.13.2, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.14.0, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (nightly, false) (push) Has been cancelled
Invidious CI / build-docker (push) Has been cancelled
Invidious CI / build-docker-arm64 (push) Has been cancelled
Invidious CI / lint (push) Has been cancelled
* CI: Check Crystal lint only on latest version

* Apply suggestion from code review

Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>

---------

Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>
2024-11-07 13:14:36 +00:00
Émilien (perso)
ac6e796c73
checking the status code returned by youtube (#5052)
* checking the status code returned by youtube

* add documentation link

* Update src/invidious/yt_backend/youtube_api.cr

Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>

---------

Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>
2024-11-07 14:04:43 +01:00
Samantaz Fox
75c5881c55
Locales: Add Bulgarian, Welsh and Lombard to the list 2024-10-31 13:34:51 +01:00