mirror of
				https://github.com/THIS-IS-NOT-A-BACKUP/zspotify.git
				synced 2025-11-03 21:10:34 +00:00 
			
		
		
		
	Don't skip download if local file is empty.
If a download gets aborted for some reasons, zspotify left behind a 0 length file which caused the song to be skipped on the next run. This commit checks for a non-zero filesize before deciding whether to skip the download of an "existing" file or not.
This commit is contained in:
		
							parent
							
								
									aeec7c8fc4
								
							
						
					
					
						commit
						3b20c437db
					
				@ -573,7 +573,7 @@ def download_track(track_id_str: str, extra_paths=""):
 | 
			
		||||
                print("###   SKIPPING:", song_name,
 | 
			
		||||
                      "(SONG IS UNAVAILABLE)   ###")
 | 
			
		||||
            else:
 | 
			
		||||
                if os.path.isfile(filename) and SKIP_EXISTING_FILES:
 | 
			
		||||
                if os.path.isfile(filename) and os.path.getsize(filename) and SKIP_EXISTING_FILES:
 | 
			
		||||
                    print("###   SKIPPING:", song_name,
 | 
			
		||||
                          "(SONG ALREADY EXISTS)   ###")
 | 
			
		||||
                else:
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user