mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Narrator data is sucessfully saved from folder name.
This commit is contained in:
		
							parent
							
								
									efdb43e2d2
								
							
						
					
					
						commit
						23904d57ad
					
				@ -194,7 +194,7 @@ class BookMetadata {
 | 
			
		||||
  setData(scanMediaData = {}) {
 | 
			
		||||
    this.title = scanMediaData.title || null
 | 
			
		||||
    this.subtitle = scanMediaData.subtitle || null
 | 
			
		||||
    this.narrators = []
 | 
			
		||||
    this.narrators = this.parseNarratorsTag(scanMediaData.narrators)
 | 
			
		||||
    this.publishedYear = scanMediaData.publishedYear || null
 | 
			
		||||
    this.description = scanMediaData.description || null
 | 
			
		||||
    this.isbn = scanMediaData.isbn || null
 | 
			
		||||
 | 
			
		||||
@ -215,6 +215,9 @@ function getBookDataFromDir(folderPath, relPath, parseSubtitle = false) {
 | 
			
		||||
  // Audio files will always be in the directory named for the title
 | 
			
		||||
  var [title, narrators] = getTitleAndNarrator(splitDir.pop())
 | 
			
		||||
 | 
			
		||||
  const parseNameString = require('./parseNameString')
 | 
			
		||||
  console.log(`\n\n\n${JSON.stringify(parseNameString.parse(narrators), 0, 2)}\n\n\n`)
 | 
			
		||||
 | 
			
		||||
  var series = null
 | 
			
		||||
  var author = null
 | 
			
		||||
  // If there are at least 2 more directories, next furthest will be the series
 | 
			
		||||
@ -294,6 +297,7 @@ function getBookDataFromDir(folderPath, relPath, parseSubtitle = false) {
 | 
			
		||||
      series,
 | 
			
		||||
      sequence: volumeNumber,
 | 
			
		||||
      publishedYear,
 | 
			
		||||
      narrators,
 | 
			
		||||
    },
 | 
			
		||||
    relPath: relPath, // relative audiobook path i.e. /Author Name/Book Name/..
 | 
			
		||||
    path: Path.posix.join(folderPath, relPath) // i.e. /audiobook/Author Name/Book Name/..
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user