mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Make title from file metadata optional
This commit is contained in:
@@ -89,7 +89,7 @@ func parse(filePath string, probeJSON *FFProbeJSON) (*VideoFile, error) {
|
||||
|
||||
if result.Title == "" {
|
||||
// default title to filename
|
||||
result.Title = filepath.Base(result.Path)
|
||||
result.SetTitleFromPath()
|
||||
}
|
||||
|
||||
result.Comment = probeJSON.Format.Tags.Comment
|
||||
@@ -161,3 +161,7 @@ func (v *VideoFile) getStreamIndex(fileType string, probeJSON FFProbeJSON) int {
|
||||
|
||||
return -1
|
||||
}
|
||||
|
||||
func (v *VideoFile) SetTitleFromPath() {
|
||||
v.Title = filepath.Base(v.Path)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user