From 5ce8327053dabb7c2b0d59e7e7dbc2529b58905b Mon Sep 17 00:00:00 2001 From: Ben Sarmiento Date: Tue, 30 Jan 2024 02:50:37 +0100 Subject: [PATCH] Remove expose full path --- internal/config/types.go | 6 ------ internal/torrent/fixer.go | 5 +++-- internal/torrent/manager.go | 5 ----- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/internal/config/types.go b/internal/config/types.go index d86de7d..65724a0 100644 --- a/internal/config/types.go +++ b/internal/config/types.go @@ -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 } diff --git a/internal/torrent/fixer.go b/internal/torrent/fixer.go index a0ce0f8..811f16e 100644 --- a/internal/torrent/fixer.go +++ b/internal/torrent/fixer.go @@ -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 = this means a specific torrent id's completion +// key: value: +// 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() } diff --git a/internal/torrent/manager.go b/internal/torrent/manager.go index 6a607eb..f8bbe9b 100644 --- a/internal/torrent/manager.go +++ b/internal/torrent/manager.go @@ -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 }