mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Add comments to src/invidious/yt_backend/extractors.cr
Co-authored-by: Samantaz Fox <coding@samantaz.fr>
This commit is contained in:
parent
0d3610f63d
commit
8d08cfe30f
1 changed files with 5 additions and 0 deletions
|
@ -171,6 +171,11 @@ private module Parsers
|
|||
# TODO change default value to nil
|
||||
|
||||
subscriber_count = item_contents.dig?("subscriberCountText", "simpleText")
|
||||
|
||||
# Since youtube added channel handles, `VideoCountText` holds the number of
|
||||
# subscribers and `subscriberCountText` holds the handle, except when the
|
||||
# channel doesn't have a handle (e.g: some topic music channels).
|
||||
# See https://github.com/iv-org/invidious/issues/3394#issuecomment-1321261688
|
||||
if !subscriber_count || !subscriber_count.as_s.includes? " subscriber"
|
||||
subscriber_count = item_contents.dig?("videoCountText", "simpleText")
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue