diff --git a/README.md b/README.md index 74065e31..411f756a 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ You can read more here: https://docs.invidious.io/applications/ 1. Fork it ( https://github.com/iv-org/invidious/fork ). 1. Create your feature branch (`git checkout -b my-new-feature`). 1. Stage your files (`git add .`). -1. Commit your changes (`git commit -am 'Add some feature'`). +1. Commit your changes (`git commit -m 'Add some feature'`). 1. Push to the branch (`git push origin my-new-feature`). 1. Create a new pull request ( https://github.com/iv-org/invidious/compare ). diff --git a/shard.yml b/shard.yml index f3bc9dae..516a8db9 100644 --- a/shard.yml +++ b/shard.yml @@ -5,6 +5,10 @@ authors: - Invidious team - Contributors! +targets: + invidious: + main: src/invidious.cr + description: | Invidious is an alternative front-end to YouTube diff --git a/src/invidious/channels/videos.cr b/src/invidious/channels/videos.cr index 96400f47..e2cc8305 100644 --- a/src/invidious/channels/videos.cr +++ b/src/invidious/channels/videos.cr @@ -114,7 +114,11 @@ module Invidious::Channel::Tabs "2:embedded" => { "1:string" => "00000000-0000-0000-0000-000000000000", }, - "4:varint" => sort_options_videos_short(sort_by), + "4:varint" => sort_options_videos_short(sort_by), + "8:embedded" => { + "1:string" => "00000000-0000-0000-0000-000000000000", + "3:varint" => sort_options_videos_short(sort_by), + }, }, } @@ -130,7 +134,11 @@ module Invidious::Channel::Tabs "2:embedded" => { "1:string" => "00000000-0000-0000-0000-000000000000", }, - "4:varint" => sort_options_videos_short(sort_by), + "4:varint" => sort_options_videos_short(sort_by), + "7:embedded" => { + "1:string" => "00000000-0000-0000-0000-000000000000", + "3:varint" => sort_options_videos_short(sort_by), + }, }, } @@ -154,7 +162,11 @@ module Invidious::Channel::Tabs "2:embedded" => { "1:string" => "00000000-0000-0000-0000-000000000000", }, - "5:varint" => sort_by_numerical, + "5:varint" => sort_by_numerical, + "8:embedded" => { + "1:string" => "00000000-0000-0000-0000-000000000000", + "3:varint" => sort_by_numerical, + }, }, } diff --git a/src/invidious/playlists.cr b/src/invidious/playlists.cr index 7c584d15..ec64bee4 100644 --- a/src/invidious/playlists.cr +++ b/src/invidious/playlists.cr @@ -359,6 +359,9 @@ def fetch_playlist(plid : String) thumbnail = playlist_info.dig?( "thumbnailRenderer", "playlistVideoThumbnailRenderer", "thumbnail", "thumbnails", 0, "url" + ).try &.as_s || playlist_info.dig?( + "thumbnailRenderer", "playlistCustomThumbnailRenderer", + "thumbnail", "thumbnails", 0, "url" ).try &.as_s views = 0_i64 diff --git a/src/invidious/routes/before_all.cr b/src/invidious/routes/before_all.cr index 63b935ec..06746a12 100644 --- a/src/invidious/routes/before_all.cr +++ b/src/invidious/routes/before_all.cr @@ -94,8 +94,8 @@ module Invidious::Routes::BeforeAll end dark_mode = convert_theme(env.params.query["dark_mode"]?) || preferences.dark_mode.to_s - thin_mode = env.params.query["thin_mode"]? || preferences.thin_mode.to_s - thin_mode = thin_mode == "true" + thin_mode = env.params.query["thin_mode"]? + thin_mode = (thin_mode == "true") || preferences.thin_mode locale = env.params.query["hl"]? || preferences.locale preferences.dark_mode = dark_mode diff --git a/src/invidious/routes/channels.cr b/src/invidious/routes/channels.cr index f785de18..968d38dc 100644 --- a/src/invidious/routes/channels.cr +++ b/src/invidious/routes/channels.cr @@ -231,8 +231,10 @@ module Invidious::Routes::Channels env.redirect "/post/#{URI.encode_www_form(lb)}?ucid=#{URI.encode_www_form(ucid)}" end - thin_mode = env.params.query["thin_mode"]? || env.get("preferences").as(Preferences).thin_mode - thin_mode = thin_mode == "true" + preferences = env.get("preferences").as(Preferences) + + thin_mode = env.params.query["thin_mode"]? + thin_mode = (thin_mode == "true") || preferences.thin_mode continuation = env.params.query["continuation"]?