Strip the video filename extension from the default title
This commit is contained in:
parent
89d7d71cc5
commit
9af98b0382
2 changed files with 93 additions and 93 deletions
184
app/rice-box.go
184
app/rice-box.go
File diff suppressed because one or more lines are too long
|
@ -61,7 +61,7 @@ func ParseVideo(p *Path, name string) (*Video, error) {
|
||||||
title := m.Title()
|
title := m.Title()
|
||||||
// Default title is filename
|
// Default title is filename
|
||||||
if title == "" {
|
if title == "" {
|
||||||
title = name
|
title = strings.TrimSuffix(name, filepath.Ext(name))
|
||||||
}
|
}
|
||||||
v := &Video{
|
v := &Video{
|
||||||
ID: id,
|
ID: id,
|
||||||
|
|
Loading…
Reference in a new issue