Fix crash related to fetching subscriptions
This commit is contained in:
1 parent
771929d0d8
commit
777db66bda
4 files changed
+27
-9
No files matched your search
@@ -5,6 +5,8 @@
|
||||
<!-- index in a feed -->
|
||||
<field id="feedSourcesIndex" type="integer" value="-1" />
|
||||
<!--
|
||||
TODO:P0 see if the existance of the field "title" has anything to do with it
|
||||
|
||||
For some strange reason, the "author" field can only be set once.
|
||||
If you try to set it again, it will not be updated, with type mismatch warning:
|
||||
|
||||
|
||||
@@ -372,16 +372,28 @@ namespace Invidious
|
||||
function AuthFeedHandler(m as object, feedSource as object, response as object) as object
|
||||
m.DeleteExpiredToken(response)
|
||||
|
||||
if response.StatusCode() = 200
|
||||
json = response.Json()
|
||||
videos = []
|
||||
videos.Append(json.notifications)
|
||||
videos.Append(json.videos)
|
||||
return {
|
||||
items: videos
|
||||
}
|
||||
if response.StatusCode() <> 200
|
||||
return invalid
|
||||
end if
|
||||
return invalid
|
||||
|
||||
json = response.Json()
|
||||
if json = invalid
|
||||
return invalid
|
||||
end if
|
||||
|
||||
videos = []
|
||||
|
||||
if IsArray(json.notifications)
|
||||
videos.Append(json.notifications)
|
||||
end if
|
||||
|
||||
if IsArray(json.videos)
|
||||
videos.Append(json.videos)
|
||||
end if
|
||||
|
||||
return {
|
||||
items: videos
|
||||
}
|
||||
end function
|
||||
|
||||
function DeleteExpiredToken(response as object)
|
||||
|
||||
Reference in new issue
Block a user