Commit Graph

1044 Commits (c713c32cebda5d0199b5c0dd553744f8d61707da)

Author SHA1 Message Date
Omar Roth 062867a38d
Strip domain from caption URLs
Omar Roth 04d56420d1 Run 'crystal tool format'
Omar Roth a017574f74 Add support for force_resolve to QUIC client
Omar Roth 0e3a48ff76
Update QUICPool
Omar Roth 276bf09238
Skip preferences for assets
Omar Roth d46b26e3bc
Use QUIC for connections to YouTube
Omar Roth 8af87f1a8b
Fix updating of cookies
Omar Roth 494c954cbb
Add etag to /api/v1/annotations
Omar Roth 71bc9eea28
Add support for Anti-Captcha
Omar Roth 7b2ca55089
Fix escaping in email query
Omar Roth 02e1cdf210
Add support for '/yts/img' endpoint
Omar Roth 03e24cccd0
Add support for configurable administrator email
Omar Roth 35f011758d
Merge pull request from XVnNzb2kFEhV9Tjm/master
Add Japanese translations
Omar Roth 2ebfaf76f2
Refactor continuation token handling
Omar Roth 0cf187dee7
Add support for image captcha in Google login
Omar Roth bdeb325bad
Fix monkeypatch for HTTP::Client
XVnNzb2kFEhV9Tjm f0368b02c4 Add Japanese translations
Omar Roth 6930570fa2
Add HTTPClient pool
Omar Roth aba2c5b938
Remove code for /api/v1/insights
Omar Roth 159b4f9734
Format source
Omar Roth 46a737c7a1
Skip deleted videos in playlist
Omar Roth 007646774e
Fix typo in English locale
Omar Roth 2d78e35e16
Fix typo in syncing user preferences
Omar Roth 7524b5e349
Move feed_menu and default_home into user preferences
Omar Roth 2a04a48b89
Fix redirect for livestreams
Omar Roth bf48809b61
Allow unlisted playlists to be viewed from /api/v1/playlists/
Omar Roth 3f3e52d7ae
Fix indexId for created playlist video
Omar Roth be055d9dcb
Add support for custom playlists
Omar Roth 97bd1da2a2
Remove SSL redirect
Omar Roth f5c7bbfda8
Add support for zh-TW translation
Omar Roth eef66de68c
Merge pull request from girst/rssparams
Forward query string parameters from Atom feeds
girst 4aa1180fce Forward parameters given in &params= from Atom feeds
Any parameters given in &params=... are appended to /watch URLs.  This
allows e.g. passing &raw=1&listen=1 to a playlist of music and use an
rss reader like newsboat as a media player, like so:

    https://invidio.us/feed/playlist/XXX?params=%26raw%3D1%listen%3D1

All three feeds--channels, playlists, subscriptions--are supported.
Omar Roth 4361ea9686
Update DB calls for 0.31.0
Omar Roth 8c2ddb0255
Add config options for host binding and port
Omar Roth 466a5a932b
Add support for Turkish translation
leonklingele 1aefc5b540 Update to Crystal 0.31.0, resolve compiler deprecation warnings, update dependencies ()
* shard: update to crystal 0.31.0

Additionally, no longer use the Crystal "markdown" library which has
been removed from the Crystal stdlib in version 0.31.0.
See https://github.com/crystal-lang/crystal/pull/8115.

Also fix some deprecation warnings using the following commands:

    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.escape/URI\.encode_www_form/g' "{}" \;
    find . \( -type d -name .git -prune \) -o -type f -exec sed -i 's/URI\.unescape/URI\.decode_www_form/g' "{}" \;
    sed -i 's/while \%pull\.kind \!\= \:end_object/until \%pull\.kind\.end_object\?/g' src/invidious/helpers/patch_mapping.cr
Omar Roth 1085ca4a2d
Fix typo in Google login
Omar Roth a006963fb8
Update Google login
Omar Roth 68cf24d100
Add support for channel redirects
Omar Roth 512d82071e
Fix invalid viewCountText in related videos
Omar Roth 45ad212459
Handle redirects in /videoplayback
Omar Roth 26107bd6c3
Minor refactor
Omar Roth 059f50dad4
Add 'playlistThumbnail' to playlist objects
Omar Roth 9f9cc1ffb5
Refactor search extractor
Omar Roth 2b94975345
Fix playlist_thumbnail extractor
Omar Roth a19cdb5e72
Fix season playlists
psvenk f54fbd057e Add prefers-color-scheme support ()
* Add prefers-color-scheme support

This should fix <https://github.com/omarroth/invidious/issues/559>.
The cookie storage format has been changed from boolean
("true"/"false") to tri-state ("dark"/"light"/""), so that users
without a cookie set will get dark mode if they have enabled the dark
theme in their operating system. The code for handling the cookie
state, along with the user's operating system theme, has been factored
out into a new function `update_mode`, which is called both at window
load and at the "storage" event listener, because the "storage" event
listener is only trigerred when a change is made to the localStorage
from another tab/window (for more info - see
<https://stackoverflow.com/a/4679754>).
Omar Roth f6f176afc1
Merge pull request from leonklingele/add-player-styles
Add support for player styles
Omar Roth 2d955dae48
Force redirect for videos without audio
Leon Klingele 46577fb128
Add support for player styles
This currently includes the following styles:

- Invidious, the default
- YouTube, using a centered play button and always visible video control bar

Implements https://github.com/omarroth/invidious/issues/670.
Supersedes https://github.com/omarroth/invidious/pull/661.
Omar Roth 5680d5a7be
Sort dash representations by framerate
Omar Roth dce5816b18
Fix image url extractor
leonklingele f99a7b2a8c Fix engagement for zero-view videos ()
Division by zero resulted in 'NaN'.

Fixes https://github.com/omarroth/invidious/issues/653.
Omar Roth ff5d79e3ee
Update video extractor
Omar Roth 4ee3ec09df
Autofill search for playlists and communities page
Omar Roth cfe9d47fa0
Add support for '/embed/?list'
Omar Roth 607d6125fc
Add support for '/embed/live_stream'
Omar Roth 6215259565
Add support for Google login verification
Omar Roth d97a272aa5
Fix check for 2-step verification
Omar Roth fea20ea913
Add support for Icelandic translation
Omar Roth b0dca2a363
Minor refactor
Omar Roth 1a7b341745
Update Google login
Omar Roth bb096a0357
Raise 400 on invalid request to '/feed/webhook'
Omar Roth aa3c1d930b
Remove empty representations from dash manifests
Omar Roth bcd239ac2b
Add community page
Omar Roth 2cc25b1e6e
Add administrator option to disable proxying
Omar Roth c34a24b633
Attempt to optimize query for subscription feed
Omar Roth 775612ec5a
Prevent embeds from appearing in watch history
Omar Roth 5a455ec4f7
Fix redirect for livestream segments
Omar Roth 1277c3d156
Fix chunk size for livestreams
Omar Roth 8033d1ca6d
Fix chunking for livestream segments
Omar Roth 28df6881a7
Try to prevent redirect for DASH streams
Omar Roth e5fa5df7be
Chunk video files to bypass throttling
Omar Roth 857c57daba
Add support for Chinese translation
Omar Roth 3dd4043827
Fix 404 for video thumbnails
Omar Roth 351ecfae0f
Fix body when proxying assets with status code > 300
Omar Roth fb383458d7
Add /api/v1/search/suggestions
Omar Roth 196ee1aa8b
Add '/api/v1/channels/comments'
Omar Roth 2df97cd2f5
Fix provided author for '/videos' endpoint
Omar Roth 041debcd93
Revert "Chunk videoplayback response to avoid throttling"
This reverts commit 818cd2454d.
Omar Roth 0632a2d3c8
Fix logging for /watch URLs
Omar Roth 9f40b3a873
Add missing table to check_tables
Omar Roth 48ad744ebf
Add support for default channel banners
Omar Roth e30d70b6d4
Refactor proxy_list into global
Omar Roth 0d0d3edeae
Add thumbnail and banners to channel page
Omar Roth 9d2982fcd7
Fix typo in '/videoplayback'
Omar Roth 818cd2454d
Chunk videoplayback response to avoid throttling
Omar Roth 6cd884555c
Patch StaticFileHandler to serve files from memory
Omar Roth 47ef74a1bb
Refactor commonly used request and response headers
Omar Roth 807723c5b2
Fix status codes on error
Omar Roth 3be1c9261f
Fix sleep in pull_top_videos
Omar Roth a3164177f8
Fix SMS for Google login
Omar Roth fa6bf21cd1
Update Google login
Omar Roth d1635cf24e
Set max preference size
Omar Roth b43e9ed7e7
Refactor 'description_html'
Omar Roth 12b2ab5da8
Add 'to_json' into respective structs
Omar Roth 1c9085556c
Add support for 'attribution_link'
Omar Roth ef8c9f093c
Add premiere date to watch page
Omar Roth 801dffd571
Fix RSS content-type
Omar Roth 0b1c57b39f
Add notifications to private feed
Omar Roth 2febc268f7
Fix warnings in Crystal 0.29
Omar Roth 58995bb3a2
Add support for log levels
Omar Roth 8c944815bc
Minor refactor
Omar Roth f065a21542
Fix 404 handling for endpoints matching short URLs
Omar Roth 27e032d10d
Add '/api/v1/auth/feeds'
Omar Roth ab3980cd38
Enforce maximum email length
Omar Roth fda619f704
Fix 'unique_res' to keep resolutions unique within a representation
Omar Roth 8ba45808be
Fix typo in '/api/manifest/dash/id'
Omar Roth d876fd7f5b
Add 'unique_res' option to '/api/manifest/dash/id'
Omar Roth 352e409a6e
Fix toggle_theme when visiting preferences with JS disabled
Omar Roth d6ec441c8e
Add buffer for notification channels
Omar Roth d892ba6aa5
Refactor connection channel for delivering notifications
Omar Roth 108648b427
Optimize query for creating subscription feeds
Omar Roth 71bf8b6b4d
Refactor connect_listen for notifications
Omar Roth 4e111c84f3
Fix typo in '/watch'
Omar Roth 8cecce7570
Fix audio mode for raw URLs
Omar Roth b3788bc143
Fix typo for feed_needs_update
Omar Roth 18d66ddded
Add 'needs_update' column for scheduling feed refresh
Omar Roth 701b5ea561
Remove watched videos from notifications
Omar Roth 86d0de4b0e
Fix typo in post webhook
Omar Roth a95958f9f6
Fix videoplayback when encountering redirector URLs
Omar Roth da48bbf312
Add support for partial POST to '/api/v1/auth/preferences'
Omar Roth ac957db6d1
Provide dash qualities as reported by YouTube player
Omar Roth 64464f23ae
Add 'views' to channel_videos
Omar Roth ad09e734da
Refactor refresh_feeds
Omar Roth f820706e4f
Truncate password to 55 bytes
Omar Roth 29e9e0f2cc
Provide empty response on 204
Omar Roth c049ba59ff
Add stub for '/timedtext_video'
Omar Roth 51c5f28443
Add config option for updating feeds on event
Omar Roth bb1ed902a9
Trigger feed update when modifying subscriptions
Omar Roth b016a60a75
Add triggers for updating feeds
Omar Roth 890d485bb5
Fix formatting
Omar Roth 208bb2d72f
Catch connection reset when proxying files
Omar Roth b3e083d866
Add POST /api/v1/auth/subscriptions
Omar Roth a675c64c2d
Refactor DBConfig
Omar Roth 8b50c8515f
Fix content-type for captions
Omar Roth 1eaa377583
Add Greek translation (thanks Iris!)
Omar Roth f237fd9847
Fix CORS headers for proxied assets
Omar Roth 5730280325
Only modify cues for auto-generated captions
Omar Roth ab4df7e078
Fix response for proxied assets
Omar Roth e119459411
Add GET '/authorize_token'
Omar Roth 97ef2191fd
Add 'hsts' as config option
Omar Roth 7cd66e20d0
Fix typo in X-XSS-Protection
Omar Roth ddfd20d997
Fix CSP for subdomains
Omar Roth fd8af88493
Use separate asset version for cache busting
Omar Roth bfa488f77d
Add option to toggle theme without reload
Omar Roth 4616f889fd
Add simple form of cache busting
Omar Roth 0cf86974dd
Add redirect for videos with no audio sources
Omar Roth 757ea93393
Fix typo
Omar Roth dbd5a222d5
Add '/watch_videos' endpoint
Omar Roth bba80bc80f
Fix content-type for HEAD '.jpg'
Omar Roth 6d92775ab5
Add video previews
Omar Roth 6fb44083ec
Update source and licenses
Omar Roth 56fe3ede5b Add annotation preferences
Omar Roth 8a525bc131
Add '/api/v1/auth/preferences'
Omar Roth 734905d1f7
Bump max-age for HSTS
Omar Roth 90edf2fc60
Add 'debug' topic to /api/v1/auth/notifications
Omar Roth 54d250bde4 Add 'since' to '/api/v1/auth/notifications'
Omar Roth 5c4defdb8e Add support for '/c/:user/live'
Omar Roth 8c2958b86d Add 'local=true' to hlsUrl
Omar Roth f15b7cebac Try to prevent timeout in /data_control
Omar Roth 19ed5bf993 Add support for 'user' URLs in NewPipe import
Omar Roth 5567e2843d Force refresh after receiving PubSub notification
Omar Roth 250860d92c Add '/api/v1/auth/subscriptions'
Omar Roth 64aecba7a0 Add option to change passwords
Omar Roth 30e567e8b6 Fix published time for /api/v1/auth/notifications
Omar Roth fb7068d415 Add '/api/v1/notifications'
Omar Roth 8614ff40df Add support for Ukranian and Esperanto
Allan Nordhøy aa10a9d899 Language fixes ()
* Language fixes
Omar Roth bb5a1ad513 Add 'continue_autoplay' preference
Omar Roth 7a8d5a391a Fix downcasting with usernames
Omar Roth 2a6c81a89d Add authentication API
Omar Roth 25359e5320 Fix typo in 404 handler
Omar Roth b6fff53b21 Refactor HTTP::Client calls into make_client
Omar Roth 26168a9520 Refactor CSRF tokens (using format in )
Omar Roth 3bcb98e644 Add config option to cache annotations from IA
Omar Roth f5dd135ed8 Add 'view as playlist' option to trending page
Omar Roth 9c8f85741c Fix search when keyword matches operator
Omar Roth 80c1ebd768 Support 'sort_by' in reddit /api/v1/comments
Omar Roth 9a7fea0447 Add playlist support to embedded videos
Omar Roth ae52ff93b2 Fix 404 for annotations endpoint
Omar Roth ca9ea109c6 Add id to AdaptationSets
Omar Roth 2a33a746f0 Remove content type from videoplayback redirects
Omar Roth 98295b85ab Add webm to dash manifests
Omar Roth af1823db8c Fix url in storyboards
Omar Roth a2ab6b89f1 Fix width and height in manifest
Omar Roth 62a4c82e95 Add storyboards and fix image caching
Omar Roth d522c864d4 Add dashUrl to /api/v1/videos
Omar Roth aa8ff7ace3 Always use ucid for channel search
Omar Roth 4e6a931de3 Make check_tables config option
Omar Roth 5e141e869d Add subtitles to download widget
Omar Roth e1c78fcbd3 Update view names to avoid collisions
Omar Roth 5dc45c35e6 Automatically migrate database
Omar Roth c85903383a Fix to_json for storing user preferences
Omar Roth 4aededf038 Add media-src blob: to CSP
Omar Roth 4bc6501b8d Add 'blob' to CSP
Omar Roth a1b3b47573 Add CSP, STS, and Referrer-Policy
Omar Roth c8cf4fe09c Fix subscription_ajax for Google accounts
Omar Roth ca07d75405 Add '--version' to command line
Omar Roth ea0d52c0b8 Add support for Spanish translation
Omar Roth 305d636217 Add multithreading to pubsub job
Omar Roth 5ef288b840 Add 'sort_by' to /api/v1/comments
Omar Roth bd4f5ebcdf Add option to configure default user preferences
Omar Roth ab7e1b42bd Add '/api/v1/annotations/:id'
Omar Roth 36c0eae7ed Add /feeds/videos.xml
Omar Roth 388e58bf1e Update handling for preferences
Omar Roth eee973fe86 Fix host in redirect
Omar Roth 61769c6f9c Fix local redirects in /videoplayback
Omar Roth 7a0f0ca5ce Fix thin mode
Omar Roth 63be05146d Fix expire for prefs cookie
Omar Roth 9239cfb3c1 Fix redirect for shortened video urls
Omar Roth c15790f230 Use user preferences in embedded videos
Omar Roth 13924a8353 Fix duplicate file extension
Omar Roth fd84b57ac8 Use tuples for "qualities" in API endpoints
Omar Roth 591a6b330a Remove 'crawl_threads', fix sleep in fibers
Omar Roth 0c6cede287 Format files and trim trailing whitespace
Omar Roth 57c05354c2 Move 'pretty=1' into middleware
Omar Roth fd26f9f34e Add support for premieres to search and feed
Omar Roth 88b70973cc Add 'premiereTimestamp' to /api/v1/videos
Omar Roth f0658bbd09 Add 'liveNow' to subscription feed
Omar Roth 6e51189d4d Expire nonce on register
Omar Roth f1d7aa09e4 Add fix for Google cookies with no extension
Omar Roth 88e6b865d9 Update contact email for text captcha
Omar Roth 202f3d36c4 Bake in branch, commit, version
Omar Roth 9091b36249 Don't require CAPTCHA for login
Omar Roth 2ebc773863 Add mixes to genre channels
Omar Roth 44f4057876 Fix issue with cookie expiration
Omar Roth a8c375fc95 Update copyright notice
Omar Roth e738e57e26 Add 'local' option to preferences
Omar Roth 21ebc398fa Add privacy policy
Omar Roth e86eb16d91 Add temporary fix for
Omar Roth 1fcd1ff3e8 Add better fallback for '/videoplayback'
Omar Roth 58f4212aa8 Remove 'host' from query params
Omar Roth f01152eda1 Add 'host' to '/videoplayback'
Omar Roth 11ff40bcd6 Fix paths for 'local=true&raw=1'
Omar Roth 46e985b306 Add 'dark_mode', 'thin_mode' as query parameters
Omar Roth fdc014af67 Add '&local=true' to watch and embed pages
Omar Roth bf11a46abe Bump expire time for pubsub
Omar Roth c4d77bc18a Use host_url for generating thumbnails
Omar Roth ce528c9783 Update sorting for subscriptions
Omar Roth b9c7501012 Fix typo in pubsub update
Omar Roth ae10052aaf Fix date parsing for RSS feeds
Omar Roth 10abcd519f Add RSS alternate to channel and subscription pages
Omar Roth 7557ffcda1 Mark deleted channels in /subscription_manager
Omar Roth bc9d70109c Fix typo in index
Omar Roth b2f4a0276a Remove "lease_seconds" from pubsub response
Omar Roth 1435516a9c Add port number to host URL
Omar Roth 2a1befb41a Fix sorting for latest_only
Omar Roth 2840d98fd4 Fix tagging for current version
Omar Roth 32b9c0c840 Fix tagging for current branch