File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed
Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -85,8 +85,8 @@ def log_tracks(tracks):
8585 ")\n " + ("-" * 79 ) + Fore .RESET )
8686 log_tracks (self .failure_tracks )
8787
88- print (Fore .GREEN + "\n " + str (len (self .success_tracks )) + " Tracks successfully ripped." )
89- print (Fore .RED + " \n " + str (len (self .failure_tracks )) + " Tracks failed." )
88+ print (Fore .GREEN + "\n " + str (len (self .success_tracks )) + " Tracks successfully ripped." )
89+ print (Fore .RED + str (len (self .failure_tracks )) + " Tracks failed." )
9090
9191 def get_chart_name (self , chart ):
9292 region_mapping = {
Original file line number Diff line number Diff line change @@ -248,6 +248,7 @@ def get_tracks_from_uri(uri):
248248 if self .abort .is_set ():
249249 break
250250
251+ # Commented this out, Function aready available in line 227
251252 #tracks = list(get_tracks_from_uri(uri))
252253
253254 if args .playlist_sync and self .current_playlist :
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ def get_cover_image(image_link):
9696
9797 # cover art image
9898 def get_cover_image (image_link ):
99- image_link = 'http ://open.spotify.com %s' % (
99+ image_link = 'https ://i.scdn.co %s' % (
100100 image_link [len ('spotify' ):].replace (':' , '/' ))
101101 cover_file = urllib .urlretrieve (image_link )[0 ]
102102
@@ -105,10 +105,13 @@ def get_cover_image(image_link):
105105 return f .read ()
106106 else :
107107 return None
108-
109- image_link = str (track .album .cover (2 ).link )
110- #print(str(image_link))
111- image = get_cover_image (image_link )
108+ if track .album .cover (2 ) is not None :
109+ image_link = str (track .album .cover (2 ).link )
110+ #print(str(image_link))
111+ image = get_cover_image (image_link )
112+ else :
113+ print (Fore .RED + "Cover file not found" + Fore .RESET )
114+ image = None
112115
113116 def tag_to_ascii (_str , _str_ascii ):
114117 return _str if args .ascii_path_only else _str_ascii
You can’t perform that action at this time.
0 commit comments