mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-11-04 03:17:00 -05:00 
			
		
		
		
	Fix startedAt in progress API
If no progress had been set before, setting `startedAt` did not work and it would always been set to `finishedAt` or `Date.now()`. Settings this if any progress had already been recorded did work. This fixes the problem so that setting `startedAt` it properly works in both cases.
This commit is contained in:
		
							parent
							
								
									6af5ac2be1
								
							
						
					
					
						commit
						45434b16e0
					
				@ -68,7 +68,7 @@ class MediaProgress {
 | 
			
		||||
      this.finishedAt = progress.finishedAt || Date.now()
 | 
			
		||||
      this.progress = 1
 | 
			
		||||
    }
 | 
			
		||||
    this.startedAt = this.finishedAt || Date.now()
 | 
			
		||||
    this.startedAt = progress.startedAt || this.finishedAt || Date.now()
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  update(payload) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user