From ca2e88612f82fce45f550c143aba560481db84d2 Mon Sep 17 00:00:00 2001 From: sandreas <2050604+sandreas@users.noreply.github.com> Date: Fri, 4 Nov 2022 18:45:03 +0100 Subject: [PATCH] Bumped library versions Fixed #15 (--meta-remove-property) and #32 (changing timebase) --- tone.Tests/tone.Tests.csproj | 5 +++-- tone/Commands/TagCommand.cs | 4 ++-- tone/Metadata/Taggers/RemoveTagger.cs | 4 ++-- tone/Program.cs | 15 ++------------- tone/tone.csproj | 14 ++++++++------ 5 files changed, 17 insertions(+), 25 deletions(-) diff --git a/tone.Tests/tone.Tests.csproj b/tone.Tests/tone.Tests.csproj index 6c4f6bf..7e4e76c 100644 --- a/tone.Tests/tone.Tests.csproj +++ b/tone.Tests/tone.Tests.csproj @@ -13,12 +13,13 @@ + - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tone/Commands/TagCommand.cs b/tone/Commands/TagCommand.cs index 1dd8cc8..3f77ed7 100644 --- a/tone/Commands/TagCommand.cs +++ b/tone/Commands/TagCommand.cs @@ -101,7 +101,7 @@ public override async Task ExecuteAsync(CommandContext context, TagCommandS if (showDryRunMessage) { _console.WriteLine(); - _console.Write(new Markup("[blue]!!! This was a dry-run, no changes where actually saved !!![/]")); + _console.Write(new Markup("[blue]!!! This was a dry-run, no changes where actually saved !!![/]")); } return await Task.FromResult((int)returnCode); @@ -174,7 +174,7 @@ public override async Task ExecuteAsync(CommandContext context, TagCommandS _console.Write(diffTable); continue; } - + var path = Markup.Escape(track.Path ?? ""); var message = !track.Save() ? $"[red]Update failed: {path}[/]" diff --git a/tone/Metadata/Taggers/RemoveTagger.cs b/tone/Metadata/Taggers/RemoveTagger.cs index 393df32..edacfc5 100644 --- a/tone/Metadata/Taggers/RemoveTagger.cs +++ b/tone/Metadata/Taggers/RemoveTagger.cs @@ -32,9 +32,9 @@ public async Task> UpdateAsync(IMetadata metadata, IMetadata? ori { foreach (var property in _remove) { - metadata.SetMetadataPropertyValue(property, null); + metadata.RemoveMetadataPropertyValue(property); } - + foreach (var key in _removeAdditional) { if(metadata.AdditionalFields.ContainsKey(key)) diff --git a/tone/Program.cs b/tone/Program.cs index 7a02717..f13cb6d 100644 --- a/tone/Program.cs +++ b/tone/Program.cs @@ -15,7 +15,6 @@ using Sandreas.AudioMetadata; using Sandreas.Files; using Spectre.Console; -using Spectre.Console.Cli; using tone; using tone.Api.JavaScript; using tone.Commands; @@ -30,6 +29,7 @@ using tone.Serializers; using tone.Services; using Serilog; +using Spectre.Console.Cli; using ILogger = Serilog.ILogger; using Log = Serilog.Log; @@ -44,13 +44,11 @@ services.AddSingleton(_ => { var loggerSettings = settingsProvider.Get(); - // set loglevel to debug, if --debug is present - - var configBuilder = new ConfigurationBuilder().AddEnvironmentVariables(); var config = new LoggerConfiguration() .ReadFrom.Configuration(configBuilder.Build()); + // set loglevel to debug, if --debug is present if (debugMode && loggerSettings != null) { loggerSettings.LogLevel = LogLevel.Debug; @@ -80,15 +78,12 @@ services.AddSingleton(_ => settingsProvider); services.AddSingleton(); services.AddSingleton(); -// services.AddTransient(); services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); - services.AddSingleton(); services.AddSingleton(); - services.AddSingleton(); services.AddSingleton(_ => new JsonSerializerSettings { @@ -105,13 +100,9 @@ services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); - services.AddSingleton(); - services.AddSingleton(); services.AddSingleton(); - - services.AddSingleton(s => { var patternService = s.GetRequiredService(); @@ -152,8 +143,6 @@ options.CancellationToken(cts.Token); }); }); - - services.AddSingleton(sp => { var fs = sp.GetRequiredService(); diff --git a/tone/tone.csproj b/tone/tone.csproj index 6c02499..7ca0dd8 100644 --- a/tone/tone.csproj +++ b/tone/tone.csproj @@ -36,32 +36,34 @@ - + - + - + - - - + + + + +