mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Fix:Listening stats on users page and user listening-sessions api endpoint
This commit is contained in:
		
							parent
							
								
									d8df9a9dff
								
							
						
					
					
						commit
						54663f0f01
					
				| @ -22,6 +22,7 @@ | ||||
|       <div class="w-full h-px bg-white bg-opacity-10 my-2" /> | ||||
|       <div class="py-2"> | ||||
|         <h1 class="text-lg mb-2 text-white text-opacity-90 px-2 sm:px-0">Listening Stats</h1> | ||||
|         <p class="text-sm text-gray-300">{{ listeningSessions.length }} Listening Sessions</p> | ||||
|         <p class="text-sm text-gray-300"> | ||||
|           Total Time Listened:  | ||||
|           <span class="font-mono text-base">{{ listeningTimePretty }}</span> | ||||
| @ -33,7 +34,9 @@ | ||||
| 
 | ||||
|         <div v-if="latestSession" class="mt-4"> | ||||
|           <h1 class="text-lg mb-2 text-white text-opacity-90 px-2 sm:px-0">Last Listening Session</h1> | ||||
|           <p class="text-sm text-gray-300">{{ latestSession.audiobookTitle }} {{ $dateDistanceFromNow(latestSession.lastUpdate) }} for {{ $elapsedPrettyExtended(this.latestSession.timeListening) }}</p> | ||||
|           <p class="text-sm text-gray-300"> | ||||
|             <strong>{{ latestSession.displayTitle }}</strong> {{ $dateDistanceFromNow(latestSession.updatedAt) }} for  <span class="font-mono text-base">{{ $elapsedPrettyExtended(this.latestSession.timeListening) }}</span> | ||||
|           </p> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div class="w-full h-px bg-white bg-opacity-10 my-2" /> | ||||
|  | ||||
| @ -109,7 +109,7 @@ class ApiRouter { | ||||
|     this.router.patch('/users/:id', UserController.update.bind(this)) | ||||
|     this.router.delete('/users/:id', UserController.delete.bind(this)) | ||||
| 
 | ||||
|     this.router.get('/users/:id/listening-sessions', UserController.getListeningStats.bind(this)) | ||||
|     this.router.get('/users/:id/listening-sessions', UserController.getListeningSessions.bind(this)) | ||||
|     this.router.get('/users/:id/listening-stats', UserController.getListeningStats.bind(this)) | ||||
| 
 | ||||
|     //
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user