hotfix
This commit is contained in:
@@ -117,7 +117,7 @@ func New(dc config.Debrid, client types.Client) *Cache {
|
|||||||
}
|
}
|
||||||
return &Cache{
|
return &Cache{
|
||||||
dir: filepath.Join(cfg.Path, "cache", dc.Name), // path to save cache files
|
dir: filepath.Join(cfg.Path, "cache", dc.Name), // path to save cache files
|
||||||
torrents: xsync.NewMapOf[string, *CachedTorrent](),
|
torrents: xsync.NewMapOf[string, string](),
|
||||||
torrentsNames: xsync.NewMapOf[string, *CachedTorrent](),
|
torrentsNames: xsync.NewMapOf[string, *CachedTorrent](),
|
||||||
invalidDownloadLinks: xsync.NewMapOf[string, string](),
|
invalidDownloadLinks: xsync.NewMapOf[string, string](),
|
||||||
client: client,
|
client: client,
|
||||||
@@ -644,11 +644,12 @@ func (c *Cache) deleteTorrent(id string, removeFromDebrid bool) bool {
|
|||||||
}
|
}
|
||||||
}() // defer delete from debrid
|
}() // defer delete from debrid
|
||||||
|
|
||||||
if t, ok := c.torrentsNames.Load(torrentName); ok {
|
if t, ok := c.torrentsNames.Load(torrentName); ok && t.Id == id {
|
||||||
newFiles := map[string]types.File{}
|
newFiles := map[string]types.File{}
|
||||||
newId := t.Id
|
newId := t.Id
|
||||||
for _, file := range t.Files {
|
for _, file := range t.Files {
|
||||||
if file.TorrentId != "" && file.TorrentId != id {
|
if file.TorrentId != "" && file.TorrentId != id {
|
||||||
|
newId = file.TorrentId
|
||||||
newFiles[file.Name] = file
|
newFiles[file.Name] = file
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -221,7 +221,10 @@ func (ui *Handler) handleUpdateConfig(w http.ResponseWriter, r *http.Request) {
|
|||||||
if len(updatedConfig.Debrids) > 0 {
|
if len(updatedConfig.Debrids) > 0 {
|
||||||
currentConfig.Debrids = updatedConfig.Debrids
|
currentConfig.Debrids = updatedConfig.Debrids
|
||||||
// Clear legacy single debrid if using array
|
// Clear legacy single debrid if using array
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(updatedConfig.Arrs) > 0 {
|
||||||
|
currentConfig.Arrs = updatedConfig.Arrs
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update Arrs through the service
|
// Update Arrs through the service
|
||||||
|
|||||||
@@ -221,7 +221,7 @@
|
|||||||
<div class="setup-step d-none" id="step4">
|
<div class="setup-step d-none" id="step4">
|
||||||
<div class="section mb-5">
|
<div class="section mb-5">
|
||||||
<div id="arrConfigs"></div>
|
<div id="arrConfigs"></div>
|
||||||
<div class="mb-3">
|
<div class="mb-3 d-none">
|
||||||
<button type="button" id="addArrBtn" class="btn btn-secondary">
|
<button type="button" id="addArrBtn" class="btn btn-secondary">
|
||||||
<i class="bi bi-plus"></i> Add New Arr
|
<i class="bi bi-plus"></i> Add New Arr
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user