From a1e6418d666f325ac0b78bf973fed1b79b27e903 Mon Sep 17 00:00:00 2001 From: jwvanderbeck Date: Sun, 22 Jan 2017 11:38:50 -0800 Subject: [PATCH] Add 3d_type_short and TAB option for Kodi compatability Kodi requires the use of TAB instead of OU and only supports compact naming (HSBS instead of Half SBS), so allow for Renamer plugin to use these formats. --- couchpotato/core/plugins/renamer.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/couchpotato/core/plugins/renamer.py b/couchpotato/core/plugins/renamer.py index 6780c0e..a5f8314 100755 --- a/couchpotato/core/plugins/renamer.py +++ b/couchpotato/core/plugins/renamer.py @@ -347,11 +347,17 @@ class Renamer(Plugin): 'category': category_label, '3d': '3D' if group['meta_data']['quality'].get('is_3d', 0) else '', '3d_type': group['meta_data'].get('3d_type'), + '3d_type_short': group['meta_data'].get('3d_type'), } 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') + + for file_type in group['files']: # Move nfo depending on settings @@ -1298,6 +1304,7 @@ rename_options = { 'quality_type': '(HD) or (SD)', '3d': '3D', '3d_type': '3D Type (Full SBS)', + '3d_type_short' : 'Short 3D Type (FSBS)', 'video': 'Video (x264)', 'audio': 'Audio (DTS)', 'group': 'Releasegroup name', @@ -1360,6 +1367,14 @@ config = [{ }, { 'advanced': True, + 'name': 'use_tab_threed', + 'type': 'bool', + 'label': 'Use TAB 3D', + 'description': ('Use TAB (Top And Bottom) instead of OU (Over Under).','This will allow Kodi to recognize vertical formatted 3D movies properly.'), + 'default': True + }, + { + 'advanced': True, 'name': 'replace_doubles', 'type': 'bool', 'label': 'Clean Name',