[PR #3170] [MERGED] Parse book language from NFO metadata source #3890

Closed
opened 2026-04-25 00:17:27 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/3170
Author: @ajvgwu
Created: 7/17/2024
Status: Merged
Merged: 7/18/2024
Merged by: @advplyr

Base: masterHead: nfo-metadata-language


📝 Commits (3)

  • 9a697f4 feat: parse language from NFO metadata source
  • 71cd86f Merge branch 'advplyr:master' into nfo-metadata-language
  • 4289fe4 Update Nfo scanner and auto-formatting

📊 Changes

3 files changed (+29 additions, -11 deletions)

View changed files

📝 server/scanner/NfoFileScanner.js (+15 -11)
📝 server/utils/parsers/parseNfoMetadata.js (+4 -0)
📝 test/server/utils/parsers/parseNfoMetadata.test.js (+10 -0)

📄 Description

This is a relatively simple change for parsing metadata from an NFO file to include a "language:" (or "lang:") field.

I tried to find the right files to edit by looking at PR #2305.

My motivation is that it seems hit-or-miss to embed the language in some audio files (and/or to have these tags picked up by audiobookshelf). For example, using tone to embed the language into a MP3 file creates additional metadata fields "language=eng" and "LANG=eng", while doing the same for an AAC/M4A file creates "lang=eng". Then, when imported into audiobookshelf, the language field is properly set for the MP3 file, while the language field for the AAC file is empty.

This could be somewhat related to Issue #2924. It wouldn't help with the embedding part, but could help anyone who uses NFO files as a way of keeping the metadata in a sidecar file. It also wouldn't matter what audio format/container is used, since the NFO sidecar is a simple text file. I would basically use this as a way to fill in missing language info when tags from the audio file are not properly picked up for whatever reason.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/3170 **Author:** [@ajvgwu](https://github.com/ajvgwu) **Created:** 7/17/2024 **Status:** ✅ Merged **Merged:** 7/18/2024 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `nfo-metadata-language` --- ### 📝 Commits (3) - [`9a697f4`](https://github.com/advplyr/audiobookshelf/commit/9a697f48db605aebd9df8595553889c8237ae44a) feat: parse language from NFO metadata source - [`71cd86f`](https://github.com/advplyr/audiobookshelf/commit/71cd86fdd505f33085dcc237fac1c43210b1c58c) Merge branch 'advplyr:master' into nfo-metadata-language - [`4289fe4`](https://github.com/advplyr/audiobookshelf/commit/4289fe499013ce7a906624e3245d3d9fcc83da8c) Update Nfo scanner and auto-formatting ### 📊 Changes **3 files changed** (+29 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `server/scanner/NfoFileScanner.js` (+15 -11) 📝 `server/utils/parsers/parseNfoMetadata.js` (+4 -0) 📝 `test/server/utils/parsers/parseNfoMetadata.test.js` (+10 -0) </details> ### 📄 Description This is a relatively simple change for parsing metadata from an NFO file to include a "language:" (or "lang:") field. I tried to find the right files to edit by looking at PR #2305. My motivation is that it seems hit-or-miss to embed the language in some audio files (and/or to have these tags picked up by audiobookshelf). For example, using `tone` to embed the language into a MP3 file creates additional metadata fields "language=eng" and "LANG=eng", while doing the same for an AAC/M4A file creates "lang=eng". Then, when imported into audiobookshelf, the language field is properly set for the MP3 file, while the language field for the AAC file is empty. This could be somewhat related to Issue #2924. It wouldn't help with the embedding part, but could help anyone who uses NFO files as a way of keeping the metadata in a sidecar file. It also wouldn't matter what audio format/container is used, since the NFO sidecar is a simple text file. I would basically use this as a way to fill in missing language info when tags from the audio file are not properly picked up for whatever reason. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:17:27 +02:00
adam closed this issue 2026-04-25 00:17:27 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#3890