mirror of
https://github.com/simon-ding/polaris.git
synced 2026-03-09 19:20:46 +08:00
fix: naming suggestion
This commit is contained in:
@@ -79,7 +79,7 @@ func (s *Server) SuggestedSeriesFolderName(c *gin.Context) (interface{}, error)
|
||||
//remove extra characters
|
||||
re := regexp.MustCompile(`[^\p{L}\w\s]`)
|
||||
name = re.ReplaceAllString(strings.ToLower(name), " ")
|
||||
|
||||
name = strings.Join(strings.Fields(name), " ")
|
||||
year := strings.Split(d.FirstAirDate, "-")[0]
|
||||
if year != "" {
|
||||
name = fmt.Sprintf("%s (%s)", name, year)
|
||||
@@ -112,7 +112,7 @@ func (s *Server) SuggestedMovieFolderName(c *gin.Context) (interface{}, error) {
|
||||
//remove extra characters
|
||||
re := regexp.MustCompile(`[^\p{L}\w\s]`)
|
||||
name = re.ReplaceAllString(strings.ToLower(name), " ")
|
||||
|
||||
name = strings.Join(strings.Fields(name), " ")
|
||||
year := strings.Split(d1.ReleaseDate, "-")[0]
|
||||
if year != "" {
|
||||
name = fmt.Sprintf("%s (%s)", name, year)
|
||||
|
||||
Reference in New Issue
Block a user