Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions EpubCore.Cli/EpubCore.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
<PackageOutputPath>../nupkg</PackageOutputPath>
<Title>EpubCore.Cli</Title>
<Description>EpubCore Cli</Description>
<Copyright>Copyright 2023</Copyright>
<Copyright>Copyright 2025</Copyright>
<PackageProjectUrl>https://github.com/domingoladron/EpubCore</PackageProjectUrl>
<RepositoryUrl>https://github.com/domingoladron/EpubCore</RepositoryUrl>
<Version>0.9.2.0</Version>
<Version>0.9.3.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions EpubCore/EpubCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
<Authors>Chris Laine (domingoladron)</Authors>
<PackageTags>epub epubs book books 2.0 3.0 3.1</PackageTags>
<PackageId>EpubCore</PackageId>
<Version>1.6.1.0</Version>
<Version>1.6.2.0</Version>
<Description>A library for reading and writing EPUB files.</Description>
<PackageProjectUrl>https://github.com/domingoladron/EpubCore</PackageProjectUrl>
<Copyright>Copyright 2023</Copyright>
<AssemblyVersion>1.6.1.0</AssemblyVersion>
<FileVersion>1.6.1.0</FileVersion>
<Copyright>Copyright 2025</Copyright>
<AssemblyVersion>1.6.2.0</AssemblyVersion>
<FileVersion>1.6.2.0</FileVersion>
<RepositoryUrl>https://github.com/domingoladron/EpubCore</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageReleaseNotes>Adding logic to handle x-application font mime types</PackageReleaseNotes>
<PackageReleaseNotes>Fixing bug where too many Epub.Chapters generated</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseExpression>MPL-2.0</PackageLicenseExpression>
<Summary></Summary>
Expand Down
7 changes: 6 additions & 1 deletion EpubCore/EpubReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,12 @@ private static List<EpubChapter> LoadChaptersFromNav(string navAbsolutePath, XEl
{
chapter.SubChapters = LoadChaptersFromNav(navAbsolutePath, li, bookResources, chapter);
}
result.Add(chapter);

// If we don't already have a chapter with this absolute path, then add it. Otherwise, ignore it.
if (result.FirstOrDefault(x => x.AbsolutePath.Equals(chapter.AbsolutePath)) == null)
{
result.Add(chapter);
}

previous = chapter.SubChapters.Any() ? chapter.SubChapters.Last() : chapter;
}
Expand Down
Loading