[Bug]: Series sequence is not pulled when parsing OPF metadata file #1651

Closed
opened 2026-04-24 23:53:17 +02:00 by adam · 1 comment
Owner

Originally created by @advplyr on GitHub (Jan 8, 2024).

Describe the issue

When parsing the following stripped down OPF file the series sequence is not pulled because it is not directly under the series name.
This is from the package document in an ebook file.

<?xml version='1.0' encoding='utf-8'?>
<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookId" version="2.0">
  <metadata xmlns:calibre="http://calibre.kovidgoyal.net/2009/metadata" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:opf="http://www.idpf.org/2007/opf" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <meta name="calibre:series" content="La Faucheuse"/>
    <meta name="calibre:title_sort" content="FAUCHEUSE 02 Thunderhead"/>
    <meta name="calibre:series_index" content="2.0"/>
  </metadata>
</package>

An adjustment in a recent PR to support multiple series broke this use-case. To support this if there is only 1 series listed then it should use the series_index no matter where it is.

Steps to reproduce the issue

  1. Create OPF file with XML above and place inside a new folder with an ebook
  2. Scan in the new book
  3. Observe a series with no sequence

Audiobookshelf version

v2.7.1

How are you running audiobookshelf?

Built from source

Originally created by @advplyr on GitHub (Jan 8, 2024). ### Describe the issue When parsing the following stripped down OPF file the series sequence is not pulled because it is not directly under the series name. This is from the package document in an ebook file. ```xml <?xml version='1.0' encoding='utf-8'?> <package xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookId" version="2.0"> <metadata xmlns:calibre="http://calibre.kovidgoyal.net/2009/metadata" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:opf="http://www.idpf.org/2007/opf" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <meta name="calibre:series" content="La Faucheuse"/> <meta name="calibre:title_sort" content="FAUCHEUSE 02 Thunderhead"/> <meta name="calibre:series_index" content="2.0"/> </metadata> </package> ``` An adjustment in a recent PR to support multiple series broke this use-case. To support this if there is only 1 series listed then it should use the series_index no matter where it is. ### Steps to reproduce the issue 1. Create OPF file with XML above and place inside a new folder with an ebook 2. Scan in the new book 3. Observe a series with no sequence ### Audiobookshelf version v2.7.1 ### How are you running audiobookshelf? Built from source
adam added the bug label 2026-04-24 23:53:17 +02:00
adam closed this issue 2026-04-24 23:53:18 +02:00
Author
Owner

@advplyr commented on GitHub (Feb 18, 2024):

Fixed in https://github.com/advplyr/audiobookshelf/releases/tag/v2.7.2

@advplyr commented on GitHub (Feb 18, 2024): Fixed in https://github.com/advplyr/audiobookshelf/releases/tag/v2.7.2
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1651