Remove expose full path

This commit is contained in:
Ben Sarmiento
2024-01-30 02:50:37 +01:00
parent 108607b4dd
commit 5ce8327053
3 changed files with 3 additions and 13 deletions

View File

@@ -19,7 +19,6 @@ type ConfigInterface interface {
GetNetworkBufferSize() int
EnableRetainFolderNameExtension() bool
EnableRetainRDTorrentName() bool
ShouldExposeFullPath() bool
ShouldIgnoreRenames() bool
ShouldServeFromRclone() bool
ShouldVerifyDownloadLink() bool
@@ -48,7 +47,6 @@ type ZurgConfig struct {
IgnoreRenames bool `yaml:"ignore_renames" json:"ignore_renames"`
RetainRDTorrentName bool `yaml:"retain_rd_torrent_name" json:"retain_rd_torrent_name"`
RetainFolderNameExtension bool `yaml:"retain_folder_name_extension" json:"retain_folder_name_extension"`
ExposeFullPath bool `yaml:"expose_full_path" json:"expose_full_path"`
CanRepair bool `yaml:"enable_repair" json:"enable_repair"`
DeleteRarFiles bool `yaml:"auto_delete_rar_torrents" json:"auto_delete_rar_torrents"`
@@ -144,10 +142,6 @@ func (z *ZurgConfig) EnableRetainRDTorrentName() bool {
return z.RetainRDTorrentName
}
func (z *ZurgConfig) ShouldExposeFullPath() bool {
return z.ExposeFullPath
}
func (z *ZurgConfig) ShouldIgnoreRenames() bool {
return !z.IgnoreRenames
}

View File

@@ -10,11 +10,12 @@ import (
// fixers are commands that will be run on the next refresh
// they are stored in a file so that they can be run on startup
// they follow the format of:
// <id_trigger>: <command> <id>
// id_trigger = this means a specific torrent id's completion
// key: <id_trigger> value: <command>
// id_trigger: this means a specific torrent id's completion
// commands: delete | repair
func (t *TorrentManager) fixerAddCommand(trigger, command string) {
t.log.Debugf("Adding fixer command: %s %s", trigger, command)
t.fixers.Set(trigger, command)
t.writeFixersToFile()
}

View File

@@ -115,11 +115,6 @@ func (t *TorrentManager) GetPath(file *File) string {
if !t.Config.ShouldIgnoreRenames() && file.Rename != "" {
return file.Rename
}
if t.Config.ShouldExposeFullPath() {
filename := strings.TrimPrefix(file.Path, "/")
filename = strings.ReplaceAll(filename, "/", " - ")
return filename
}
filename := filepath.Base(file.Path)
return filename
}