|
@ -119,7 +119,7 @@ class Renamer(Plugin): |
|
|
db = get_session() |
|
|
db = get_session() |
|
|
|
|
|
|
|
|
# Get the download info stored in the downloaded release |
|
|
# Get the download info stored in the downloaded release |
|
|
download_info = getDownloadInfo(download_id = download_id, downloader = downloader) |
|
|
download_info = self.getDownloadInfo(download_id = download_id, downloader = downloader) |
|
|
|
|
|
|
|
|
groups = fireEvent('scanner.scan', folder = folder if folder else self.conf('from'), |
|
|
groups = fireEvent('scanner.scan', folder = folder if folder else self.conf('from'), |
|
|
files = files, download_info = download_info, return_ignored = False, single = True) |
|
|
files = files, download_info = download_info, return_ignored = False, single = True) |
|
@ -355,7 +355,7 @@ class Renamer(Plugin): |
|
|
else: |
|
|
else: |
|
|
log.info('Better quality release already exists for %s, with quality %s', (movie.library.titles[0].title, release.quality.label)) |
|
|
log.info('Better quality release already exists for %s, with quality %s', (movie.library.titles[0].title, release.quality.label)) |
|
|
|
|
|
|
|
|
# Add _EXISTS_ to the parent dir |
|
|
# Add exists tag to the .ignore file |
|
|
self.tagDir(group, 'exists') |
|
|
self.tagDir(group, 'exists') |
|
|
|
|
|
|
|
|
# Notify on rename fail |
|
|
# Notify on rename fail |
|
@ -376,7 +376,8 @@ class Renamer(Plugin): |
|
|
db.commit() |
|
|
db.commit() |
|
|
|
|
|
|
|
|
# Remove leftover files |
|
|
# Remove leftover files |
|
|
if self.conf('cleanup') and not self.conf('move_leftover') and remove_leftovers: |
|
|
if self.conf('cleanup') and not self.conf('move_leftover') and remove_leftovers and \ |
|
|
|
|
|
not (self.conf('file_action') != 'move' and download_info and download_info.get('is_torrent')): |
|
|
log.debug('Removing leftover files') |
|
|
log.debug('Removing leftover files') |
|
|
for current_file in group['files']['leftover']: |
|
|
for current_file in group['files']['leftover']: |
|
|
remove_files.append(current_file) |
|
|
remove_files.append(current_file) |
|
@ -676,7 +677,7 @@ Remove it if you want it to be renamed (again, or at least let it try again) |
|
|
|
|
|
|
|
|
return True |
|
|
return True |
|
|
|
|
|
|
|
|
def getDownloadInfo(self, download_id, downloader): |
|
|
def getDownloadInfo(self, download_id, downloader): |
|
|
|
|
|
|
|
|
rls = None |
|
|
rls = None |
|
|
download_info = None |
|
|
download_info = None |
|
|