|
@ -141,11 +141,16 @@ class Renamer(Plugin): |
|
|
cat_list = fireEvent('category.all', single = True) or [] |
|
|
cat_list = fireEvent('category.all', single = True) or [] |
|
|
no_process.extend([item['destination'] for item in cat_list]) |
|
|
no_process.extend([item['destination'] for item in cat_list]) |
|
|
|
|
|
|
|
|
# Check to see if the no_process folders are inside the "from" folder. |
|
|
# Don't continue if from-folder doesn't exist |
|
|
if not os.path.isdir(base_folder) or not os.path.isdir(to_folder): |
|
|
if not os.path.isdir(base_folder): |
|
|
log.error('Both the "To" and "From" folder have to exist.') |
|
|
log.error('The from folder "%s" doesn\'t exist. Please create it.', base_folder) |
|
|
|
|
|
return |
|
|
|
|
|
# Don't continue if to-folder doesn't exist |
|
|
|
|
|
elif not os.path.isdir(to_folder): |
|
|
|
|
|
log.error('The to folder "%s" doesn\'t exist. Please create it.', to_folder) |
|
|
return |
|
|
return |
|
|
else: |
|
|
else: |
|
|
|
|
|
# Check to see if the no_process folders are inside the "from" folder. |
|
|
for item in no_process: |
|
|
for item in no_process: |
|
|
if isSubFolder(item, base_folder): |
|
|
if isSubFolder(item, base_folder): |
|
|
log.error('To protect your data, the media libraries can\'t be inside of or the same as the "from" folder. "%s" in "%s"', (item, base_folder)) |
|
|
log.error('To protect your data, the media libraries can\'t be inside of or the same as the "from" folder. "%s" in "%s"', (item, base_folder)) |
|
|