mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Remove unused
This commit is contained in:
		
							parent
							
								
									12c6f2e9a5
								
							
						
					
					
						commit
						5e8678f1cc
					
				@ -177,9 +177,6 @@ class LibraryItem {
 | 
				
			|||||||
  get hasAudioFiles() {
 | 
					  get hasAudioFiles() {
 | 
				
			||||||
    return this.libraryFiles.some((lf) => lf.fileType === 'audio')
 | 
					    return this.libraryFiles.some((lf) => lf.fileType === 'audio')
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  get hasMediaEntities() {
 | 
					 | 
				
			||||||
    return this.media.hasMediaEntities
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Data comes from scandir library item data
 | 
					  // Data comes from scandir library item data
 | 
				
			||||||
  // TODO: Remove this function. Only used when creating a new podcast now
 | 
					  // TODO: Remove this function. Only used when creating a new podcast now
 | 
				
			||||||
 | 
				
			|||||||
@ -100,9 +100,6 @@ class Book {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    return total
 | 
					    return total
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  get hasMediaEntities() {
 | 
					 | 
				
			||||||
    return !!this.tracks.length || this.ebookFile
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  get includedAudioFiles() {
 | 
					  get includedAudioFiles() {
 | 
				
			||||||
    return this.audioFiles.filter((af) => !af.exclude)
 | 
					    return this.audioFiles.filter((af) => !af.exclude)
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
@ -129,8 +126,6 @@ class Book {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  update(payload) {
 | 
					  update(payload) {
 | 
				
			||||||
    const json = this.toJSON()
 | 
					    const json = this.toJSON()
 | 
				
			||||||
    delete json.audiobooks // do not update media entities here
 | 
					 | 
				
			||||||
    delete json.ebooks
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    let hasUpdates = false
 | 
					    let hasUpdates = false
 | 
				
			||||||
    for (const key in json) {
 | 
					    for (const key in json) {
 | 
				
			||||||
 | 
				
			|||||||
@ -124,9 +124,6 @@ class Podcast {
 | 
				
			|||||||
    this.episodes.forEach((ep) => (total += ep.size))
 | 
					    this.episodes.forEach((ep) => (total += ep.size))
 | 
				
			||||||
    return total
 | 
					    return total
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  get hasMediaEntities() {
 | 
					 | 
				
			||||||
    return !!this.episodes.length
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  get duration() {
 | 
					  get duration() {
 | 
				
			||||||
    let total = 0
 | 
					    let total = 0
 | 
				
			||||||
    this.episodes.forEach((ep) => (total += ep.duration))
 | 
					    this.episodes.forEach((ep) => (total += ep.duration))
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user