mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-14 19:34:57 +02:00
feat: parse language from NFO metadata source
This commit is contained in:
parent
37ad1cced2
commit
9a697f48db
3 changed files with 18 additions and 0 deletions
|
@ -103,6 +103,16 @@ describe('parseNfoMetadata', () => {
|
|||
expect(result.asin).to.equal('B08X5JZJLH')
|
||||
})
|
||||
|
||||
it('parses language', () => {
|
||||
const nfoText = 'Language: eng'
|
||||
const result = parseNfoMetadata(nfoText)
|
||||
expect(result.language).to.equal('eng')
|
||||
|
||||
const nfoText2 = 'lang: deu'
|
||||
const result2 = parseNfoMetadata(nfoText2)
|
||||
expect(result2.language).to.equal('deu')
|
||||
})
|
||||
|
||||
it('parses description', () => {
|
||||
const nfoText = 'Book Description\n=========\nThis is a book.\n It\'s good'
|
||||
const result = parseNfoMetadata(nfoText)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue