Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Commit

Permalink
> Fix download torrent
Browse files Browse the repository at this point in the history
  • Loading branch information
trueromanus committed Feb 15, 2020
1 parent b5c49f6 commit 4a2e0dc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ private async Task PerformActionFavorite ( long id , string action ) {
/// <returns>Torrent path.</returns>
public async Task<StorageFile> DownloadTorrent ( string torrentUri ) {
var storageFile = await ApplicationData.Current.TemporaryFolder.CreateFileAsync ( "release.torrent" , CreationCollisionOption.GenerateUniqueName );
var byteArray = await m_HttpClient.GetByteArrayAsync ( m_WebSiteUrl + torrentUri );
var byteArray = await m_HttpClient.GetByteArrayAsync ( m_ImageUploadUrl + torrentUri );

using ( Stream stream = await storageFile.OpenStreamForWriteAsync () ) {
stream.Write ( byteArray , 0 , byteArray.Length );
Expand Down

0 comments on commit 4a2e0dc

Please sign in to comment.