Set filenames properly
This commit is contained in:
@@ -110,9 +110,11 @@ func (t *TorrentManager) GetKey(torrent *Torrent) string {
|
||||
func (t *TorrentManager) GetPath(file *File) string {
|
||||
if t.Config.ShouldExposeFullPath() {
|
||||
filename := strings.TrimPrefix(file.Path, "/")
|
||||
return strings.ReplaceAll(filename, "/", " - ")
|
||||
filename = strings.ReplaceAll(filename, "/", " - ")
|
||||
return filename
|
||||
}
|
||||
return filepath.Base(file.Path)
|
||||
filename := filepath.Base(file.Path)
|
||||
return filename
|
||||
}
|
||||
|
||||
func (t *TorrentManager) writeTorrentToFile(instanceID string, torrent *Torrent) {
|
||||
|
||||
Reference in New Issue
Block a user