mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Prevent keyframes scan when value already exists in db
This commit is contained in:
parent
8d0e362951
commit
475813c42c
@ -83,6 +83,13 @@ type KeyframeKey struct {
|
||||
}
|
||||
|
||||
func (s *MetadataService) GetKeyframes(info *MediaInfo, isVideo bool, idx uint32) (*Keyframe, error) {
|
||||
if isVideo && info.Videos[idx].Keyframes != nil {
|
||||
return info.Videos[idx].Keyframes, nil
|
||||
}
|
||||
if !isVideo && info.Audios[idx].Keyframes != nil {
|
||||
return info.Audios[idx].Keyframes, nil
|
||||
}
|
||||
|
||||
get_running, set := s.keyframeLock.Start(KeyframeKey{
|
||||
Sha: info.Sha,
|
||||
IsVideo: isVideo,
|
||||
|
Loading…
x
Reference in New Issue
Block a user