mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Fix:Parsing id3 tags case insensitive
This commit is contained in:
		
							parent
							
								
									936de68622
								
							
						
					
					
						commit
						e248b6d8d8
					
				@ -73,7 +73,8 @@ function tryGrabChannelLayout(stream) {
 | 
				
			|||||||
function tryGrabTags(stream, ...tags) {
 | 
					function tryGrabTags(stream, ...tags) {
 | 
				
			||||||
  if (!stream.tags) return null
 | 
					  if (!stream.tags) return null
 | 
				
			||||||
  for (let i = 0; i < tags.length; i++) {
 | 
					  for (let i = 0; i < tags.length; i++) {
 | 
				
			||||||
    const value = stream.tags[tags[i]] || stream.tags[tags[i].toUpperCase()]
 | 
					    const tagKey = Object.keys(stream.tags).find(t => t.toLowerCase() === tags[i].toLowerCase())
 | 
				
			||||||
 | 
					    const value = stream.tags[tagKey]
 | 
				
			||||||
    if (value && value.trim()) return value.trim()
 | 
					    if (value && value.trim()) return value.trim()
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  return null
 | 
					  return null
 | 
				
			||||||
@ -161,6 +162,7 @@ function parseTags(format, verbose) {
 | 
				
			|||||||
  if (verbose) {
 | 
					  if (verbose) {
 | 
				
			||||||
    Logger.debug('Tags', format.tags)
 | 
					    Logger.debug('Tags', format.tags)
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const tags = {
 | 
					  const tags = {
 | 
				
			||||||
    file_tag_encoder: tryGrabTags(format, 'encoder', 'tsse', 'tss'),
 | 
					    file_tag_encoder: tryGrabTags(format, 'encoder', 'tsse', 'tss'),
 | 
				
			||||||
    file_tag_encodedby: tryGrabTags(format, 'encoded_by', 'tenc', 'ten'),
 | 
					    file_tag_encodedby: tryGrabTags(format, 'encoded_by', 'tenc', 'ten'),
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user