Skip to content

Commit

Permalink
Fix upload file name
Browse files Browse the repository at this point in the history
  • Loading branch information
seanavery committed Sep 4, 2024
1 parent df64d71 commit 94f4c19
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cam/concater.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,10 @@ func (c *concater) concat(from, to time.Time, metadata string) (string, error) {
// output format context to write the concatenated video data to a new file.
var outputFilename string
fromStr := formatDateTimeToString(from)
toStr := formatDateTimeToString(to)
if metadata == "" {
outputFilename = fmt.Sprintf("%s_%s_%s.%s", c.camName, fromStr, toStr, defaultVideoFormat)
outputFilename = fmt.Sprintf("%s_%s.%s", c.camName, fromStr, defaultVideoFormat)
} else {
outputFilename = fmt.Sprintf("%s_%s_%s_%s.%s", c.camName, fromStr, toStr, metadata, defaultVideoFormat)
outputFilename = fmt.Sprintf("%s_%s_%s.%s", c.camName, fromStr, metadata, defaultVideoFormat)
}
outputPath := filepath.Join(c.uploadPath, outputFilename)
c.logger.Debug("outputPath", outputPath)
Expand Down

0 comments on commit 94f4c19

Please sign in to comment.