fix a bug that would keep some subtitle files from being renamed
This commit is contained in:
parent
52433b9493
commit
df003c2b87
2 changed files with 4 additions and 4 deletions
|
@ -143,7 +143,7 @@ def organize():
|
||||||
if not file['item'] in files_by_item:
|
if not file['item'] in files_by_item:
|
||||||
files_by_item[file['item']] = []
|
files_by_item[file['item']] = []
|
||||||
files_by_item[file['item']].append(file)
|
files_by_item[file['item']].append(file)
|
||||||
|
|
||||||
for item in sorted(files_by_item):
|
for item in sorted(files_by_item):
|
||||||
item_files = files_by_item[item]
|
item_files = files_by_item[item]
|
||||||
# missing video, missing subtitles, multiple versions
|
# 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])]
|
rename = [paths for paths in rename if not re.search(regexp, paths[1])]
|
||||||
# remove '.en'
|
# remove '.en'
|
||||||
rename += [[
|
rename += [[
|
||||||
file['path'], re.sub(regexp, '', file['path'])
|
file['path'], re.sub(regexp, '', file[path_key[file['path']]])
|
||||||
] for file in version['files'] if re.search(regexp, file['path'])]
|
] for file in version['files'] if re.search(regexp, file[path_key[file['path']]])]
|
||||||
for paths in rename:
|
for paths in rename:
|
||||||
issues['%s filenames' % (
|
issues['%s filenames' % (
|
||||||
'incorrect' if path_key[paths[0]] == 'correctedPath' else 'non-canonical'
|
'incorrect' if path_key[paths[0]] == 'correctedPath' else 'non-canonical'
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
"url": "https://0xdb.org/api/",
|
"url": "https://0xdb.org/api/",
|
||||||
"username": "",
|
"username": "",
|
||||||
"volumes": {
|
"volumes": {
|
||||||
"cinema": "/Volumes/rolux/Movies/Cinema/"
|
"cinema": "/Users/rolux/Movies/Cinema/"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue