diff --git a/Wabbajack.App.Test/Wabbajack.App.Test.csproj b/Wabbajack.App.Test/Wabbajack.App.Test.csproj index 2aa275f0..fe0caef1 100644 --- a/Wabbajack.App.Test/Wabbajack.App.Test.csproj +++ b/Wabbajack.App.Test/Wabbajack.App.Test.csproj @@ -7,7 +7,7 @@ - + diff --git a/Wabbajack.BuildServer.Test/Wabbajack.BuildServer.Test.csproj b/Wabbajack.BuildServer.Test/Wabbajack.BuildServer.Test.csproj index df80b607..fe3d65bd 100644 --- a/Wabbajack.BuildServer.Test/Wabbajack.BuildServer.Test.csproj +++ b/Wabbajack.BuildServer.Test/Wabbajack.BuildServer.Test.csproj @@ -7,13 +7,13 @@ - + - + diff --git a/Wabbajack.BuildServer/Wabbajack.BuildServer.csproj b/Wabbajack.BuildServer/Wabbajack.BuildServer.csproj index e572c43d..eea56ec7 100644 --- a/Wabbajack.BuildServer/Wabbajack.BuildServer.csproj +++ b/Wabbajack.BuildServer/Wabbajack.BuildServer.csproj @@ -16,7 +16,7 @@ - + @@ -28,7 +28,7 @@ - + diff --git a/Wabbajack.CLI/Wabbajack.CLI.csproj b/Wabbajack.CLI/Wabbajack.CLI.csproj index d24bb4d5..bcd4c822 100644 --- a/Wabbajack.CLI/Wabbajack.CLI.csproj +++ b/Wabbajack.CLI/Wabbajack.CLI.csproj @@ -19,7 +19,7 @@ - + diff --git a/Wabbajack.Lib/Downloaders/UrlDownloaders/YoutubeInferencer.cs b/Wabbajack.Lib/Downloaders/UrlDownloaders/YoutubeInferencer.cs index c3f96716..4e2c8175 100644 --- a/Wabbajack.Lib/Downloaders/UrlDownloaders/YoutubeInferencer.cs +++ b/Wabbajack.Lib/Downloaders/UrlDownloaders/YoutubeInferencer.cs @@ -14,7 +14,7 @@ namespace Wabbajack.Lib.Downloaders.UrlDownloaders if (state == null) return null; var client = new YoutubeClient(Common.Http.ClientFactory.Client); - var video = await client.GetVideoAsync(state.Key); + var video = await client.Videos.GetAsync(state.Key); var desc = video.Description; diff --git a/Wabbajack.Lib/Downloaders/YouTubeDownloader.cs b/Wabbajack.Lib/Downloaders/YouTubeDownloader.cs index 9d35c7f7..c6f4436e 100644 --- a/Wabbajack.Lib/Downloaders/YouTubeDownloader.cs +++ b/Wabbajack.Lib/Downloaders/YouTubeDownloader.cs @@ -13,7 +13,7 @@ using Wabbajack.Common.Serialization.Json; using Wabbajack.Lib.Validation; using YoutubeExplode; using YoutubeExplode.Exceptions; -using YoutubeExplode.Models.MediaStreams; +using YoutubeExplode.Videos.Streams; using File = Alphaleonis.Win32.Filesystem.File; using Path = Alphaleonis.Win32.Filesystem.Path; @@ -105,10 +105,9 @@ namespace Wabbajack.Lib.Downloaders await using var folder = new TempFolder(); folder.Dir.Combine("tracks").CreateDirectory(); var client = new YoutubeClient(Common.Http.ClientFactory.Client); - var meta = await client.GetVideoAsync(Key); - var video = await client.GetVideoMediaStreamInfosAsync(Key); - var all = video.GetAll(); - var stream = video.GetAll().OfType().Where(f => f.AudioEncoding == AudioEncoding.Aac).OrderByDescending(a => a.Bitrate) + var meta = await client.Videos.GetAsync(Key); + var video = await client.Videos.Streams.GetManifestAsync(Key); + var stream = video.Streams.OfType().Where(f => f.AudioCodec.StartsWith("mp4a")).OrderByDescending(a => a.Bitrate) .ToArray().First(); var initialDownload = folder.Dir.Combine("initial_download"); @@ -117,11 +116,11 @@ namespace Wabbajack.Lib.Downloaders await using (var fs = initialDownload.Create()) { - await client.DownloadMediaStreamAsync(stream, fs, new Progress($"Downloading {a.Name}"), + await client.Videos.Streams.CopyToAsync(stream, fs, new Progress($"Downloading {a.Name}"), CancellationToken.None); } - initialDownload.CopyTo(destination.WithExtension(new Extension(".dest_stream"))); + await initialDownload.CopyToAsync(destination.WithExtension(new Extension(".dest_stream"))); await Tracks.PMap(queue, async track => { @@ -212,7 +211,7 @@ namespace Wabbajack.Lib.Downloaders try { var client = new YoutubeClient(Common.Http.ClientFactory.Client); - var video = await client.GetVideoAsync(Key); + var video = await client.Videos.GetAsync(Key); return true; } catch (VideoUnavailableException) diff --git a/Wabbajack.Lib/Wabbajack.Lib.csproj b/Wabbajack.Lib/Wabbajack.Lib.csproj index cf84fea6..d42dbf40 100644 --- a/Wabbajack.Lib/Wabbajack.Lib.csproj +++ b/Wabbajack.Lib/Wabbajack.Lib.csproj @@ -20,7 +20,7 @@ 2.2.2.1 - 3.0.1 + 3.0.3 1.11.23 @@ -65,7 +65,7 @@ 1.0.0 - 4.7.16 + 5.0.1 diff --git a/Wabbajack.Test/Wabbajack.Test.csproj b/Wabbajack.Test/Wabbajack.Test.csproj index 3f93db7b..95c3598b 100644 --- a/Wabbajack.Test/Wabbajack.Test.csproj +++ b/Wabbajack.Test/Wabbajack.Test.csproj @@ -29,11 +29,11 @@ - + - + diff --git a/Wabbajack/Wabbajack.csproj b/Wabbajack/Wabbajack.csproj index 5a23c391..29142bb3 100644 --- a/Wabbajack/Wabbajack.csproj +++ b/Wabbajack/Wabbajack.csproj @@ -70,7 +70,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - +