Changeset 455


Ignore:
Timestamp:
22-05-11 17:16:00 (2 years ago)
Author:
thomas
Message:
  • morituri/program/cdparanoia.py: Since stop can be same as start, add + 1 to progress calculation. Fiexes #37.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r453 r455  
     12011-05-22  Thomas Vander Stichele  <thomas at apestaart dot org> 
     2 
     3        * morituri/program/cdparanoia.py: 
     4          Since stop can be same as start, add + 1 to progress calculation. 
     5          Fiexes #37. 
     6 
    172011-05-22  Thomas Vander Stichele  <thomas at apestaart dot org> 
    28 
  • trunk/morituri/program/cdparanoia.py

    r438 r455  
    204204        @param start:  first frame to rip 
    205205        @type  start:  int 
    206         @param stop:   last frame to rip (inclusive) 
     206        @param stop:   last frame to rip (inclusive); >= start 
    207207        @type  stop:   int 
    208208        @param offset: read offset, in samples 
     
    306306                self._popen.terminate() 
    307307 
    308             num = float(self._parser.wrote) - self._start 
    309             den = float(self._stop) - self._start 
    310             progress = num / den 
     308            num = self._parser.wrote - self._start + 1 
     309            den = self._stop - self._start + 1 
     310            assert den != 0, "stop %d should be >= start %d" % ( 
     311                self._stop, self._start) 
     312            progress = float(num) / float(den) 
    311313            if progress < 1.0: 
    312314                self.setProgress(progress) 
Note: See TracChangeset for help on using the changeset viewer.