Use basename as title if empty when scraping by fragment (#3040)

* Fallback to file basename if title empty in scrape
* Populate dialog from basename if title empty
This commit is contained in:
WithoutPants
2022-10-24 14:36:22 +11:00
committed by GitHub
parent 091950615e
commit 47395ce13f
3 changed files with 11 additions and 4 deletions

View File

@@ -2,6 +2,7 @@ package models
import (
"context"
"path/filepath"
"strconv"
"time"
@@ -128,7 +129,7 @@ func (g Gallery) GetTitle() string {
return g.Title
}
return g.Path
return filepath.Base(g.Path)
}
// DisplayName returns a display name for the scene for logging purposes.