Reimplement deletes and marking files as broken
This commit is contained in:
@@ -27,7 +27,6 @@ type TorrentManager struct {
|
||||
DownloadCache cmap.ConcurrentMap[string, *realdebrid.Download]
|
||||
DownloadMap cmap.ConcurrentMap[string, *realdebrid.Download]
|
||||
fixers cmap.ConcurrentMap[string, *Torrent]
|
||||
deleteOnceDone mapset.Set[string]
|
||||
allAccessKeys mapset.Set[string]
|
||||
latestState *LibraryState
|
||||
requiredVersion string
|
||||
@@ -56,7 +55,6 @@ func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid, w
|
||||
RefreshKillSwitch: make(chan struct{}, 1),
|
||||
RepairKillSwitch: make(chan struct{}, 1),
|
||||
fixers: cmap.New[*Torrent](),
|
||||
deleteOnceDone: mapset.NewSet[string](),
|
||||
allAccessKeys: mapset.NewSet[string](),
|
||||
latestState: &LibraryState{},
|
||||
requiredVersion: "0.9.3-hotfix.3",
|
||||
@@ -78,6 +76,7 @@ func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid, w
|
||||
|
||||
// proxy
|
||||
func (t *TorrentManager) UnrestrictUntilOk(link string) *realdebrid.Download {
|
||||
// check if it's a valid link
|
||||
if !strings.HasPrefix(link, "http") {
|
||||
return nil
|
||||
}
|
||||
@@ -114,6 +113,9 @@ func (t *TorrentManager) GetKey(torrent *Torrent) string {
|
||||
}
|
||||
|
||||
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, "/", " - ")
|
||||
|
||||
Reference in New Issue
Block a user