Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to download clips #895

Closed
2 tasks done
PriscillAAH opened this issue Nov 22, 2023 · 5 comments · Fixed by #907
Closed
2 tasks done

Unable to download clips #895

PriscillAAH opened this issue Nov 22, 2023 · 5 comments · Fixed by #907
Labels
bug Something isn't working

Comments

@PriscillAAH
Copy link

Checklist

Edition

Windows GUI Application

Describe your issue here

Was able to download clips the other day but had to reinstall program and now this is happening.

I have tried multiple times to download clips and keep getting this error:

ERROR: System.Text.Json.JsonException: The JSON value could not be converted to System.Int32. Path: $[0].data.clip.videoQualities[0].frameRate | LineNumber: 0 | BytePositionInLine: 527.
---> System.FormatException: Either the JSON value is not in a supported format, or is out of bounds for an Int32.
at System.Text.Json.ThrowHelper.ThrowFormatException(NumericType numericType)
at System.Text.Json.Utf8JsonReader.GetInt32()
at System.Text.Json.Serialization.Converters.Int32Converter.ReadNumberWithCustomHandling(Utf8JsonReader& reader, JsonNumberHandling handling, JsonSerializerOptions options)
at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonCollectionConverter2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value) at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader) at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.Metadata.JsonPropertyInfo1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader) at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonCollectionConverter2.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, TCollection& value)
at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
--- End of inner exception stack trace ---
at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, Utf8JsonReader& reader, Exception ex)
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadCore[TValue](Utf8JsonReader& reader, JsonTypeInfo jsonTypeInfo, ReadStack& state)
at System.Text.Json.JsonSerializer.ContinueDeserialize[TValue](ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack, JsonTypeInfo jsonTypeInfo)
at System.Text.Json.JsonSerializer.ReadFromStreamAsync[TValue](Stream utf8Json, JsonTypeInfo jsonTypeInfo, CancellationToken cancellationToken)
at System.Net.Http.Json.HttpContentJsonExtensions.ReadFromJsonAsyncCore[T](HttpContent content, Encoding sourceEncoding, JsonSerializerOptions options, CancellationToken cancellationToken)
at TwitchDownloaderCore.TwitchHelper.GetClipLinks(String clipId)
at TwitchDownloaderWPF.PageClipDownload.GetClipInfo()

Add any related files or extra information here

No response

@PriscillAAH PriscillAAH added the bug Something isn't working label Nov 22, 2023
@ScrubN
Copy link
Collaborator

ScrubN commented Nov 22, 2023

Funny story, I ran into this myself and fixed it earlier today. Guess I'll release a new update with the fix.

@ScrubN ScrubN closed this as completed Nov 22, 2023
@PriscillAAH
Copy link
Author

PriscillAAH commented Nov 22, 2023

@ScrubN thanks able to download now but for some reason files aren't downloading at 1080p? Keep getting random qualities even though I am selecting 1080p. Also it doesn't default to 1080p when I click get clip info and I have to uncheck encode metadata otherwise it gets stuck on encoding clip metadata.

@ScrubN
Copy link
Collaborator

ScrubN commented Nov 23, 2023

Could you provide example links to clips where you experience the 1080p and metadata issues?

@ScrubN ScrubN reopened this Nov 23, 2023
@ScrubN
Copy link
Collaborator

ScrubN commented Nov 23, 2023

for some reason files aren't downloading at 1080p? Keep getting random qualities even though I am selecting 1080p

I have found the issue. Twitch changed how one of their API responses looks but I didn't catch it because I didn't know how it looked previously. I'll release a hotfix, but this API change also kinda broke the website so it'll probably change again soon.

Source VOD Available clip qualities
image image

@PriscillAAH
Copy link
Author

for some reason files aren't downloading at 1080p? Keep getting random qualities even though I am selecting 1080p

I have found the issue. Twitch changed how one of their API responses looks but I didn't catch it because I didn't know how it looked previously. I'll release a hotfix, but this API change also kinda broke the website so it'll probably change again soon.

Source VOD Available clip qualities
image image

yeah apparently for vods/streams the qualities are normal 1080 at the top down, but for clips Twitch is randomizing the quality list saw some comments on a reddit thread about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants