mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-01-05 03:30:37 -05:00
Remove some transcoder's deprecated fields
This commit is contained in:
parent
2a66dc8608
commit
5660164947
@ -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)
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user