Skip to content

Commit

Permalink
Fix multiple covers check method
Browse files Browse the repository at this point in the history
  • Loading branch information
emako committed Dec 14, 2024
1 parent 09bd9bc commit cd35e05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

<ItemGroup>
<PackageReference Include="CsvHelper" Version="33.0.1" />
<PackageReference Include="UTF.Unknown" Version="2.5.1" />
<PackageReference Include="UTF.Unknown" Version="2.5.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ private void UpdateMeta(string path, MediaInfo.MediaInfo info)
{
var coverBytes = Convert.FromBase64String
(
coverData.Length % 4 == 0 // MediaInfo may will return multiple covers
? coverData
: coverData.Split(" / ")[0] // Get the first cover only
coverData.Contains(' ') // MediaInfo may will return multiple covers
? coverData.Split(" / ")[0] // Get the first cover only
: coverData
);
using var ms = new MemoryStream(coverBytes);

Expand Down

0 comments on commit cd35e05

Please sign in to comment.