installSoftware

This commit is contained in:
Geoffrey Frogeye 2019-10-24 19:35:00 +02:00
parent 10f8511294
commit 1b104be690
4 changed files with 677 additions and 294 deletions

View file

@ -71,6 +71,8 @@ if len(sys.argv) >= 3:
show_name = sys.argv[2]
else:
show_name = os.path.split(os.path.realpath(os.path.curdir))[1]
if '(' in show_name:
show_name = show_name.split('(')[0].strip()
search = tv.search(show_name)
@ -180,6 +182,9 @@ for association in associations:
if a_basename == basename:
old_path = os.path.join(root, a_filename)
new_path = os.path.join(root, new_name + a_ext)
if old_path == new_path:
continue
print(old_path, "->", new_path)
if not dryrun:
os.rename(old_path, new_path)