fix a bug that would keep some subtitle files from being renamed

This commit is contained in:
rolux 2012-10-08 14:08:06 +02:00
parent 52433b9493
commit df003c2b87
2 changed files with 4 additions and 4 deletions

View file

@ -143,7 +143,7 @@ def organize():
if not file['item'] in files_by_item:
files_by_item[file['item']] = []
files_by_item[file['item']].append(file)
for item in sorted(files_by_item):
item_files = files_by_item[item]
# missing video, missing subtitles, multiple versions
@ -177,8 +177,8 @@ def organize():
rename = [paths for paths in rename if not re.search(regexp, paths[1])]
# remove '.en'
rename += [[
file['path'], re.sub(regexp, '', file['path'])
] for file in version['files'] if re.search(regexp, file['path'])]
file['path'], re.sub(regexp, '', file[path_key[file['path']]])
] for file in version['files'] if re.search(regexp, file[path_key[file['path']]])]
for paths in rename:
issues['%s filenames' % (
'incorrect' if path_key[paths[0]] == 'correctedPath' else 'non-canonical'

View file

@ -6,6 +6,6 @@
"url": "https://0xdb.org/api/",
"username": "",
"volumes": {
"cinema": "/Volumes/rolux/Movies/Cinema/"
"cinema": "/Users/rolux/Movies/Cinema/"
}
}