|
|
@@ -76,6 +76,12 @@ def gen_title_action(fpath, action): |
|
|
|
|
|
|
|
return { 'src': fpath, 'action': action, 'medianame': mname } |
|
|
|
|
|
|
|
def get_simple_rename_action(): |
|
|
|
if 'BOOTY_SIMPLE_RENAME_ACTION' in os.environ: |
|
|
|
return os.environ['BOOTY_SIMPLE_RENAME_ACTION'] |
|
|
|
else: |
|
|
|
return cfg['simpleaction'] |
|
|
|
|
|
|
|
# Now go over all of the input files and figure out what to do with them. |
|
|
|
sources = [] |
|
|
|
rarregex = re.compile('\\.r[0-9][0-9]') |
|
|
@@ -85,7 +91,7 @@ for f in os.listdir(os.getcwd()): |
|
|
|
|
|
|
|
name, ext = os.path.splitext(f) |
|
|
|
if ext in video_exts: |
|
|
|
sources.append(gen_title_action(f, cfg['simpleaction'])) |
|
|
|
sources.append(gen_title_action(f, get_simple_rename_action())) |
|
|
|
elif ext == '.rar': |
|
|
|
|
|
|
|
# RARs are a little more complicated to handle. |