@@ -67,6 +67,7 @@ def get_sink_id(key):
6767 print ("{} Output-Directory: {}" .format (INFO , OUTPUT_DIR ))
6868 mute_recording = input ("\n {} Do you want to mute Spotify while recording? [YES / no] " .format (REQUEST )).lower () != "no"
6969 show_folder = input ("{} Should I open the folder after conversion? [YES / no] " .format (REQUEST )).lower () != "no"
70+ add_covers = input ("{} Should I add the cover arts to your tracks? [YES / no] " .format (REQUEST )).lower () != "no"
7071
7172 # initialize session-bus for Spotify and create the interface
7273 print ("\n " + "---- DEPENDENCIES " + "-" * (T_WIDTH - 18 ) + "\n " )
@@ -205,7 +206,7 @@ def get_sink_id(key):
205206 # the timestamps are too imprecise, therefore the next position is searched where silence starts / stops and then both values are compared
206207 slice_start = min (chunks_starts , key = lambda x : abs (x - timestamp_start ))
207208 slice_end = min (chunks_ends , key = lambda x : abs (x - timestamp_end ))
208- recording [slice_start :slice_end ].export (filename , format = "mp3" , bitrate = "192k" , tags = tags , cover = OUTPUT_DIR + "/.cover.jpg" )
209+ recording [slice_start :slice_end ].export (filename , format = "mp3" , bitrate = "192k" , tags = tags , cover = OUTPUT_DIR + "/.cover.jpg" if add_covers else None )
209210
210211 if genius is not None and genius .access_token .startswith ("Bearer" ):
211212 while True :
@@ -234,7 +235,7 @@ def get_sink_id(key):
234235 print ("\n {}{} Done! Recorded and converted {} tracks. Bye!{}" .format (INFO , GREEN , counter , RST ))
235236
236237 if show_folder :
237- subprocess .Popen ("xdg-open {} " .format (OUTPUT_DIR ).split (), stdout = subprocess .PIPE )
238+ subprocess .Popen ("xdg-open \" {} \" " .format (OUTPUT_DIR ).split (), stdout = subprocess .PIPE )
238239
239240 except KeyboardInterrupt :
240241 subprocess .Popen ("systemctl --user restart pipewire pipewire-pulse && systemctl --user daemon-reload" , stdout = subprocess .DEVNULL , shell = True )
0 commit comments