X-Git-Url: https://diplodocus.org/git/flac-archive/blobdiff_plain/05ccb9e6302c84c623781de8345dfd3d607ff9c8..d8b1024f3b57a8619fa0e07029e9205e760a84d7:/fa-flacd diff --git a/fa-flacd b/fa-flacd index 59e9c26..d00496f 100755 --- a/fa-flacd +++ b/fa-flacd @@ -106,6 +106,8 @@ def run_flac(infile, cue, outfile, tags): for i in tags: argv.extend(['-T', i]) argv.append(infile) + # flac 1.1.3 PICTURE support + argv.extend(['--picture', '3|image/jpeg|||cover.front']) spew('Running flac\n') status = os.spawnvp(os.P_WAIT, argv[0], argv) @@ -190,8 +192,10 @@ def flac(dir, artist, album, discnum, tracknum, track_tags, disc_artist, tags): # Clean up if we're the last job for dir; for multi-file dirs, # it's possible for more than one job to run cleanup at once, so # don't fail if things are already clean. - if os.listdir(dir) == ['using-tags']: + ld = os.listdir(dir) + if ld == ['using-tags'] or sorted(ld) == ['cover.front', 'using-tags']: try: + os.unlink(dir + '/cover.front') os.unlink(dir + '/using-tags') os.rmdir(dir) except EnvironmentError: