mirror of
https://github.com/rwinkhart/flac2pod.git
synced 2026-09-06 00:57:14 -04:00
Trigger individual scanning on resolution errors
This commit is contained in:
@@ -42,8 +42,8 @@ if __name__ == "__main__":
|
|||||||
output = Popen(command, shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True)
|
output = Popen(command, shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True)
|
||||||
block = output.communicate()[0].strip() # blocks the program from proceeding until stdout is given
|
block = output.communicate()[0].strip() # blocks the program from proceeding until stdout is given
|
||||||
if output.returncode == 1:
|
if output.returncode == 1:
|
||||||
if block.decode('utf-8').__contains__('sample rate'):
|
if block.decode('utf-8').__contains__('sample') or block.decode('utf-8').__contains__('resolution of'):
|
||||||
print('Sample rate error, scanning tracks as individuals...')
|
print('Resolution/Sample Rate mismatch, scanning tracks as individuals...')
|
||||||
for song in listdir(album):
|
for song in listdir(album):
|
||||||
print(f"[{album}/{song}] Adding ReplayGain data...")
|
print(f"[{album}/{song}] Adding ReplayGain data...")
|
||||||
std_song = song.replace(' ', '\\ ').replace("'", "\\'").replace(')', '\\)')\
|
std_song = song.replace(' ', '\\ ').replace("'", "\\'").replace(')', '\\)')\
|
||||||
|
|||||||
Reference in New Issue
Block a user