Skip to content

Commit

Permalink
Fix URL encoding for clip download
Browse files Browse the repository at this point in the history
  • Loading branch information
lay295 committed Jun 3, 2021
1 parent aa97a16 commit 3cb0303
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion TwitchDownloaderCore/ClipDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using TwitchDownloaderCore.Options;

namespace TwitchDownloaderCore
Expand Down Expand Up @@ -32,7 +33,7 @@ public async Task DownloadAsync()
if (downloadUrl == "")
downloadUrl = taskLinks[0]["data"]["clip"]["videoQualities"].First["sourceURL"].ToString();

downloadUrl += "?sig=" + taskLinks[0]["data"]["clip"]["playbackAccessToken"]["signature"] + "&token=" + taskLinks[0]["data"]["clip"]["playbackAccessToken"]["value"];
downloadUrl += "?sig=" + taskLinks[0]["data"]["clip"]["playbackAccessToken"]["signature"] + "&token=" + HttpUtility.UrlEncode(taskLinks[0]["data"]["clip"]["playbackAccessToken"]["value"].ToString());

using (WebClient client = new WebClient())
await client.DownloadFileTaskAsync(downloadUrl, downloadOptions.Filename);
Expand Down
2 changes: 1 addition & 1 deletion TwitchDownloaderWPF/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.39.6.0")]
[assembly: AssemblyVersion("1.39.7.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

0 comments on commit 3cb0303

Please sign in to comment.