[server] Remove objectNonce from video preview

This commit is contained in:
Neeraj Gupta 2024-10-01 21:32:43 +05:30
parent 56b8728e79
commit 1bf8f2749e
3 changed files with 5 additions and 7 deletions

View File

@ -98,6 +98,8 @@ type Row struct {
Size int64
LatestBucket string
ObjectID *string
// For HLS video object, there's no object nonce, all relevant data
// is stored in the metadata object that primarily contains the playlist.
ObjectNonce *string
ReplicatedBuckets []string
DeleteFromBuckets []string

View File

@ -16,8 +16,5 @@ func (r VidPreviewRequest) Validate() error {
if r.Playlist == "" || r.PlayListNonce == "" {
return ente.NewBadRequestWithMessage("playlist and playListNonce are required for preview video")
}
if r.ObjectNonce == "" {
return ente.NewBadRequestWithMessage("objectNonce is required for preview video")
}
return nil
}

View File

@ -53,7 +53,6 @@ func (c *Controller) InsertVideoPreview(ctx *gin.Context, req *filedata.VidPrevi
Size: size + req.ObjectSize,
LatestBucket: bucketID,
ObjectID: &req.ObjectID,
ObjectNonce: &req.ObjectNonce,
}
dbInsertErr := c.Repo.InsertOrUpdatePreviewData(context.Background(), row)