Example #1
0
def track_rip(tracknumber, outfile, ripper, logfile):
    cmd = ripper['format'] % {
        'binary': ripper['binary'],
        'options': ripper['options'],
        'tracknumber': int(tracknumber),
        'outfile': outfile,
    }
    return command_run(cmd, logfile)
Example #2
0
def track_enc(infile, outfile, encoder, logfile):
    cmd = encoder['format'] % {
        'binary': encoder['binary'],
        'options': encoder['options'],
        'infile': infile,
        'outfile': outfile,
    }
    result = command_run(cmd, logfile)

    #remove input
    if encoder['need_input_remove']:
        os.remove(infile)

    return result