Commit Graph

298 Commits

Author SHA1 Message Date
Samantaz Fox
e319c35f09 Videos: use intermediary variable when using CONFIG.po_token 2024-08-13 20:56:09 +02:00
Samantaz Fox
2d18ff1f80 Add ability to set po_token and visitordata ID (#4789)
This PR adds two new config option, to pass a PO token (config 'po_token') and
a visitor ID (config 'visitor_data') to Youtube. These two strings are required
to play videos using the WEB client.

Warning: These strings gives much more identifiable information to Google!

If the po_token setting is filled in, then the WEB client is used. If not, the
Android client is used. TvHtml5ScreenEmbed will still be used as a fallback.

Script for generating po_token and visitor_data:
https://github.com/iv-org/youtube-trusted-session-generator

Helps with issue 4734
2024-08-13 20:35:43 +02:00
Samantaz Fox
2d7869b48b Add support for an external signature server (#4772)
This PR adds support for inv_sig_helper, which offloads the player fetching,
function extraction and signature parsing, which in turn allows to use the
web client to watch videos.

When the new config option "signature_server" is not set, the logic for the
external signature server is not enabled and invidious behaves like before.

This PR also updates the crystal overrides because the stdlib changed quite
a while ago (See issue 11049 at crystal-lang/crystal) and those were required
to properly use TCP/unix sockets.

Closes issue 4649
2024-08-13 20:26:59 +02:00
Emilien Devos
e6c39f9e3a add pot= parameter now required by youtube 2024-08-13 14:37:35 +02:00
Samantaz Fox
5e38ef59da Ameba: Fix Lint/UselessAssign (#4795)
Related to issue 2231
2024-08-11 13:38:29 +02:00
Samantaz Fox
7798faf234 SigHelper: Make signature server optional and configurable 2024-08-07 23:25:35 +02:00
Samantaz Fox
3b7e45b7bc SigHelper: Small fixes + suggestions from code review 2024-08-07 23:12:38 +02:00
Samantaz Fox
ec8b7916fa Videos: Make use of the video decoding 2024-07-25 22:13:08 +02:00
syeopite
fad0a4f52d Ameba: Fix Lint/UselessAssign 2024-07-17 12:39:40 -07:00
meatball
248df785d7 Update spec and rollback to last commits changes 2024-06-18 20:55:14 +02:00
meatball
04ca64691b Make solution complaint with spec 2024-05-30 22:37:55 +02:00
meatball
31ad708206 fix: Handle nil value for genreUcid in Video struct 2024-05-30 21:56:33 +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
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
Samantaz Fox
07de1e236f Videos: Append '&mpd_version=5' to DASH manifest URL
This makes Youtube return a MPD manifest with templates rather than
lengthy <SegmentList>. The returned  manifest is about 44 times smaller.
2023-10-22 17:56:04 +02: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
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
Chunky programmer
233bd3f593 Watch: Load watch page data for premieres 2023-06-07 11:32:20 -04:00
ChunkyProgrammer
e3081ef1a9 Apply style change suggestions
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
2023-03-07 14:23:08 -05:00
ChunkyProgrammer
d8e23d34b6 add song title for music tracks 2023-03-07 11:38:09 -05:00
techmetx11
caf9520c86 Major improvements 2023-01-22 00:12:04 +01:00
techmetx11
fe5b81f2c3 Add support for multiple songs 2023-01-16 14:04:20 +01:00
techmetx11
1b5fbfc13e Video: Add support for the music section 2023-01-14 13:16:20 +01:00
Samantaz Fox
47cc26cb3c videos: fix 'Arithmetic overflow' error 2022-11-16 18:25:32 +01:00
Samantaz Fox
cc5c83333f videos: improve fetching of streaming data 2022-11-13 14:40:00 +01:00
Samantaz Fox
2acff70811 videos: handle different JSON structs being present in cache 2022-10-31 20:30:35 +01:00
Samantaz Fox
d659a451d6 videos: remove unused 'VideoRedirect' exception 2022-10-31 20:09:04 +01:00
Samantaz Fox
87a5d70062 videos: move API's JSON structure to a dedicated module 2022-10-31 20:09:04 +01:00
Samantaz Fox
ae03ed7bf7 videos: move player/next parsing code to a dedicated file 2022-10-31 20:09:04 +01:00
Samantaz Fox
e23ceb6ae9 videos: Fix extraction code according to tests 2022-10-31 20:09:04 +01:00
Samantaz Fox
7df0cfcbed Videos: fix 'views' parsing for livestreams 2022-10-31 20:09:04 +01:00
Samantaz Fox
6aaea7fafa Videos: parse data during first fetching
There will be less data to be stores in the DB cache
2022-10-31 20:09:04 +01:00
Samantaz Fox
cd03fa06ae videos: move 'Caption' and associated global/functions to a separate file 2022-10-31 20:09:04 +01:00
Samantaz Fox
9baaef412f videos: move 'VideoPreferences' and its associated function to a separate file
This will require some rework later.
2022-10-31 20:09:04 +01:00
Samantaz Fox
88141c459c videos: move formats structure to a separate file/module 2022-10-31 20:09:04 +01:00
Samantaz Fox
6250039405 videos: move regions list to a dedicated file 2022-10-31 20:09:03 +01:00
Émilien Devos
a7d9df5516 add check video id for android client too (#3280) 2022-08-25 10:39:10 +02:00
Émilien Devos
389e49183c throw error if the videoID returned is different 2022-08-23 19:34:54 +00:00
Samantaz Fox
b2c0f7efc3 Fix missing hash key: "toggleButtonRenderer" (issue #3260) 2022-08-15 10:34:52 +02:00
Samantaz Fox
049ed114fd Separate video data fetching from parsing in videos.cr 2022-07-18 23:35:34 +02:00
Samantaz Fox
c8765385df Fetch data from next endpoint for scheduled streams 2022-07-14 17:56:53 +02:00
Samantaz Fox
abc81ebd08 Merge pull request #3165 from SamantazFox/small-fixes-06-2022 2022-07-11 17:41:58 +02:00
Samantaz Fox
beb9894c47 Merge pull request #3124 from iv-org/add-404-status-code 2022-07-06 22:05:01 +02:00
Samantaz Fox
f7b1dcc271 Don't treat LIVE_STREAM_OFFLINE playability status as an error (fixes #3155) 2022-07-04 22:24:36 +02:00
Samantaz Fox
eb226e1dcf Remove all backend code related to dislikes 2022-07-04 22:24:23 +02:00
Samantaz Fox
3593f67eb6 Fix: related videos is a Hash(String, String) 2022-06-08 23:57:16 +02:00
Samantaz Fox
2b1e1b11a3 Fix CI: support BADGE_STYLE_TYPE_VERIFIED_ARTIST 2022-06-08 23:56:40 +02:00
Émilien Devos
c201ea53ba Add 404 status code on all possible endpoints 2022-05-27 14:06:38 +00:00
Samantaz Fox
059796c60d Merge pull request #3076 from SamantazFox/fix-3062-3063
Fix regressions of #2936
2022-05-04 22:29:10 +02:00