Rename variables for easy reference

This commit is contained in:
Ben Adrian Sarmiento
2024-07-21 02:11:32 +02:00
parent 47751320f7
commit f8b9f8955b
8 changed files with 46 additions and 33 deletions

View File

@@ -22,8 +22,8 @@ func (t *TorrentManager) CheckDeletedStatus(torrent *Torrent) bool {
}
func (t *TorrentManager) Delete(accessKey string, deleteInRD bool) {
allTorrents, _ := t.DirectoryMap.Get(INT_ALL)
if torrent, ok := allTorrents.Get(accessKey); ok {
torrents, _ := t.DirectoryMap.Get(INT_ALL)
if torrent, ok := torrents.Get(accessKey); ok {
if deleteInRD {
torrent.DownloadedIDs.Clone().Each(func(torrentID string) bool {
t.DeleteByID(torrentID)
@@ -40,7 +40,7 @@ func (t *TorrentManager) Delete(accessKey string, deleteInRD bool) {
torrents.Remove(accessKey)
})
allTorrents.Remove(accessKey)
torrents.Remove(accessKey)
}
func (t *TorrentManager) DeleteByID(torrentID string) {