mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-17 01:58:29 +00:00
Readd removed comments
This commit is contained in:
parent
cc69d08983
commit
f54c10004d
@ -9,6 +9,7 @@ module DB::Serializable
|
|||||||
}}
|
}}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Initialize DB::Serializable descendants via NamedTuples
|
||||||
def initialize(tuple)
|
def initialize(tuple)
|
||||||
\{% for var in @type.instance_vars %}
|
\{% for var in @type.instance_vars %}
|
||||||
\{% ann = var.annotation(::DB::Field) %}
|
\{% ann = var.annotation(::DB::Field) %}
|
||||||
|
@ -61,9 +61,12 @@ private module Parsers
|
|||||||
# Typically views are stored under a "simpleText" in the "viewCountText". However, for
|
# 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"}]
|
# 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.
|
# 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
|
# and count
|
||||||
view_count = item_contents.dig?("viewCountText", "simpleText").try &.as_s.gsub(/\D+/, "").to_i64? || 0_i64
|
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) } || ""
|
description_html = item_contents["descriptionSnippet"]?.try { |t| parse_content(t) } || ""
|
||||||
|
|
||||||
# The length information *should* only always exist in "lengthText". However, the legacy Invidious code
|
# The length information *should* only always exist in "lengthText". However, the legacy Invidious code
|
||||||
|
Loading…
Reference in New Issue
Block a user