Skip to content

Commit

Permalink
Fix for multiple attachments (#11)
Browse files Browse the repository at this point in the history
* Fixed List AttachedFile

* 0.0.8

* .
  • Loading branch information
StefH authored Sep 14, 2021
1 parent f10e81f commit 662d361
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 43 deletions.
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>0.0.7</Version>
<Version>0.0.8</Version>
<Nullable>enable</Nullable>
<LangVersion>8.0</LangVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand All @@ -9,6 +9,6 @@
<RepositoryUrl>https://github.com/StefH/Matroska</RepositoryUrl>
<Authors>Stef Heyenrath</Authors>
<Copyright>Stef Heyenrath</Copyright>
<PackageReleaseNotes>ReleaseNotes.md</PackageReleaseNotes>
<PackageReleaseNotes>$([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/../../PackageReleaseNotes.txt"))</PackageReleaseNotes>
</PropertyGroup>
</Project>
7 changes: 7 additions & 0 deletions Generate-ReleaseNotes.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
rem https://github.com/StefH/GitHubReleaseNotes

SET version=0.0.8

GitHubReleaseNotes --output ReleaseNotes.md --skip-empty-releases --exclude-labels question invalid doc --version %version%

GitHubReleaseNotes --output PackageReleaseNotes.txt --skip-empty-releases --exclude-labels question invalid doc --template PackageReleaseNotes.template --version %version%
3 changes: 0 additions & 3 deletions GitHubReleaseNotes.txt

This file was deleted.

6 changes: 4 additions & 2 deletions Matroska Solution.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1B2BED7F-A089-4A26-999B-F0F96CCAD905}"
ProjectSection(SolutionItems) = preProject
Directory.Build.props = Directory.Build.props
GitHubReleaseNotes.txt = GitHubReleaseNotes.txt
Generate-ReleaseNotes.bat = Generate-ReleaseNotes.bat
PackageReleaseNotes.template = PackageReleaseNotes.template
PackageReleaseNotes.txt = PackageReleaseNotes.txt
README.md = README.md
ReleaseNotes.md = ReleaseNotes.md
EndProjectSection
Expand All @@ -27,7 +29,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{4B37A324
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Span.ReaderWriter.Tests", "tests\Span.ReaderWriter.Tests\Span.ReaderWriter.Tests.csproj", "{A41BA9F1-5F5E-42C5-90BA-D7C9091177A7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MatroskaDemuxer", "examples\MatroskaDemuxer\MatroskaDemuxer.csproj", "{924EF542-984A-4DB2-9597-1FAC00A6A618}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MatroskaDemuxer", "examples\MatroskaDemuxer\MatroskaDemuxer.csproj", "{924EF542-984A-4DB2-9597-1FAC00A6A618}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
6 changes: 6 additions & 0 deletions PackageReleaseNotes.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# {{releaseInfos.0.FriendlyName}} ({{formatDate releaseInfos.0.When "dd MMMM yyyy"}})
{{#each releaseInfos.0.issueInfos}}
- #{{Number}} {{Title}}{{#if Labels}} [{{join Labels ", "}}]{{/if}}
{{/each}}

The full release notes can be found here: https://github.com/StefH/Matroska/blob/main/ReleaseNotes.md
5 changes: 5 additions & 0 deletions PackageReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 0.0.7 (11 March 2021)
- #9 Remove signing from Matroska and Matroska.Muxer projects [enhancement]
- #8 A strongly-named assembly is required. (Exception from HRESULT: 0x80131044) [bug]

The full release notes can be found here: https://github.com/StefH/Matroska/blob/main/ReleaseNotes.md
46 changes: 23 additions & 23 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# 0.0.7 (11 March 2021)
- [#9](https://github.com/StefH/Matroska/pull/9) - Remove signing from Matroska and Matroska.Muxer projects [enhancement] contributed by [StefH](https://github.com/StefH)
- [#8](https://github.com/StefH/Matroska/issues/8) - A strongly-named assembly is required. (Exception from HRESULT: 0x80131044) [bug]

# 0.0.6 (19 January 2021)
- [#7](https://github.com/StefH/Matroska/pull/7) - Use Ebml.xml to generate classes + use Span.ReaderWriter version 0.0.3 contributed by [StefH](https://github.com/StefH)

# 0.0.5 (12 January 2021)
- [#5](https://github.com/StefH/Matroska/pull/5) - Generate models based on Matroska specification contributed by [StefH](https://github.com/StefH)
- [#6](https://github.com/StefH/Matroska/pull/6) - Use SpanReader + SpanWriter contributed by [StefH](https://github.com/StefH)

# 0.0.4 (07 January 2021)
- [#4](https://github.com/StefH/Matroska/pull/4) - Add Tags element + improve OggCRC32 contributed by [StefH](https://github.com/StefH)

# 0.0.3 (06 January 2021)
- [#3](https://github.com/StefH/Matroska/pull/3) - Replace System.Runtime.Caching by a Dictionary [enhancement] contributed by [StefH](https://github.com/StefH)

# 0.0.2 (06 January 2021)
- [#2](https://github.com/StefH/Matroska/pull/2) - Add more properties [enhancement] contributed by [StefH](https://github.com/StefH)

# 0.0.1 (05 January 2021)
- [#1](https://github.com/StefH/Matroska/pull/1) - Add OggOpus Demuxer [enhancement] contributed by [StefH](https://github.com/StefH)

# 0.0.7 (11 March 2021)
- [#9](https://github.com/StefH/Matroska/pull/9) - Remove signing from Matroska and Matroska.Muxer projects [enhancement] contributed by [StefH](https://github.com/StefH)
- [#8](https://github.com/StefH/Matroska/issues/8) - A strongly-named assembly is required. (Exception from HRESULT: 0x80131044) [bug]

# 0.0.6 (19 January 2021)
- [#7](https://github.com/StefH/Matroska/pull/7) - Use Ebml.xml to generate classes + use Span.ReaderWriter version 0.0.3 contributed by [StefH](https://github.com/StefH)

# 0.0.5 (12 January 2021)
- [#5](https://github.com/StefH/Matroska/pull/5) - Generate models based on Matroska specification contributed by [StefH](https://github.com/StefH)
- [#6](https://github.com/StefH/Matroska/pull/6) - Use SpanReader + SpanWriter contributed by [StefH](https://github.com/StefH)

# 0.0.4 (07 January 2021)
- [#4](https://github.com/StefH/Matroska/pull/4) - Add Tags element + improve OggCRC32 contributed by [StefH](https://github.com/StefH)

# 0.0.3 (06 January 2021)
- [#3](https://github.com/StefH/Matroska/pull/3) - Replace System.Runtime.Caching by a Dictionary [enhancement] contributed by [StefH](https://github.com/StefH)

# 0.0.2 (06 January 2021)
- [#2](https://github.com/StefH/Matroska/pull/2) - Add more properties [enhancement] contributed by [StefH](https://github.com/StefH)

# 0.0.1 (05 January 2021)
- [#1](https://github.com/StefH/Matroska/pull/1) - Add OggOpus Demuxer [enhancement] contributed by [StefH](https://github.com/StefH)

6 changes: 3 additions & 3 deletions src/Matroska/Models/MatroskaModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

//--------------------------------------------------------------------------------------------------------
// <auto-generated>
// This C# code class was auto-generated at 01/18/2021 13:56:18.
// This C# code class was auto-generated at 09/14/2021 10:24:30.
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
//
// Based on "https://github.com/ietf-wg-cellar/matroska-specification/blob/master/ebml_matroska.xml".
Expand Down Expand Up @@ -82,8 +82,8 @@ public sealed class Segment : BaseModel
[GeneratedCode("MatroskaModels.tt", "1.0.0.0")]
public sealed class Attachments : BaseModel
{
[MatroskaElementDescriptor(MatroskaSpecification.AttachedFile)]
public AttachedFile AttachedFile { get; set; } = null!;
[MatroskaElementDescriptor(MatroskaSpecification.AttachedFile, typeof(AttachedFile))]
public List<AttachedFile> AttachedFiles { get; set; } = null!;
}

[GeneratedCode("MatroskaModels.tt", "1.0.0.0")]
Expand Down
21 changes: 11 additions & 10 deletions src/Matroska/Models/MatroskaModels.tt
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,26 @@ namespace Matroska.Models
<#
var isList = new List<string>
{
{ "Cluster" },
{ "TrackEntry" },
{ "SimpleBlock" },
{ "AttachedFile" },
{ "Block" },
{ "BlockAdditional" },
{ "BlockGroup" },
{ "BlockVirtual" },
{ "EncryptedBlock" },
{ "Tag" },
{ "SimpleTag" },
{ "Target" },
{ "Cluster" },
{ "ContentCompression" },
{ "ContentEncoding" },
{ "CuetrackPosition" },
{ "CuePoint" },
{ "CueReference" },
{ "SignatureSlot" },
{ "CuetrackPosition" },
{ "EncryptedBlock" },
{ "SignatureElementList" },
{ "SignedElement" }
{ "SignatureSlot" },
{ "SignedElement" },
{ "SimpleBlock" },
{ "SimpleTag" },
{ "Tag" },
{ "Target" },
{ "TrackEntry" }
};

var elementsEbml = XElement.Load(Path.Combine(Path.GetDirectoryName(this.Host.TemplateFile), XmlFile)).Elements()
Expand Down

0 comments on commit 662d361

Please sign in to comment.