summaryrefslogtreecommitdiffstats
path: root/src/invidious.cr
diff options
context:
space:
mode:
authorLeon Klingele <git@leonklingele.de>2019-08-09 02:00:22 +0200
committerLeon Klingele <git@leonklingele.de>2019-08-09 02:04:36 +0200
commit46577fb1285e99ca60438d575c9eb0542cde52b0 (patch)
treeef7907177d7b8727c25b10c528d014d67d418cdc /src/invidious.cr
parent66b949bed1b2d685ec2f76c99897a13b94a9373b (diff)
downloadinvidious-46577fb1285e99ca60438d575c9eb0542cde52b0.tar.gz
invidious-46577fb1285e99ca60438d575c9eb0542cde52b0.tar.bz2
invidious-46577fb1285e99ca60438d575c9eb0542cde52b0.zip
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.
Diffstat (limited to 'src/invidious.cr')
-rw-r--r--src/invidious.cr4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/invidious.cr b/src/invidious.cr
index c2de0dcf..85fb87d9 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -1478,6 +1478,9 @@ post "/preferences" do |env|
speed = env.params.body["speed"]?.try &.as(String).to_f32?
speed ||= CONFIG.default_user_preferences.speed
+ player_style = env.params.body["player_style"]?.try &.as(String)
+ player_style ||= CONFIG.default_user_preferences.player_style
+
quality = env.params.body["quality"]?.try &.as(String)
quality ||= CONFIG.default_user_preferences.quality
@@ -1546,6 +1549,7 @@ post "/preferences" do |env|
locale: locale,
max_results: max_results,
notifications_only: notifications_only,
+ player_style: player_style,
quality: quality,
redirect_feed: redirect_feed,
related_videos: related_videos,