Skip to content

Commit

Permalink
Update NuGet packages
Browse files Browse the repository at this point in the history
Closes #411
  • Loading branch information
Tyrrrz committed Jan 18, 2024
1 parent 9a92a76 commit 3cd7d07
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 25 deletions.
29 changes: 10 additions & 19 deletions YoutubeDownloader.Core/Tagging/MediaTagInjector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,14 @@ private void InjectMiscMetadata(MediaFile mediaFile, IVideo video)
{
var recordings = await _musicBrainz.SearchRecordingsAsync(video.Title, cancellationToken);

var recording = recordings.FirstOrDefault(
r =>
// Recording title must be a part of the video title.
// Recording artist must be a part of the video title or channel title.
video.Title.Contains(r.Title, StringComparison.OrdinalIgnoreCase)
&& (
video.Title.Contains(r.Artist, StringComparison.OrdinalIgnoreCase)
|| video.Author.ChannelTitle.Contains(
r.Artist,
StringComparison.OrdinalIgnoreCase
)
)
var recording = recordings.FirstOrDefault(r =>
// Recording title must be a part of the video title.
// Recording artist must be a part of the video title or channel title.
video.Title.Contains(r.Title, StringComparison.OrdinalIgnoreCase)
&& (
video.Title.Contains(r.Artist, StringComparison.OrdinalIgnoreCase)
|| video.Author.ChannelTitle.Contains(r.Artist, StringComparison.OrdinalIgnoreCase)
)
);

if (recording is null)
Expand All @@ -72,13 +68,8 @@ private void InjectMiscMetadata(MediaFile mediaFile, IVideo video)
{
var thumbnailUrl =
video
.Thumbnails.Where(
t =>
string.Equals(
t.TryGetImageFormat(),
"jpg",
StringComparison.OrdinalIgnoreCase
)
.Thumbnails.Where(t =>
string.Equals(t.TryGetImageFormat(), "jpg", StringComparison.OrdinalIgnoreCase)
)
.OrderByDescending(t => t.Resolution.Area)
.Select(t => t.Url)
Expand Down
6 changes: 3 additions & 3 deletions YoutubeDownloader.Core/YoutubeDownloader.Core.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<PackageReference Include="CSharpier.MsBuild" Version="0.26.7" PrivateAssets="all" />
<PackageReference Include="CSharpier.MsBuild" Version="0.27.0" PrivateAssets="all" />
<PackageReference Include="Gress" Version="2.1.1" />
<PackageReference Include="JsonExtensions" Version="1.2.0" />
<PackageReference Include="Lazy.Fody" Version="1.11.0" PrivateAssets="all" />
<PackageReference Include="TagLibSharp" Version="2.3.0" />
<PackageReference Include="YoutubeExplode" Version="6.3.11" />
<PackageReference Include="YoutubeExplode.Converter" Version="6.3.11" />
<PackageReference Include="YoutubeExplode" Version="6.3.12" />
<PackageReference Include="YoutubeExplode.Converter" Version="6.3.12" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ SettingsService settingsService

public void OnViewLoaded()
{
SelectedDownloadOption = AvailableDownloadOptions?.FirstOrDefault(
o => o.Container == settingsService.LastContainer
SelectedDownloadOption = AvailableDownloadOptions?.FirstOrDefault(o =>
o.Container == settingsService.LastContainer
);
}

Expand Down
2 changes: 1 addition & 1 deletion YoutubeDownloader/YoutubeDownloader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<ItemGroup>
<PackageReference Include="Cogwheel" Version="2.0.4" />
<PackageReference Include="CSharpier.MsBuild" Version="0.26.7" PrivateAssets="all" />
<PackageReference Include="CSharpier.MsBuild" Version="0.27.0" PrivateAssets="all" />
<PackageReference Include="Deorcify" Version="1.0.2" PrivateAssets="all" />
<PackageReference Include="DotnetRuntimeBootstrapper" Version="2.5.2" PrivateAssets="all" />
<PackageReference Include="Gress" Version="2.1.1" />
Expand Down

0 comments on commit 3cd7d07

Please sign in to comment.