0
Fork 0
mirror of https://codeberg.org/SafeTwitch/safetwitch-backend.git synced 2024-12-22 13:13:00 -05:00

Return error if VOD is sub only

This commit is contained in:
dragongoose 2023-10-21 12:50:59 -04:00
parent 0953928e5e
commit cf9f1d65ca
No known key found for this signature in database
GPG key ID: 01397EEC371CDAA5

View file

@ -68,6 +68,10 @@ func GetVODPlaylist(vodID string) ([]byte, error) {
return []byte{}, err return []byte{}, err
} }
if resp.StatusCode == 403 {
return []byte{}, errors.New("Video is sub-only")
}
body, err := io.ReadAll(resp.Body) body, err := io.ReadAll(resp.Body)
if err != nil { if err != nil {
return []byte{}, err return []byte{}, err