diff --git a/transcoder/src/extract.go b/transcoder/src/extract.go index 2fd3e479..20498a74 100644 --- a/transcoder/src/extract.go +++ b/transcoder/src/extract.go @@ -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) diff --git a/transcoder/src/info.go b/transcoder/src/info.go index 69bb6aff..32da587a 100644 --- a/transcoder/src/info.go +++ b/transcoder/src/info.go @@ -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 } diff --git a/transcoder/src/metadata.go b/transcoder/src/metadata.go index 0729a56e..254fdc14 100644 --- a/transcoder/src/metadata.go +++ b/transcoder/src/metadata.go @@ -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 }