Added def remove

Allows renamer to request deletion of failed downloads
This commit is contained in:
clinton-hall
2012-09-26 16:46:10 +09:30
parent 3a3a4fb1f3
commit ba36c738c7
+4
View File
@@ -24,6 +24,7 @@ class Downloader(Plugin):
def __init__(self):
addEvent('download', self.download)
addEvent('download.status', self.getDownloadStatus)
addEvent('download.remove', self.remove)
def download(self, data = {}, movie = {}, manual = False, filedata = None):
pass
@@ -31,6 +32,9 @@ class Downloader(Plugin):
def getDownloadStatus(self, data = {}, movie = {}):
return False
def remove(self, name = {}, nzo_id = {}):
return False
def createNzbName(self, data, movie):
tag = self.cpTag(movie)
return '%s%s' % (toSafeString(data.get('name')[:127 - len(tag)]), tag)