@@ -231,6 +231,9 @@ class Rip(_CD):
231231 skipped_tracks = []
232232 # this holds tracks that fail to rip -
233233 # currently only used when the --keep-going option is used
234+ unverified_tracks = []
235+ # this holds tracks that failed to verify -
236+ # currently only used when the --keep-unverified option is used
234237 description = """
235238Rips a CD.
236239
@@ -500,12 +503,12 @@ def _ripIfNotRipped(number):
500503 number , tries )
501504 if self .options .keep_unverified and not number == 0 :
502505 logger .warning ("track %d failed to rip. keeping unverified file." , number )
503- logger .debug ("adding %s to skipped_tracks " ,
506+ logger .debug ("adding %s to unverified_tracks " ,
504507 trackResult )
505- self .skipped_tracks .append (trackResult )
506- logger .debug ("skipped_tracks = %s" ,
507- self .skipped_tracks )
508- trackResult .skipped = True
508+ self .unverified_tracks .append (trackResult )
509+ logger .debug ("unverified_tracks = %s" ,
510+ self .unverified_tracks )
511+ trackResult .unverified = True
509512 elif self .options .keep_going :
510513 logger .warning ("track %d failed to rip." , number )
511514 logger .debug ("adding %s to skipped_tracks" ,
@@ -518,7 +521,7 @@ def _ripIfNotRipped(number):
518521 raise RuntimeError ("track can't be ripped. "
519522 "Rip attempts number is equal "
520523 "to {}" .format (self .options .max_retries ))
521- if trackResult in self .skipped_tracks :
524+ if trackResult in ( self .skipped_tracks or self . unverified_tracks ) :
522525 print ("Skipping CRC comparison for track %d "
523526 "due to rip failure" % number )
524527 else :
@@ -586,6 +589,8 @@ def _ripIfNotRipped(number):
586589 logger .debug ('writing m3u file for %r' , discName )
587590 self .program .write_m3u (discName )
588591
592+ if len (self .unverified_tracks ) > 0 :
593+ self .program .unverified_tracks = self .unverified_tracks
589594 if len (self .skipped_tracks ) > 0 :
590595 logger .warning ("the generated cue sheet references %d track(s) "
591596 "which failed to rip so the associated file(s) "
@@ -601,6 +606,7 @@ def _ripIfNotRipped(number):
601606
602607 self .program .writeLog (discName , self .logger )
603608
609+ # TODO: Return non-zero in case of unverified tracks?
604610 if len (self .skipped_tracks ) > 0 :
605611 logger .warning ('%d tracks have been skipped from this rip attempt' ,
606612 len (self .skipped_tracks ))
0 commit comments