on-demand transcoding with concurrency limit

This commit is contained in:
Carl Pearson
2024-10-18 15:21:33 -06:00
parent da720508b1
commit 459e899efe
9 changed files with 241 additions and 134 deletions

View File

@@ -1,6 +1,10 @@
package playlists
import "gorm.io/gorm"
import (
"ytdlp-site/database"
"gorm.io/gorm"
)
type Status string
@@ -21,6 +25,7 @@ const (
StatusFailed Status = "failed"
)
func SetStatus(db *gorm.DB, id uint, status Status) error {
func SetStatus(id uint, status Status) error {
db := database.Get()
return db.Model(&Playlist{}).Where("id = ?", id).Update("status", status).Error
}