Remove some transcoder's deprecated fields

This commit is contained in:
Zoe Roux 2025-07-19 19:13:49 +02:00
parent 2a66dc8608
commit 5660164947
No known key found for this signature in database
3 changed files with 0 additions and 16 deletions

View File

@ -75,9 +75,6 @@ func (s *MetadataService) extractSubs(ctx context.Context, info *MediaInfo) (err
return nil
}
// Create a temporary directory for writing attachments
// TODO if the transcoder ever uses the ffmpeg library directly, remove this
// and write directly to storage via stream instead
tempWorkingDirectory := filepath.Join(os.TempDir(), info.Sha)
if err := os.MkdirAll(tempWorkingDirectory, 0660); err != nil {
return fmt.Errorf("failed to create temporary directory: %w", err)

View File

@ -44,9 +44,6 @@ type MediaInfo struct {
/// Version of the metadata. This can be used to invalidate older metadata from db if the extraction code has changed.
Versions Versions `json:"versions"`
// TODO: remove on next major
Video Video `json:"video"`
/// The list of videos if there are multiples.
Videos []Video `json:"videos"`
/// The list of audio tracks.
@ -104,9 +101,6 @@ type Audio struct {
/// Keyframes of this video
Keyframes *Keyframe `json:"-"`
//TODO: remove this in next major
IsForced bool `json:"isForced"`
}
type Subtitle struct {
@ -332,8 +326,5 @@ func RetriveMediaInfo(path string, sha string) (*MediaInfo, error) {
ret.MimeCodec = &container
}
}
if len(ret.Videos) > 0 {
ret.Video = ret.Videos[0]
}
return &ret, nil
}

View File

@ -282,10 +282,6 @@ func (s *MetadataService) getMetadata(path string, sha string) (*MediaInfo, erro
}
ret.Chapters = append(ret.Chapters, c)
}
if len(ret.Videos) > 0 {
ret.Video = ret.Videos[0]
}
return &ret, nil
}