mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Improve handling of moved and added video files (#4598)
* If old file path is not in library, treat as move * Use existing phash if file with same oshash exists
This commit is contained in:
@@ -19,14 +19,17 @@ import (
|
||||
)
|
||||
|
||||
func useAsVideo(pathname string) bool {
|
||||
if instance.Config.IsCreateImageClipsFromVideos() && config.StashConfigs.GetStashFromDirPath(instance.Config.GetStashPaths(), pathname).ExcludeVideo {
|
||||
stash := config.StashConfigs.GetStashFromDirPath(instance.Config.GetStashPaths(), pathname)
|
||||
|
||||
if instance.Config.IsCreateImageClipsFromVideos() && stash != nil && stash.ExcludeVideo {
|
||||
return false
|
||||
}
|
||||
return isVideo(pathname)
|
||||
}
|
||||
|
||||
func useAsImage(pathname string) bool {
|
||||
if instance.Config.IsCreateImageClipsFromVideos() && config.StashConfigs.GetStashFromDirPath(instance.Config.GetStashPaths(), pathname).ExcludeVideo {
|
||||
stash := config.StashConfigs.GetStashFromDirPath(instance.Config.GetStashPaths(), pathname)
|
||||
if instance.Config.IsCreateImageClipsFromVideos() && stash != nil && stash.ExcludeVideo {
|
||||
return isImage(pathname) || isVideo(pathname)
|
||||
}
|
||||
return isImage(pathname)
|
||||
|
||||
Reference in New Issue
Block a user