Skip to content

Commit

Permalink
Backport 'Fix being unable to download clips that return non-integer …
Browse files Browse the repository at this point in the history
…framerates. Yes this apparently can happen.' from kick-support
  • Loading branch information
ScrubN committed Nov 21, 2023
1 parent da7bdfc commit 4e71e57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace TwitchDownloaderCore.TwitchObjects.Gql
{
Expand Down Expand Up @@ -34,7 +30,7 @@ public class GqlClipTokenResponse

public class VideoQuality
{
public int frameRate { get; set; }
public double frameRate { get; set; }
public string quality { get; set; }
public string sourceURL { get; set; }
public string __typename { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion TwitchDownloaderWPF/PageClipDownload.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private async Task GetClipInfo()

foreach (var quality in taskLinks.Result[0].data.clip.videoQualities)
{
comboQuality.Items.Add(new TwitchClip(quality.quality, quality.frameRate.ToString(), quality.sourceURL));
comboQuality.Items.Add(new TwitchClip(quality.quality, Math.Round(quality.frameRate).ToString("F0"), quality.sourceURL));
}

comboQuality.SelectedIndex = 0;
Expand Down

0 comments on commit 4e71e57

Please sign in to comment.