Add comments to src/invidious/yt_backend/extractors.cr

Co-authored-by: Samantaz Fox <coding@samantaz.fr>
このコミットが含まれているのは:
DUO Labs 2023-01-05 20:42:11 -05:00 committed by GitHub
コミット 8d08cfe30f
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: 4AEE18F83AFDEB23
1個のファイルの変更5行の追加0行の削除

ファイルの表示

@ -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