mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-08 13:42:27 +05:30
Make solution complaint with spec
This commit is contained in:
parent
5957523624
commit
04ca64691b
@ -250,7 +250,7 @@ struct Video
|
|||||||
end
|
end
|
||||||
|
|
||||||
def genre_url : String?
|
def genre_url : String?
|
||||||
info["genreUcid"].try &.as_s? ? "/channel/#{info["genreUcid"]}" : nil
|
info["genreUcid"]? == "" ? nil : "/channel/#{info["genreUcid"]}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_vr : Bool?
|
def is_vr : Bool?
|
||||||
|
@ -424,7 +424,7 @@ def parse_video_info(video_id : String, player_response : Hash(String, JSON::Any
|
|||||||
"shortDescription" => JSON::Any.new(short_description.try &.as_s || nil),
|
"shortDescription" => JSON::Any.new(short_description.try &.as_s || nil),
|
||||||
# Video metadata
|
# Video metadata
|
||||||
"genre" => JSON::Any.new(genre.try &.as_s || ""),
|
"genre" => JSON::Any.new(genre.try &.as_s || ""),
|
||||||
"genreUcid" => JSON::Any.new(genre_ucid.try &.as_s?),
|
"genreUcid" => JSON::Any.new(genre_ucid.try &.as_s || ""),
|
||||||
"license" => JSON::Any.new(license.try &.as_s || ""),
|
"license" => JSON::Any.new(license.try &.as_s || ""),
|
||||||
# Music section
|
# Music section
|
||||||
"music" => JSON.parse(music_list.to_json),
|
"music" => JSON.parse(music_list.to_json),
|
||||||
|
Loading…
Reference in New Issue
Block a user