diff --git a/pandora/app/config.py b/pandora/app/config.py index 909df83e8..212770fbc 100644 --- a/pandora/app/config.py +++ b/pandora/app/config.py @@ -46,6 +46,8 @@ def load_config(): settings.SERVER_EMAIL = config['site']['email']['system'] config['site']['videoprefix'] = settings.VIDEO_PREFIX config['site']['version'] = get_version() + if not 'folderdepth' in config['site']: + config['site']['folderdepth'] = settings.USE_IMDB and 4 or 3 config['keys'] = {} for key in config['itemKeys']: diff --git a/pandora/archive/tasks.py b/pandora/archive/tasks.py index 71cad8ec1..692e3a558 100644 --- a/pandora/archive/tasks.py +++ b/pandora/archive/tasks.py @@ -74,10 +74,7 @@ def update_files(user, volume, files): user = models.User.objects.get(username=user) volume, created = models.Volume.objects.get_or_create(user=user, name=volume) all_files = [] - #ignore extras etc, - #imdb stlye is L/Last, First/Title (Year)/Title.. 4 - #otherwise T/Title (Year)/Title... 3 - folder_depth = settings.USE_IMDB and 4 or 3 + folder_depth = settings.CONFIG['site']['folderdepth'] for f in files: if len(f['path'].split('/')) == folder_depth: all_files.append(f['oshash'])