Skip to content

Commit

Permalink
bumped dependencies
Browse files Browse the repository at this point in the history
fix: toneJson and dump command
  • Loading branch information
sandreas committed Jul 16, 2022
1 parent 5e92b89 commit 7756a6c
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 8 deletions.
3 changes: 2 additions & 1 deletion tone.Tests/tone.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="Moq.AutoMock" Version="3.1.0" />
<PackageReference Include="Sandreas.AudioMetadata" Version="0.0.3" />
<PackageReference Include="Sandreas.AudioMetadata" Version="0.0.4" />
<PackageReference Include="Sandreas.Files" Version="1.1.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
2 changes: 1 addition & 1 deletion tone/Metadata/ToneJsonAudio.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class ToneJsonAudio
public string FormatShort { get; set; }

public double SampleRate { get; set; }
public int Duration { get; set; }
public double Duration { get; set; }
public ChannelsArrangements.ChannelsArrangement ChannelsArrangement { get; set; }
public bool Vbr { get; set; }
}
1 change: 1 addition & 0 deletions tone/Metadata/ToneJsonMeta.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,5 @@ public class ToneJsonMeta: IMetadata
public IDictionary<string, string> AdditionalFields { get; } = new Dictionary<string, string>();
[JsonIgnore]
public IDictionary<string, string> MappedAdditionalFields => new Dictionary<string, string>();

}
2 changes: 1 addition & 1 deletion tone/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
Converters = new List<JsonConverter>
{ new StringEnumConverter { NamingStrategy = new CamelCaseNamingStrategy() } },
Formatting = Formatting.Indented,
DefaultValueHandling = DefaultValueHandling.Ignore
DefaultValueHandling = DefaultValueHandling.Ignore,
});
services.AddSingleton<FfmetadataSerializer>();
services.AddSingleton<SpectreConsoleSerializer>();
Expand Down
6 changes: 3 additions & 3 deletions tone/Serializers/ToneJsonSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ public class ToneJsonSerializer : IMetadataSerializer
{
private readonly ToneJsonMeta _toneJsonMeta;
private readonly JsonSerializerSettings _settings;
private readonly IFileSystem _fs;
private readonly FileSystem _fs;

public ToneJsonSerializer(IFileSystem fs, ToneJsonMeta toneJsonMeta, JsonSerializerSettings settings)
public ToneJsonSerializer(FileSystem fs, ToneJsonMeta toneJsonMeta, JsonSerializerSettings settings)
{
_fs = fs;
_toneJsonMeta = toneJsonMeta;
Expand All @@ -37,7 +37,7 @@ public async Task<string> SerializeAsync(IMetadata metadata)
FormatShort = track.AudioFormat.ShortName,
Bitrate = track.Bitrate,
SampleRate = track.SampleRate,
Duration = track.TotalDuration.Milliseconds,
Duration = track.TotalDuration.TotalMilliseconds,
ChannelsArrangement = track.ChannelsArrangement,
Vbr = track.IsVBR
};
Expand Down
35 changes: 35 additions & 0 deletions tone/doc/release/release-notes-v0.0.7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Release Notes

## Fixed

- `RecordingDate` now works as expected and not be limited to year only
- `Description` now works in iTunes

Thanks to @Zeugma440 for his efforts to fix [atldotnet 155]

## Changed

- Extracted `Sandreas.AudioMetadata` library to keep the code small, clean and reusable

## Added

- Apache`LICENSE` document
- `tone.json` format now contains `file` and `audio` container when using `dump` command

## known issues

The following issues are known, part of an external library and already reported:

- flag options (e.g. `--dry-run`) cannot be followed by arguments (e.g. `tone tag --meta-album="album" --dry-run input.mp3`) ([spectre.console 825])
- workaround: append flag options at the end (`tone tag --meta-album="album" input.mp3 --dry-run`)
- `--meta-*` options cannot be set to empty values ([spectre.console 842])
- workaround: use `--meta-remove-property` instead
- Value starting with `-` is mistreated as extra option (e.g. `--meta-description "-5 degrees"`) ([spectre.console 890])
- workaround: use `--meta-description="-5 degrees"` instead (with `=`)
- Invalid handling of parameter values starting with double quotes ("), e.g. `--meta-description'"quoted" value'` ([spectre.console 891])

[spectre.console 825]: https://github.com/spectreconsole/spectre.console/issues/825
[spectre.console 842]: https://github.com/spectreconsole/spectre.console/issues/842
[spectre.console 890]: https://github.com/spectreconsole/spectre.console/issues/890
[spectre.console 891]: https://github.com/spectreconsole/spectre.console/issues/891
[atldotnet 155]: https://github.com/Zeugma440/atldotnet/issues/155
6 changes: 4 additions & 2 deletions tone/tone.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="6.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Sandreas.AudioMetadata" Version="0.0.3" />
<PackageReference Include="Sandreas.AudioMetadata" Version="0.0.4" />
<PackageReference Include="Sandreas.Files" Version="1.1.1" />
<PackageReference Include="Spectre.Console" Version="0.44.0" />
<PackageReference Include="System.IO.Abstractions" Version="16.1.5" />
<PackageReference Include="System.IO.Abstractions" Version="17.0.23" />
<PackageReference Include="z440.atl.core" Version="4.9.0" />
</ItemGroup>


Expand Down

0 comments on commit 7756a6c

Please sign in to comment.