Commit Graph

220 Commits

Author SHA1 Message Date
syeopite
6c063436d4 Fix issues raised by code review
Remove explicit `self.` from #process of parsers

Remove explicit return tuple in get_issue_template

Fix formatting

Move inline issue template style to stylesheet

Use @id in ProblematicTimelineItem xml repr

Fix naming
2025-04-05 12:40:38 -07:00
syeopite
c288005bfd Make "show technical details" btn translatable 2025-03-19 22:52:04 -07:00
syeopite
9de69c0052 Improve design of placeholder item
Also makes it show the error backtrace
2025-03-19 22:52:03 -07:00
syeopite
94cb80ea81 Handle parse errors gracefully on timeline items
Prior to this commit, if even a single item fails to parse Invidious
will throw out an error. This means that even if everything else
on a page can be parsed and rendered without issues, the single
problematic item will cause the entire page to be unusable.

This commit gracefully handles parse errors by catching and then
replacing the problematic item with a new "timeline error" object
that represents the parse error. This will allow the rest of the page
to be rendered and an error card that will replace the location of the
problematic item.
2025-03-19 22:52:03 -07:00
Émilien (perso)
70ff463cc6 Add invidious companion support (#4985)
* add support for invidious companion

* redirect latest_version and dash manifest to invidious companion

* fix Shadowing outer local variable `response`

* fixing condition for Content-Security-Policy

* throw error if inv_sig_helper and invidious_companion used same time

* Use sample instead of Random.rand

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

* Remove debug puts functions

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

* modify the description for config.example.yaml about invidious companion

* move config checks for invidious companion

* separate invidious_companion logic + better config.yaml config

* fixing "end" misplacement

* fix linting + use .empty?

* crystal handle decompression already by itself

* fix download function when invidious companion used

* fix linting

* invidious companion always used so always add CSP and redirect latest_version

* apply all the suggestions + rework invidious_companion parameter

* format watch.cr

* fix ameba Redundant use of `Object#to_s` in interpolation

* add ability for invidious companion to check request from invidious

* Better document private_url and public_url

* Better doc for invidious_companion_key

* !empty? to present?

* skip proxy for invidious companion

* fixing format

* missing ,

* add companion pooling http

* fix: don't use http proxy when sending requests to companion

* fix: logic where we want to have the invidious logic if companion is not used

* chore: remove baseurl usage from invidious companion

* chore: change from inv-sig-helper to companion for required playback

* fix: use puts + add warning for inv-sig-helper deprecated

---------

Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>
2025-03-13 16:44:00 +01:00
syeopite
fe4fa0480a Fix HLS being used for non-livestream videos (#5189)
Invidious does not currently support non-livestream hls playback

Originally, the HLS manifest check was essentially a boolean:
if the HLS manifest field was present, it was assumed to be a
livestream. Some videos include the HLS Manifest but aren't
livestreams.

In the case where they are livestreams, the video contains a videoType
field with the value "Livestream". In the case that they're normal
videos, the videoType is "Video". This is exposed via the
`video.live_now` property.

This commit just checks that `video.live_now` is true before treating
it as a livestream
2025-02-26 14:14:29 -08:00
syeopite
f95f87e448 Frontend: Add a first page and previous page buttons for channel navigation (#4123) 2025-02-26 13:54:25 -08:00
Alex Maras
49afbf2a14 Fix an issue with the HLS manifest check for livestream videos
Originally, the HLS manifest check was essentially a boolean: if the HLS
manifest field was present, it was assumed to be a livestream. Some
videos include the HLS Manifest but aren't livestreams.

In the case where they are livestreams, the video contains a videoType
field with the value "Livestream". In the case that they're normal
videos, the videoType is "Video". This is exposed via the video.live_now
method.

This commit just checks that video.live_now is true before treating it
as a livestream
2025-02-21 16:30:39 +08:00
Samantaz Fox
dbdf2ad23a Routes: Simplify actions in watch_ajax 2024-10-29 18:27:53 +01:00
Samantaz Fox
e453a2a682 Routes: Simplify actions in subscription_ajax 2024-10-29 18:16:52 +01:00
Samantaz Fox
7e4b3b182a Routes: Simplify actions in playlist_ajax 2024-10-29 18:09:50 +01:00
Samantaz Fox
82ac9a8609 Preferences: Add option to control preloading of video data (#4122)
This PR adds a configuration option to control the preloading of video data on
page load with the HTML5 'preload'[1] attribute on the `<video>` element.

The option is enabled by default, meaning that the `preload` attribute's value
will be 'auto'. If users want to prevent preloading of video data, they
can disable the option, which will set the attribute value to 'none'.

[1](https://www.w3schools.com/tags/att_video_preload.asp)

Closes issue 4110
2024-10-08 17:38:06 +02:00
Samantaz Fox
febf18cbf7 UI: Add search button to search bar (#4706)
Closes issue 529
2024-08-24 19:38:48 +02:00
thansk
1ce2d10c50 fix: use ion icon for search icon 2024-05-20 14:17:30 +00:00
thansk
5abafb8296 fix: use a search icon instead of text 2024-05-20 11:49:56 +00:00
thansk
9cd2e93a2e feat: allow submitting search with mouse 2024-05-19 11:46:55 +00:00
ulmemxpoc
f696f96824 Add rel="noreferrer noopener" to external links 2024-04-30 03:40:19 +00:00
Chunky programmer
b5f8b4542a Search: Don't error if AuthorId does not exist 2023-12-07 09:39:33 -05:00
RadoslavL
c9a843c7fe Replaced to_json with to_pretty_json 2023-09-30 19:11:42 +03:00
RadoslavL
5cdbc184c7 Added a previous_page_button preference option and made switching between the first page and previous page buttons possible 2023-09-30 18:36:43 +03:00
Thomas Lange
824cc1a5aa Don't redefine the "preload" option in player.js
If the HTML5 "<video>" element defines the "preload" attribute directly,
it isn't necessary to redefine the "preload" option in the player.js.
2023-09-27 15:36:40 +02:00
Thomas Lange
bf470704a5 Add option to control preloading of video data
Fix #4110 by adding an option to control the preloading of video data on
page load. If disabled ("false"), the browser will not preload any video
data until the user explicitly hits the "Play" button.

If enabled ("true"), the default behavior will be used, which means the
browser decides how much of the video will be preloaded.
2023-09-26 22:21:12 +02:00
ChunkyProgrammer
8781520b8a Search: Parse channel handle and hide video count when channel handle exists
Co-Authored-By: Samantaz Fox <coding@samantaz.fr>
2023-09-18 20:12:07 -04:00
Samantaz Fox
f38d1f33b1 HTML: Add UI element for 'SearchHashtag' in item.ecr 2023-07-18 00:01:16 +02:00
Samantaz Fox
9b75f79fb5 HTML/CSS: Add thumbnail placeholder in thin mode
This change is required to make the overlay buttons functional
(add to and delete from playlist, mark as watched, etc.)
2023-07-08 21:33:59 +02:00
Samantaz Fox
411208bbd2 HTML: Reorder buttons on the channel and watch pages 2023-07-08 20:48:36 +02:00
Samantaz Fox
42fa6ad2a3 HTML/CSS: Fix buttons' responsiveness 2023-07-08 20:48:36 +02:00
Samantaz Fox
8718f20688 HTML: Fix thin mode/thumbnail on other items 2023-07-08 20:48:36 +02:00
Samantaz Fox
43dcab225c HTML: merge MixVideo with other types in item.ecr 2023-07-08 20:48:36 +02:00
Samantaz Fox
080c7446c6 HTML: Use new buttons for playlists (save/delete/add videos/etc...) 2023-07-08 20:48:32 +02:00
Samantaz Fox
b6bbfb9b20 HTML: Use new buttons for thumbnail overlays
In addition, this commit also heavily changes the structure of the
generic "video card" item. Main benefits:
  * Improved accessibility for keyboard users
  * Many styling glitches were fixed
  * PlaylistVideos now use the same items as the rest
  * Elements all have distinct CSS classes
  * Design can be expanded to add more icons
2023-07-06 00:58:32 +02:00
Samantaz Fox
7bd6d0ac49 HTML: Use the new pagination component for channel pages 2023-07-06 00:58:30 +02:00
Samantaz Fox
57c7b922f7 HTML: Make a dedicated ECR component for items + pagination 2023-07-06 00:23:22 +02:00
Samantaz Fox
bbf16279bb Search: Allow browser suggestions (#3724) 2023-06-01 22:41:04 +02:00
raphj
600da635b7 Allow browser suggestions for search (#3704) 2023-04-02 23:36:06 +02:00
ChunkyProgrammer
1da00bade3 implement code suggestions
Co-Authored-By: Samantaz Fox <coding@samantaz.fr>
2023-04-02 16:31:59 -04:00
ChunkyProgrammer
a3da03bee9 improve accessibility 2023-03-27 22:56:29 -04:00
Wes van der Vleuten
420e12bb8b Merge remote-tracking branch 'upstream/master' 2023-01-21 23:35:39 +01:00
Wes van der Vleuten
7fd205179b Added suggestions 2023-01-21 23:24:22 +01:00
Samantaz Fox
b6a4de66a5 frontend: Unify the various channel pages 2022-12-22 16:13:34 +01:00
Wes van der Vleuten
f604c1c68b Fixed thumbnails with darkreader, Added watched indicator in more locations 2022-11-08 23:15:42 +01:00
Wes van der Vleuten
7b57381773 Added watch indicator 2022-11-07 20:04:46 +01:00
Wes van der Vleuten
437f42250e Watched marker 2022-11-07 03:49:00 +01:00
Samantaz Fox
abc81ebd08 Merge pull request #3165 from SamantazFox/small-fixes-06-2022 2022-07-11 17:41:58 +02:00
138138138
b19beac5b4 Update src/invidious/views/components/player.ecr
better syntax

Co-authored-by: Samantaz Fox <coding@samantaz.fr>
2022-07-10 16:29:50 +08:00
Samantaz Fox
06af5a004e Remove useless link in item forms (buttons on thumbnail) 2022-07-04 22:24:11 +02:00
Samantaz Fox
ce32873ef8 Remove item (video/channel/mix) thumbnail from keyboard navigation tree 2022-07-04 22:23:56 +02:00
138138138
3f1d88282e Update some comments 2022-06-25 19:26:14 +08:00
138138138
81abebd144 Highest quality m4a on audio only mode as default
Audio mode will automatically select highest quality m4a as default.
2022-06-23 02:27:46 +08:00
Samantaz Fox
f5fb4c6c64 Apply 2859.diff 2022-05-01 21:10:43 +02:00