Rename variables for easy reference
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user