Community: Restore thumbnail qualities array

pull/3691/head
Samantaz Fox 2023-03-15 22:37:07 +01:00
rodzic a6d21cb211
commit b66a5c40a9
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: F42821059186176E
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -77,9 +77,10 @@ def fetch_channel_community(ucid, continuation, locale, format, thin_mode)
json.field "author", author json.field "author", author
json.field "authorThumbnails" do json.field "authorThumbnails" do
json.array do json.array do
qualities = {32, 48, 76, 100, 176, 512}
author_thumbnail = post["authorThumbnail"]["thumbnails"].as_a[0]["url"].as_s author_thumbnail = post["authorThumbnail"]["thumbnails"].as_a[0]["url"].as_s
IMAGE_QUALITIES.each do |quality| qualities.each do |quality|
json.object do json.object do
json.field "url", author_thumbnail.gsub(/s\d+-/, "s#{quality}-") json.field "url", author_thumbnail.gsub(/s\d+-/, "s#{quality}-")
json.field "width", quality json.field "width", quality