Fix client

This commit is contained in:
Mike Nolan 2022-06-15 08:28:43 -05:00
parent 0ee1e22b4f
commit b1fe28c637
3 changed files with 8 additions and 7 deletions

View File

@ -470,6 +470,7 @@ namespace Tesses.YouTubeDownloader.Server
public async Task AddVideo(ServerContext ctx) public async Task AddVideo(ServerContext ctx)
{ {
string id; string id;
Console.WriteLine(ctx.RawUrl);
if(ctx.QueryParams.TryGetFirst("v",out id)) if(ctx.QueryParams.TryGetFirst("v",out id))
{ {
Resolution resolution=Resolution.PreMuxed; Resolution resolution=Resolution.PreMuxed;

View File

@ -43,7 +43,7 @@ namespace Tesses.YouTubeDownloader
public async Task AddChannelAsync(ChannelId id, Resolution resolution = Resolution.PreMuxed) public async Task AddChannelAsync(ChannelId id, Resolution resolution = Resolution.PreMuxed)
{ {
try{ try{
await client.GetAsync($"{url}api/v2/AddChannel?v={id.Value}&res={resolution.ToString()}"); await client.GetStringAsync($"{url}api/v2/AddChannel?v={id.Value}&res={resolution.ToString()}");
}catch(Exception ex) }catch(Exception ex)
{ {
_=ex; _=ex;
@ -53,7 +53,7 @@ namespace Tesses.YouTubeDownloader
public async Task AddPlaylistAsync(PlaylistId id, Resolution resolution = Resolution.PreMuxed) public async Task AddPlaylistAsync(PlaylistId id, Resolution resolution = Resolution.PreMuxed)
{ {
try{ try{
await client.GetAsync($"{url}api/v2/AddPlaylist?v={id.Value}&res={resolution.ToString()}"); await client.GetStringAsync($"{url}api/v2/AddPlaylist?v={id.Value}&res={resolution.ToString()}");
}catch(Exception ex) }catch(Exception ex)
{ {
_=ex; _=ex;
@ -63,7 +63,7 @@ namespace Tesses.YouTubeDownloader
public async Task AddUserAsync(UserName userName, Resolution resolution = Resolution.PreMuxed) public async Task AddUserAsync(UserName userName, Resolution resolution = Resolution.PreMuxed)
{ {
try{ try{
await client.GetAsync($"{url}api/v2/AddUser?v={userName.Value}&res={resolution.ToString()}"); await client.GetStringAsync($"{url}api/v2/AddUser?v={userName.Value}&res={resolution.ToString()}");
}catch(Exception ex) }catch(Exception ex)
{ {
_=ex; _=ex;
@ -73,7 +73,7 @@ namespace Tesses.YouTubeDownloader
public async Task AddVideoAsync(VideoId id, Resolution resolution = Resolution.PreMuxed) public async Task AddVideoAsync(VideoId id, Resolution resolution = Resolution.PreMuxed)
{ {
try{ try{
await client.GetAsync($"{url}api/v2/AddVideo?v={id.Value}&res={resolution.ToString()}"); await client.GetStringAsync($"{url}api/v2/AddVideo?v={id.Value}&res={resolution.ToString()}");
}catch(Exception ex) }catch(Exception ex)
{ {
_=ex; _=ex;

View File

@ -7,9 +7,9 @@
<PackageId>Tesses.YouTubeDownloader</PackageId> <PackageId>Tesses.YouTubeDownloader</PackageId>
<Author>Mike Nolan</Author> <Author>Mike Nolan</Author>
<Company>Tesses</Company> <Company>Tesses</Company>
<Version>1.1.2</Version> <Version>1.1.3</Version>
<AssemblyVersion>1.1.2</AssemblyVersion> <AssemblyVersion>1.1.3</AssemblyVersion>
<FileVersion>1.1.2</FileVersion> <FileVersion>1.1.3</FileVersion>
<Description>A YouTube Downloader</Description> <Description>A YouTube Downloader</Description>
<PackageLicenseExpression>LGPL-3.0-only</PackageLicenseExpression> <PackageLicenseExpression>LGPL-3.0-only</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance> <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>