Преглед изворни кода

Added support for overriding the simple-rename action via envvar.

master
treyzania пре 6 година
родитељ
комит
c436597b83
1 измењених фајлова са 7 додато и 1 уклоњено
  1. 7
    1
      booty.py

+ 7
- 1
booty.py Прегледај датотеку

@@ -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.

Loading…
Откажи
Сачувај