处理无法播放的问题

处理无法播放的问题
This commit is contained in:
truewhile
2026-08-24 21:06:44 +08:00
parent 97d162569d
commit 43fdfe8202
19 changed files with 168 additions and 107 deletions
+3 -3
View File
@@ -26,9 +26,9 @@ func statsUserHandler(svc *service.Container) gin.HandlerFunc {
_ = svc.Repo.DB.Model(&model.PlaybackHistory{}).
Where("user_id = ?", uid).Count(&total).Error
c.JSON(http.StatusOK, gin.H{
"user_id": uid,
"watched_ms": watched,
"plays": total,
"user_id": uid,
"watched_ms": watched,
"plays": total,
"watched_hours": float64(watched) / 1000.0 / 3600.0,
})
}