mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2026-02-17 14:06:14 +00:00
Merge remote-tracking branch 'upstream/master'
Some checks failed
Build and release container directly from master / release (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.12.1, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.13.2, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.14.0, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.15.0, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (nightly, false) (push) Has been cancelled
Invidious CI / build-docker (push) Has been cancelled
Invidious CI / build-docker-arm64 (push) Has been cancelled
Invidious CI / lint (push) Has been cancelled
Stale issue handler / stale (push) Has been cancelled
Some checks failed
Build and release container directly from master / release (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.12.1, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.13.2, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.14.0, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (1.15.0, true) (push) Has been cancelled
Invidious CI / build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }} (nightly, false) (push) Has been cancelled
Invidious CI / build-docker (push) Has been cancelled
Invidious CI / build-docker-arm64 (push) Has been cancelled
Invidious CI / lint (push) Has been cancelled
Stale issue handler / stale (push) Has been cancelled
This commit is contained in:
@@ -67,6 +67,8 @@ private module Parsers
|
||||
author_id = author_fallback.id
|
||||
end
|
||||
|
||||
author_thumbnail = item_contents.dig?("channelThumbnailSupportedRenderers", "channelThumbnailWithLinkRenderer", "thumbnail", "thumbnails", 0, "url").try &.as_s
|
||||
|
||||
author_verified = has_verified_badge?(item_contents["ownerBadges"]?)
|
||||
|
||||
# For live videos (and possibly recently premiered videos) there is no published information.
|
||||
@@ -148,6 +150,7 @@ private module Parsers
|
||||
length_seconds: length_seconds,
|
||||
premiere_timestamp: premiere_timestamp,
|
||||
author_verified: author_verified,
|
||||
author_thumbnail: author_thumbnail,
|
||||
badges: badges,
|
||||
})
|
||||
end
|
||||
@@ -579,6 +582,7 @@ private module Parsers
|
||||
length_seconds: duration,
|
||||
premiere_timestamp: Time.unix(0),
|
||||
author_verified: false,
|
||||
author_thumbnail: nil,
|
||||
badges: VideoBadges::None,
|
||||
})
|
||||
end
|
||||
@@ -708,6 +712,7 @@ private module Parsers
|
||||
length_seconds: duration,
|
||||
premiere_timestamp: Time.unix(0),
|
||||
author_verified: false,
|
||||
author_thumbnail: nil,
|
||||
badges: VideoBadges::None,
|
||||
})
|
||||
end
|
||||
@@ -1024,7 +1029,7 @@ end
|
||||
def extract_items(
|
||||
initial_data : InitialData,
|
||||
author_fallback : String? = nil,
|
||||
author_id_fallback : String? = nil
|
||||
author_id_fallback : String? = nil,
|
||||
) : {Array(SearchItem), String?}
|
||||
items = [] of SearchItem
|
||||
continuation = nil
|
||||
|
||||
@@ -202,7 +202,7 @@ module YoutubeAPI
|
||||
def initialize(
|
||||
*,
|
||||
@client_type = ClientType::Web,
|
||||
@region = "US"
|
||||
@region = "US",
|
||||
)
|
||||
end
|
||||
|
||||
@@ -361,7 +361,7 @@ module YoutubeAPI
|
||||
browse_id : String,
|
||||
*, # Force the following parameters to be passed by name
|
||||
params : String,
|
||||
client_config : ClientConfig | Nil = nil
|
||||
client_config : ClientConfig | Nil = nil,
|
||||
)
|
||||
# JSON Request data, required by the API
|
||||
data = {
|
||||
@@ -552,7 +552,7 @@ module YoutubeAPI
|
||||
def search(
|
||||
search_query : String,
|
||||
params : String,
|
||||
client_config : ClientConfig | Nil = nil
|
||||
client_config : ClientConfig | Nil = nil,
|
||||
)
|
||||
# JSON Request data, required by the API
|
||||
data = {
|
||||
@@ -578,7 +578,7 @@ module YoutubeAPI
|
||||
|
||||
def get_transcript(
|
||||
params : String,
|
||||
client_config : ClientConfig | Nil = nil
|
||||
client_config : ClientConfig | Nil = nil,
|
||||
) : Hash(String, JSON::Any)
|
||||
data = {
|
||||
"context" => self.make_context(client_config),
|
||||
|
||||
Reference in New Issue
Block a user