13 Commits

Author SHA1 Message Date
Harm
93724f8051 Update logic to process shorts/livestreams
[config/config.example.yml]
- Separate hide_shorts_and_live to hide_shorts and hide_livestreams

[config/sql/channel_videos.sql]
- Introduce enum video_type
- Include video_type as new column for channel_videos

[locales/en-US.json]
- Add labels for new settings

[src/invidious/channels/channels.cr]
- Add property video_type of type VideoType to ChannelVideo struct
- Add deserializer module for conversion from database entry to enum
- Add check if we already have a video in the database.
  If the video `updated` field has no been updated, only update views
- Add check whether a video is in the `videos` array. If this is not
  the case, fetch the individual video for `video_type` as well as
  `length_videos`

[src/invidious/config.cr]
- Separate hide_shorts_and_live property
  to hide_shorts and hide_livestreams properties

[src/invidious/database/channels.cr]
- Include video_type in database insert for ChannelVideo

[src/invidious/routes/preferences.cr]
- Separate hide_shorts_and_live setting to hide_shorts and hide_livestreams

[src/invidious/users.cr]
- Accumulate VideoTypes in an array and query on these types
- Remove paths for hide_shorts_and_live

[src/invidious/videos.cr]
- Add `Short` entry to VideoType enum

[src/invidious/videos/parser.cr]
- Add check whether a video is a short
2026-01-24 16:08:16 +01:00
Andre Borie
ffa9e5dfab Make migrations (mostly) idempotent. 2021-01-17 14:20:34 +00:00
Omar Roth
64464f23ae
Add 'views' to channel_videos 2019-05-30 18:59:13 -05:00
Omar Roth
42dd6326d5 Remove unnecessary index 2019-04-28 14:11:23 -05:00
Omar Roth
fd26f9f34e Add support for premieres to search and feed 2019-03-22 14:54:35 -05:00
Omar Roth
52cad8d6da Update change index for channel_videos and add index for nonces 2019-02-11 10:59:17 -06:00
Omar Roth
19632511d5 Update SQL 2018-11-02 09:46:45 -05:00
Omar Roth
c55c553725 Fix channel_videos schema 2018-10-30 10:50:27 -05:00
Omar Roth
8794e26e67 Add length_seconds to channel_videos 2018-10-30 09:20:51 -05:00
Omar Roth
51d00b16c3 Use hash instead of btree for channel_videos_ucid_idx 2018-09-21 08:52:27 -05:00
Omar Roth
b13b91e2bf Add ucid index for channel_videos 2018-07-27 17:38:47 -05:00
Omar Roth
6c4cfbe39d Add users table 2018-03-29 21:41:05 -05:00
Omar Roth
239a6c892c Use seperate table for videos pulled from RSS 2018-03-28 22:29:54 -05:00