[Part 2] Innertube (#513)

* Parse author in videoRenderer

* Parse more fields

* Parse live badge

* playlist video count

* Parse more things

* parse playlists and albums

* More parsing work

* announcement and changelog

* Lint fix

---------

Co-authored-by: github-action linter <githubaction@githubaction.com>
This commit is contained in:
Brahim Hadricheandgithub-action linter authored and GitHub committed 2024-12-22 16:04:36 -05:00
1 parent 9f3eee900f
commit bed8223e76
16 files changed
+444 -37

No files matched your search

+6 -2
View File
@@ -1,13 +1,17 @@
namespace ObjectUtils
function Dig(obj as object, keys as object) as object
if obj = invalid
return invalid
end if
for each key in keys
if IsArray(obj) and IsInt(key) and key >= 0 and key < obj.Count()
if (GetInterface(obj, "ifAssociativeArray") <> invalid) and (GetInterface(key, "ifString") <> invalid) and obj.DoesExist(key)
obj = obj[key]
continue for
end if
if IsAssociativeArray(obj) and obj.DoesExist(key)
if (GetInterface(obj, "ifArray") <> invalid) and (GetInterface(key, "ifInt") <> invalid) and key >= 0 and key < obj.Count()
obj = obj[key]
continue for
end if
+2 -2
View File
@@ -5,8 +5,8 @@ namespace TimeUtils
' Helper function convert seconds to [hh:]mm:ss format
' GetFormattedTime(138) returns 2:18
function GetFormattedTime(length as dynamic) as string
if length = invalid or length < 0
return "0:00"
if length = invalid or length <= 0
return ""
end if
hours = length \ 3600