From fae67aee04277b0b0a928f14569c314b18a94589 Mon Sep 17 00:00:00 2001 From: jwvanderbeck Date: Tue, 24 Jan 2017 18:35:09 -0800 Subject: [PATCH] FIX: Only apply 3D operations if metadata exists --- couchpotato/core/plugins/renamer.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/couchpotato/core/plugins/renamer.py b/couchpotato/core/plugins/renamer.py index a5f8314..8e8f25b 100755 --- a/couchpotato/core/plugins/renamer.py +++ b/couchpotato/core/plugins/renamer.py @@ -353,9 +353,14 @@ class Renamer(Plugin): if replacements['mpaa_only'] not in ('G', 'PG', 'PG-13', 'R', 'NC-17'): replacements['mpaa_only'] = 'Not Rated' - replacements['3d_type_short'] = replacements['3d_type_short'].replace('Half ', 'H').replace('Full ', '') - if self.conf('use_tab_threed') and 'OU' in replacements['3d_type']: - replacements['3d_type'] = replacements['3d_type'].replace('OU','TAB') + if replacements['3d_type_short']: + replacements['3d_type_short'] = replacements['3d_type_short'].replace('Half ', 'H').replace('Full ', '') + if self.conf('use_tab_threed') and replacements['3d_type']: + if 'OU' in replacements['3d_type']: + replacements['3d_type'] = replacements['3d_type'].replace('OU','TAB') + if self.conf('use_tab_threed') and replacements['3d_type_short']: + if 'OU' in replacements['3d_type_short']: + replacements['3d_type_short'] = replacements['3d_type_short'].replace('OU','TAB') for file_type in group['files']: