Gracefully handle STS_MISMATCH errors
This commit is contained in:
1 parent
5a2e8b1f4a
commit
0bed5598f4
3 files changed
+29
-9
No files matched your search
@@ -103,7 +103,15 @@ namespace InnertubeService
|
||||
return rawResponse
|
||||
end if
|
||||
|
||||
parsedResponse = Innertube.ParseInnertubePlayerResponse(playerResponse.Json(), playerRequest.signatureTimestamp, cancellation)
|
||||
parsedResponse = invalid
|
||||
try
|
||||
parsedResponse = Innertube.ParseInnertubePlayerResponse(playerResponse.Json(), playerRequest.signatureTimestamp, cancellation)
|
||||
catch exception
|
||||
if ValidString(exception.code) = "STS_MISMATCH"
|
||||
return GetVideoMetadata(videoId, options)
|
||||
end if
|
||||
throw exception
|
||||
end try
|
||||
if parsedResponse.error <> invalid
|
||||
return parsedResponse
|
||||
end if
|
||||
|
||||
Reference in new issue
Block a user