Merge branch 'master' into diag-tags
This commit is contained in:
commit
e6a9c210ac
@ -21,15 +21,16 @@ internal partial class MediaFile(TagFile file) : IDisposable
|
|||||||
|
|
||||||
public void SetComment(string comment) => file.Tag.Comment = comment;
|
public void SetComment(string comment) => file.Tag.Comment = comment;
|
||||||
|
|
||||||
public void Dispose()
|
public void Save()
|
||||||
{
|
{
|
||||||
file.Tag.DateTagged = DateTime.Now;
|
file.Tag.DateTagged = DateTime.Now;
|
||||||
file.Save();
|
file.Save();
|
||||||
file.Dispose();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Dispose() => file.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
internal partial class MediaFile
|
internal partial class MediaFile
|
||||||
{
|
{
|
||||||
public static MediaFile Create(string filePath) => new(TagFile.Create(filePath));
|
public static MediaFile Open(string filePath) => new(TagFile.Create(filePath));
|
||||||
}
|
}
|
||||||
|
@ -86,10 +86,12 @@ public class MediaTagInjector
|
|||||||
CancellationToken cancellationToken = default
|
CancellationToken cancellationToken = default
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
using var mediaFile = MediaFile.Create(filePath);
|
using var mediaFile = MediaFile.Open(filePath);
|
||||||
|
|
||||||
InjectMiscMetadata(mediaFile, video);
|
InjectMiscMetadata(mediaFile, video);
|
||||||
await InjectMusicMetadataAsync(mediaFile, video, cancellationToken);
|
await InjectMusicMetadataAsync(mediaFile, video, cancellationToken);
|
||||||
await InjectThumbnailAsync(mediaFile, video, cancellationToken);
|
await InjectThumbnailAsync(mediaFile, video, cancellationToken);
|
||||||
|
|
||||||
|
mediaFile.Save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
<PackageReference Include="Gress" Version="2.1.1" />
|
<PackageReference Include="Gress" Version="2.1.1" />
|
||||||
<PackageReference Include="JsonExtensions" Version="1.2.0" />
|
<PackageReference Include="JsonExtensions" Version="1.2.0" />
|
||||||
<PackageReference Include="TagLibSharp" Version="2.3.0" />
|
<PackageReference Include="TagLibSharp" Version="2.3.0" />
|
||||||
<PackageReference Include="YoutubeExplode" Version="6.4.1" />
|
<PackageReference Include="YoutubeExplode" Version="6.4.2" />
|
||||||
<PackageReference Include="YoutubeExplode.Converter" Version="6.4.1" />
|
<PackageReference Include="YoutubeExplode.Converter" Version="6.4.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
@ -4,7 +4,9 @@
|
|||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<ApplicationIcon>..\favicon.ico</ApplicationIcon>
|
<ApplicationIcon>..\favicon.ico</ApplicationIcon>
|
||||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
<PublishTrimmed>true</PublishTrimmed>
|
<!-- Trimmed builds break support for Windows 10 for some reason -->
|
||||||
|
<!-- https://github.com/Tyrrrz/YoutubeDownloader/issues/496 -->
|
||||||
|
<PublishTrimmed>false</PublishTrimmed>
|
||||||
<CopyOutputSymbolsToPublishDirectory>false</CopyOutputSymbolsToPublishDirectory>
|
<CopyOutputSymbolsToPublishDirectory>false</CopyOutputSymbolsToPublishDirectory>
|
||||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||||
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user