Remove expose full path
This commit is contained in:
@@ -19,7 +19,6 @@ type ConfigInterface interface {
|
|||||||
GetNetworkBufferSize() int
|
GetNetworkBufferSize() int
|
||||||
EnableRetainFolderNameExtension() bool
|
EnableRetainFolderNameExtension() bool
|
||||||
EnableRetainRDTorrentName() bool
|
EnableRetainRDTorrentName() bool
|
||||||
ShouldExposeFullPath() bool
|
|
||||||
ShouldIgnoreRenames() bool
|
ShouldIgnoreRenames() bool
|
||||||
ShouldServeFromRclone() bool
|
ShouldServeFromRclone() bool
|
||||||
ShouldVerifyDownloadLink() bool
|
ShouldVerifyDownloadLink() bool
|
||||||
@@ -48,7 +47,6 @@ type ZurgConfig struct {
|
|||||||
IgnoreRenames bool `yaml:"ignore_renames" json:"ignore_renames"`
|
IgnoreRenames bool `yaml:"ignore_renames" json:"ignore_renames"`
|
||||||
RetainRDTorrentName bool `yaml:"retain_rd_torrent_name" json:"retain_rd_torrent_name"`
|
RetainRDTorrentName bool `yaml:"retain_rd_torrent_name" json:"retain_rd_torrent_name"`
|
||||||
RetainFolderNameExtension bool `yaml:"retain_folder_name_extension" json:"retain_folder_name_extension"`
|
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"`
|
CanRepair bool `yaml:"enable_repair" json:"enable_repair"`
|
||||||
DeleteRarFiles bool `yaml:"auto_delete_rar_torrents" json:"auto_delete_rar_torrents"`
|
DeleteRarFiles bool `yaml:"auto_delete_rar_torrents" json:"auto_delete_rar_torrents"`
|
||||||
@@ -144,10 +142,6 @@ func (z *ZurgConfig) EnableRetainRDTorrentName() bool {
|
|||||||
return z.RetainRDTorrentName
|
return z.RetainRDTorrentName
|
||||||
}
|
}
|
||||||
|
|
||||||
func (z *ZurgConfig) ShouldExposeFullPath() bool {
|
|
||||||
return z.ExposeFullPath
|
|
||||||
}
|
|
||||||
|
|
||||||
func (z *ZurgConfig) ShouldIgnoreRenames() bool {
|
func (z *ZurgConfig) ShouldIgnoreRenames() bool {
|
||||||
return !z.IgnoreRenames
|
return !z.IgnoreRenames
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,11 +10,12 @@ import (
|
|||||||
// fixers are commands that will be run on the next refresh
|
// 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 are stored in a file so that they can be run on startup
|
||||||
// they follow the format of:
|
// they follow the format of:
|
||||||
// <id_trigger>: <command> <id>
|
// key: <id_trigger> value: <command>
|
||||||
// id_trigger = this means a specific torrent id's completion
|
// id_trigger: this means a specific torrent id's completion
|
||||||
// commands: delete | repair
|
// commands: delete | repair
|
||||||
|
|
||||||
func (t *TorrentManager) fixerAddCommand(trigger, command string) {
|
func (t *TorrentManager) fixerAddCommand(trigger, command string) {
|
||||||
|
t.log.Debugf("Adding fixer command: %s %s", trigger, command)
|
||||||
t.fixers.Set(trigger, command)
|
t.fixers.Set(trigger, command)
|
||||||
t.writeFixersToFile()
|
t.writeFixersToFile()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,11 +115,6 @@ func (t *TorrentManager) GetPath(file *File) string {
|
|||||||
if !t.Config.ShouldIgnoreRenames() && file.Rename != "" {
|
if !t.Config.ShouldIgnoreRenames() && file.Rename != "" {
|
||||||
return 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)
|
filename := filepath.Base(file.Path)
|
||||||
return filename
|
return filename
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user