mirror of
https://github.com/rwinkhart/flac2pod.git
synced 2026-08-28 04:46:37 -04:00
Simplified argument parser
This commit is contained in:
+2
-5
@@ -45,7 +45,7 @@ def scan_destination_convert_mp3():
|
||||
("'", "\\'").replace(')', '\\)').replace('(', '\\(').replace('&', '\\&').replace\
|
||||
('`', '\\`').replace('$', '\\$') + '.mp3'
|
||||
print(f"\n\u001b[38;5;0;48;5;15mConverting {_file_s} to {_file_d}...\u001b[0m\n")
|
||||
if argument.__contains__('-s'):
|
||||
if '-s' in arguments:
|
||||
system(f"ffmpeg -i {_file_s} -map 0:a -ab 320k -map_metadata 0 -id3v2_version 3 {_file_d}")
|
||||
else:
|
||||
system(f"ffmpeg -i {_file_s} -c:v copy -ab 320k -map_metadata 0 -id3v2_version 3 {_file_d}")
|
||||
@@ -70,10 +70,7 @@ def strip_txxx_tags(_file):
|
||||
# program start sequence
|
||||
|
||||
# retrieve typed argument
|
||||
argument_list = argv
|
||||
i, argument = 0, ''
|
||||
for user_argument in argument_list:
|
||||
argument += user_argument
|
||||
arguments = argv
|
||||
|
||||
source = input('Source parent directory: ')
|
||||
if source.endswith('/'):
|
||||
|
||||
Reference in New Issue
Block a user