mirror of
https://github.com/iv-org/invidious.git
synced 2025-04-22 00:09:07 -04:00
Readd removed comments
This commit is contained in:
parent
cc69d08983
commit
f54c10004d
@ -9,6 +9,7 @@ module DB::Serializable
|
||||
}}
|
||||
end
|
||||
|
||||
# Initialize DB::Serializable descendants via NamedTuples
|
||||
def initialize(tuple)
|
||||
\{% for var in @type.instance_vars %}
|
||||
\{% ann = var.annotation(::DB::Field) %}
|
||||
|
@ -61,9 +61,12 @@ private module Parsers
|
||||
# Typically views are stored under a "simpleText" in the "viewCountText". However, for
|
||||
# livestreams and premiered it is stored under a "runs" array: [{"text":123}, {"text": "watching"}]
|
||||
# When view count is disabled the "viewCountText" is not present on InnerTube data.
|
||||
# TODO change default value to nil and typical encoding type to tuple storing type (watchers, views, etc)
|
||||
# TODO change default value to nil and change the view_count to tuple storing type (watchers, views, etc)
|
||||
# and count
|
||||
view_count = item_contents.dig?("viewCountText", "simpleText").try &.as_s.gsub(/\D+/, "").to_i64? || 0_i64
|
||||
|
||||
# TODO YouTube seems to have removed the description_html snippet and replaced it with "snippetText"
|
||||
# inside the detailedMetadataSnippets attribute
|
||||
description_html = item_contents["descriptionSnippet"]?.try { |t| parse_content(t) } || ""
|
||||
|
||||
# The length information *should* only always exist in "lengthText". However, the legacy Invidious code
|
||||
|
Loading…
x
Reference in New Issue
Block a user