Exemple #1
0
    def __init__(self, image):
        task.MultiSeparateTask.__init__(self)

        self._image = image
        cue = image.cue
        self.checksums = []

        self.debug('Checksumming %d tracks' % len(cue.table.tracks))
        for trackIndex, track in enumerate(cue.table.tracks):
            index = track.indexes[1]
            length = cue.getTrackLength(track)
            if length < 0:
                self.debug('track %d has unknown length' % (trackIndex + 1, ))
            else:
                self.debug('track %d is %d samples long' %
                           (trackIndex + 1, length))

            path = image.getRealPath(index.path)

            # here to avoid import gst eating our options
            from morituri.common import checksum

            checksumTask = checksum.AccurateRipChecksumTask(
                path,
                trackNumber=trackIndex + 1,
                trackCount=len(cue.table.tracks),
                sampleStart=index.relative * common.SAMPLES_PER_FRAME,
                sampleLength=length * common.SAMPLES_PER_FRAME)
            self.addTask(checksumTask)
Exemple #2
0
    def __init__(self, image):
        task.MultiSeparateTask.__init__(self)

        self._image = image
        cue = image.cue
        self._tasks = []
        self.lengths = {}

        try:
            htoa = cue.table.tracks[0].indexes[0]
            track = cue.table.tracks[0]
            path = image.getRealPath(htoa.path)
            assert type(path) is unicode, "%r is not unicode" % path
            logger.debug('schedule scan of audio length of %r', path)
            taskk = AudioLengthTask(path)
            self.addTask(taskk)
            self._tasks.append((0, track, taskk))
        except (KeyError, IndexError):
            logger.debug('no htoa track')

        for trackIndex, track in enumerate(cue.table.tracks):
            logger.debug('verifying track %d', trackIndex + 1)
            index = track.indexes[1]
            length = cue.getTrackLength(track)

            if length == -1:
                path = image.getRealPath(index.path)
                assert type(path) is unicode, "%r is not unicode" % path
                logger.debug('schedule scan of audio length of %r', path)
                taskk = AudioLengthTask(path)
                self.addTask(taskk)
                self._tasks.append((trackIndex + 1, track, taskk))
            else:
                logger.debug('track %d has length %d', trackIndex + 1, length)
Exemple #3
0
    def __init__(self, image):
        task.MultiSeparateTask.__init__(self)

        self._image = image
        cue = image.cue
        self.checksums = []

        logger.debug('Checksumming %d tracks' % len(cue.table.tracks))
        for trackIndex, track in enumerate(cue.table.tracks):
            index = track.indexes[1]
            length = cue.getTrackLength(track)
            if length < 0:
                logger.debug('track %d has unknown length' % (trackIndex + 1, ))
            else:
                logger.debug('track %d is %d samples long' % (
                    trackIndex + 1, length))

            path = image.getRealPath(index.path)

            # here to avoid import gst eating our options
            from morituri.common import checksum

            checksumTask = checksum.FastAccurateRipChecksumTask(path,
                trackNumber=trackIndex + 1, trackCount=len(cue.table.tracks),
                wave=True, v2=False)

            self.addTask(checksumTask)
Exemple #4
0
    def __init__(self, image):
        task.MultiSeparateTask.__init__(self)

        self._image = image
        cue = image.cue
        self.checksums = []

        self.debug("Checksumming %d tracks" % len(cue.table.tracks))
        for trackIndex, track in enumerate(cue.table.tracks):
            index = track.indexes[1]
            length = cue.getTrackLength(track)
            if length < 0:
                self.debug("track %d has unknown length" % (trackIndex + 1,))
            else:
                self.debug("track %d is %d samples long" % (trackIndex + 1, length))

            path = image.getRealPath(index.path)

            # here to avoid import gst eating our options
            from morituri.common import checksum

            checksumTask = checksum.AccurateRipChecksumTask(
                path,
                trackNumber=trackIndex + 1,
                trackCount=len(cue.table.tracks),
                sampleStart=index.relative * common.SAMPLES_PER_FRAME,
                sampleLength=length * common.SAMPLES_PER_FRAME,
            )
            self.addTask(checksumTask)
Exemple #5
0
    def __init__(self, image):
        task.MultiSeparateTask.__init__(self)

        self._image = image
        cue = image.cue
        self._tasks = []
        self.lengths = {}

        for trackIndex, track in enumerate(cue.table.tracks):
            self.debug('verifying track %d', trackIndex + 1)
            index = track.indexes[1]
            length = cue.getTrackLength(track)

            if length == -1:
                path = image.getRealPath(index.path)
                assert type(path) is unicode, "%r is not unicode" % path
                self.debug('schedule scan of audio length of %r', path)
                taskk = AudioLengthTask(path)
                self.addTask(taskk)
                self._tasks.append((trackIndex + 1, track, taskk))
            else:
                self.debug('track %d has length %d', trackIndex + 1, length)
Exemple #6
0
    def __init__(self, image):
        task.MultiSeparateTask.__init__(self)

        self._image = image
        cue = image.cue
        self.checksums = []

        self.debug('Checksumming %d tracks' % len(cue.table.tracks))
        for trackIndex, track in enumerate(cue.table.tracks):
            index = track.indexes[1]
            length = cue.getTrackLength(track)
            self.debug('track %d has length %d' % (trackIndex + 1, length))

            path = image.getRealPath(index.path)

            # here to avoid import gst eating our options
            from morituri.common import checksum

            checksumTask = checksum.AccurateRipChecksumTask(path,
                trackNumber=trackIndex + 1, trackCount=len(cue.table.tracks),
                frameStart=index.relative * common.SAMPLES_PER_FRAME,
                frameLength=length * common.SAMPLES_PER_FRAME)
            self.addTask(checksumTask)