|
@ -112,7 +112,7 @@ class Renamer(Plugin): |
|
|
return |
|
|
return |
|
|
|
|
|
|
|
|
if not base_folder: |
|
|
if not base_folder: |
|
|
base_folder = self.conf('from') |
|
|
base_folder = sp(self.conf('from')) |
|
|
|
|
|
|
|
|
from_folder = sp(self.conf('from')) |
|
|
from_folder = sp(self.conf('from')) |
|
|
to_folder = sp(self.conf('to')) |
|
|
to_folder = sp(self.conf('to')) |
|
@ -315,6 +315,7 @@ class Renamer(Plugin): |
|
|
'cd_nr': '', |
|
|
'cd_nr': '', |
|
|
'mpaa': media['info'].get('mpaa', ''), |
|
|
'mpaa': media['info'].get('mpaa', ''), |
|
|
'category': category_label, |
|
|
'category': category_label, |
|
|
|
|
|
'3d': '3D' if group['meta_data']['quality'].get('is_3d', 0) else '', |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
for file_type in group['files']: |
|
|
for file_type in group['files']: |
|
@ -824,7 +825,7 @@ Remove it if you want it to be renamed (again, or at least let it try again) |
|
|
def replaceDoubles(self, string): |
|
|
def replaceDoubles(self, string): |
|
|
|
|
|
|
|
|
replaces = [ |
|
|
replaces = [ |
|
|
('\.+', '.'), ('_+', '_'), ('-+', '-'), ('\s+', ' '), |
|
|
('\.+', '.'), ('_+', '_'), ('-+', '-'), ('\s+', ' '), (' \\\\', '\\\\'), (' /', '/'), |
|
|
('(\s\.)+', '.'), ('(-\.)+', '.'), ('(\s-)+', '-'), |
|
|
('(\s\.)+', '.'), ('(-\.)+', '.'), ('(\s-)+', '-'), |
|
|
] |
|
|
] |
|
|
|
|
|
|
|
@ -1056,6 +1057,7 @@ Remove it if you want it to be renamed (again, or at least let it try again) |
|
|
release_download.update({ |
|
|
release_download.update({ |
|
|
'imdb_id': getIdentifier(media), |
|
|
'imdb_id': getIdentifier(media), |
|
|
'quality': rls['quality'], |
|
|
'quality': rls['quality'], |
|
|
|
|
|
'is_3d': rls['is_3d'], |
|
|
'protocol': rls.get('info', {}).get('protocol') or rls.get('info', {}).get('type'), |
|
|
'protocol': rls.get('info', {}).get('protocol') or rls.get('info', {}).get('type'), |
|
|
'release_id': rls['_id'], |
|
|
'release_id': rls['_id'], |
|
|
}) |
|
|
}) |
|
@ -1195,6 +1197,7 @@ rename_options = { |
|
|
'first': 'First letter (M)', |
|
|
'first': 'First letter (M)', |
|
|
'quality': 'Quality (720p)', |
|
|
'quality': 'Quality (720p)', |
|
|
'quality_type': '(HD) or (SD)', |
|
|
'quality_type': '(HD) or (SD)', |
|
|
|
|
|
'3d': '3D', |
|
|
'video': 'Video (x264)', |
|
|
'video': 'Video (x264)', |
|
|
'audio': 'Audio (DTS)', |
|
|
'audio': 'Audio (DTS)', |
|
|
'group': 'Releasegroup name', |
|
|
'group': 'Releasegroup name', |
|
|