mirror of
				https://github.com/iv-org/invidious.git
				synced 2025-11-03 22:21:55 +00:00 
			
		
		
		
	Corrected usage of publishedText variable throughout the code
This commit is contained in:
		@@ -246,7 +246,11 @@ module Invidious::JSONify::APIv1
 | 
			
		||||
                json.field "viewCountText", rv["short_view_count"]?
 | 
			
		||||
                json.field "viewCount", rv["view_count"]?.try &.empty? ? nil : rv["view_count"].to_i64
 | 
			
		||||
                json.field "published", rv["published"]?
 | 
			
		||||
                json.field "publishedTimeText", translate(locale, "`x` ago", rv["publishedText"].to_s.gsub(" ago", ""))
 | 
			
		||||
                if !rv[published].nil?
 | 
			
		||||
                  json.field "publishedText", translate(locale, "`x` ago", recode_date(rv[published], locale))
 | 
			
		||||
                else
 | 
			
		||||
                  json.field "publishedText", translate(locale, "`x` ago", "NaN")
 | 
			
		||||
                end
 | 
			
		||||
              end
 | 
			
		||||
            end
 | 
			
		||||
          end
 | 
			
		||||
 
 | 
			
		||||
@@ -56,7 +56,6 @@ def parse_related_video(related : JSON::Any) : Hash(String, JSON::Any)?
 | 
			
		||||
    "short_view_count" => JSON::Any.new(short_view_count || "0"),
 | 
			
		||||
    "author_verified"  => JSON::Any.new(author_verified),
 | 
			
		||||
    "published"        => JSON::Any.new(published || ""),
 | 
			
		||||
    "publishedText"    => JSON::Any.new(published_time_text || ""),
 | 
			
		||||
  }
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user