[Enhancement]: Append tags from OPF file #363

Closed
opened 2026-04-24 23:06:04 +02:00 by adam · 6 comments
Owner

Originally created by @plague-doctor on GitHub (May 18, 2022).

Describe the feature/enhancement

As audiobookshelf supports Tags, can we please add tags from OPF file?

I work on a scraper to generate OPF file for my audiobooks collection. I would love to be able to add the tags from opf automatically.

An example of my metadata.opf file looks like that:

<?xml version='1.0' encoding='utf-8'?>
<ns0:package xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ns0="http://www.idpf.org/2007/opf" version="2.0">
	<ns0:metadata>
		<dc:title>Narrenturm</dc:title>
		<dc:creator ns0:role="aut">Andrzej Sapkowski</dc:creator>
		<dc:creator ns0:role="nrt">zespół lektorów</dc:creator>
		<dc:date />
		<dc:publisher />
		<dc:identifier ns0:scheme="ISBN" />
		<dc:description>
Świat nie zginął i nie spłonął. Przynajmniej nie cały. 
Ale i tak było wesoło. 
[...] 
Przed nami jeszcze dwa tomy trylogii. </dc:description>
		<dc:language>pol</dc:language>
		<ns0:meta name="calibre:series" content="Trylogia husycka" />
		<ns0:meta name="calibre:series_index" content="1" />
		<dc:subject>fantasy</dc:subject>
		<dc:subject>science fiction</dc:subject>
		<dc:tag>Nagroda Zajdla - zwycięzca</dc:tag>
		<dc:tag>Husyci</dc:tag>
		<dc:tag>Reynewen</dc:tag>
		<dc:tag>czarna magia</dc:tag>
		<dc:tag>biała magia</dc:tag>
		<dc:tag>Śląsk</dc:tag>
	</ns0:metadata>
</ns0:package>
Originally created by @plague-doctor on GitHub (May 18, 2022). ### Describe the feature/enhancement As audiobookshelf supports Tags, can we please add tags from OPF file? I work on a scraper to generate OPF file for my audiobooks collection. I would love to be able to add the tags from opf automatically. An example of my `metadata.opf` file looks like that: ``` <?xml version='1.0' encoding='utf-8'?> <ns0:package xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ns0="http://www.idpf.org/2007/opf" version="2.0"> <ns0:metadata> <dc:title>Narrenturm</dc:title> <dc:creator ns0:role="aut">Andrzej Sapkowski</dc:creator> <dc:creator ns0:role="nrt">zespół lektorów</dc:creator> <dc:date /> <dc:publisher /> <dc:identifier ns0:scheme="ISBN" /> <dc:description> Świat nie zginął i nie spłonął. Przynajmniej nie cały. Ale i tak było wesoło. [...] Przed nami jeszcze dwa tomy trylogii. </dc:description> <dc:language>pol</dc:language> <ns0:meta name="calibre:series" content="Trylogia husycka" /> <ns0:meta name="calibre:series_index" content="1" /> <dc:subject>fantasy</dc:subject> <dc:subject>science fiction</dc:subject> <dc:tag>Nagroda Zajdla - zwycięzca</dc:tag> <dc:tag>Husyci</dc:tag> <dc:tag>Reynewen</dc:tag> <dc:tag>czarna magia</dc:tag> <dc:tag>biała magia</dc:tag> <dc:tag>Śląsk</dc:tag> </ns0:metadata> </ns0:package> ```
adam added the enhancement label 2026-04-24 23:06:04 +02:00
adam closed this issue 2026-04-24 23:06:04 +02:00
Author
Owner

@advplyr commented on GitHub (May 19, 2022):

I also had to check for the ns0 prefix you are using since this wasn't supported before. Same as genres it will only set the tags if they are empty or if you have "prefer OPF metadata" toggled on.
opf-tags

@advplyr commented on GitHub (May 19, 2022): I also had to check for the `ns0` prefix you are using since this wasn't supported before. Same as genres it will only set the tags if they are empty or if you have "prefer OPF metadata" toggled on. ![opf-tags](https://user-images.githubusercontent.com/67830747/169177193-68ac6abe-e498-4079-be34-59ec7156e458.gif)
Author
Owner

@advplyr commented on GitHub (May 20, 2022):

This is in v2.0.15

@advplyr commented on GitHub (May 20, 2022): This is in [v2.0.15](https://github.com/advplyr/audiobookshelf/releases/tag/v2.0.15)
Author
Owner

@neingeist commented on GitHub (Sep 14, 2022):

great feature, thanks!

@neingeist commented on GitHub (Sep 14, 2022): great feature, thanks!
Author
Owner

@mariohi commented on GitHub (Oct 9, 2023):

@plague-doctor any chance you could share the code for scrapper? It looks like something I'm trying to achieve with lubimyczytac.pl

@mariohi commented on GitHub (Oct 9, 2023): @plague-doctor any chance you could share the code for scrapper? It looks like something I'm trying to achieve with lubimyczytac.pl
Author
Owner

@plague-doctor commented on GitHub (Oct 9, 2023):

Oh, being a systems admin, my code usually should be deposited to Sèvres as an example of how not to code, ever :-)
Also, lubimy czytać frequently changes the website which renders scrapers nonoperational. I started to use audioteka.com/pl as they are more friendly.
But if you want to take a bite, there is it: plague-doctor/scraper but as I have said above - prepare yourself to be greatly underwhelmed ;-)

@plague-doctor commented on GitHub (Oct 9, 2023): Oh, being a systems admin, my code usually should be deposited to Sèvres as an example of how not to code, ever :-) Also, lubimy czytać frequently changes the website which renders scrapers nonoperational. I started to use audioteka.com/pl as they are more friendly. But if you want to take a bite, there is it: `plague-doctor/scraper` but as I have said above - prepare yourself to be greatly underwhelmed ;-)
Author
Owner

@izikeros commented on GitHub (Jun 27, 2024):

Would be good to have a metadata provider either libumyczytac or audioteka. I have created feature request in issue #3105.

@izikeros commented on GitHub (Jun 27, 2024): Would be good to have a metadata provider either libumyczytac or audioteka. I have created feature request in issue #3105.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#363