Caching and refactor (#527)

* Caching and refactor

* Fix and tweak some parsing

* Missing imports

* refactor
This commit is contained in:
Brahim Hadriche authored and GitHub committed 2024-12-28 11:54:12 -05:00
1 parent 76e9e0c845
commit 5b6b5f5ec3
16 files changed
+357 -208

No files matched your search

@@ -27,21 +27,19 @@ function VideoContentTaskDev(input as object) as object
backend = preferencesNode["playback.backend"]
if backend = "playlet"
response = InnertubeService.GetVideoMetadata(videoId, { cancellation: m.top.cancellation })
metadata = InnertubeService.GetVideoMetadata(videoId, { cancellation: m.top.cancellation })
else
response = service.GetVideoMetadata(videoId, { cancellation: m.top.cancellation })
metadata = service.GetVideoMetadata(videoId, { cancellation: m.top.cancellation })
end if
if m.top.cancel
return invalid
end if
metadata = response.Json()
if not response.IsSuccess() or metadata = invalid
if metadata.error <> invalid
return {
success: false
error: response.ErrorMessage()
error: metadata.error
}
end if