more post process dn titles

This commit is contained in:
nikk gitanes
2021-08-17 07:46:45 +03:00
parent ca29bdea4e
commit 7515d6bd01

View File

@@ -92,6 +92,8 @@ func addTorrent(req torrReqJS, c *gin.Context) {
if tor.Title == "" {
tor.Title = torrSpec.DisplayName // prefer dn over name
tor.Title = strings.ReplaceAll(tor.Title, "rutor.info", "")
tor.Title = strings.ReplaceAll(tor.Title, "_", " ")
tor.Title = strings.Trim(tor.Title, " ")
if tor.Title == "" {
tor.Title = tor.Name()
}