Skip to content

Commit 1ec15dc

Browse files
committed
Propagate related videos changes to API function
1 parent f124e8c commit 1ec15dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/invidious/videos.cr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ struct Video
446446
end
447447

448448
json.field "author", rv["author"]
449-
json.field "authorUrl", rv["author_url"]?
449+
json.field "authorUrl", "/channel/#{rv["ucid"]?}"
450450
json.field "authorId", rv["ucid"]?
451451
if rv["author_thumbnail"]?
452452
json.field "authorThumbnails" do
@@ -455,7 +455,7 @@ struct Video
455455

456456
qualities.each do |quality|
457457
json.object do
458-
json.field "url", rv["author_thumbnail"]?.try &.gsub(/s\d+-/, "s#{quality}-")
458+
json.field "url", rv["author_thumbnail"].try &.gsub(/s\d+-/, "s#{quality}-")
459459
json.field "width", quality
460460
json.field "height", quality
461461
end
@@ -465,7 +465,7 @@ struct Video
465465
end
466466

467467
json.field "lengthSeconds", rv["length_seconds"]?.try &.to_i
468-
json.field "viewCountText", rv["short_view_count_text"]?
468+
json.field "viewCountText", rv["short_view_count"]?
469469
json.field "viewCount", rv["view_count"]?.try &.empty? ? nil : rv["view_count"].to_i64
470470
end
471471
end

0 commit comments

Comments
 (0)