def _parse_submission(self, values, suffix):
        p = {}
        p['index'] = (suffix or '')[1:]
        p['puid'] = values.get('puid' + suffix)
        if p['puid'] and not is_uuid(p['puid']):
            raise errors.InvalidUUIDError('puid' + suffix)
        p['foreignid'] = values.get('foreignid' + suffix)
        if p['foreignid'] and not is_foreignid(p['foreignid']):
            raise errors.InvalidForeignIDError('foreignid' + suffix)
        p['mbids'] = values.getlist('mbid' + suffix)
        if p['mbids'] and not all(map(is_uuid, p['mbids'])):
            raise errors.InvalidUUIDError('mbid' + suffix)
        self._parse_duration_and_format(p, values, suffix)
        fingerprint_string = values.get('fingerprint' + suffix)
        if not fingerprint_string:
            raise errors.MissingParameterError('fingerprint' + suffix)
        p['fingerprint'] = decode_fingerprint(fingerprint_string.encode('ascii', 'ignore'))
        if not p['fingerprint']:
            raise errors.InvalidFingerprintError()
        p['bitrate'] = values.get('bitrate' + suffix, type=int) or None
        if p['bitrate'] is not None and p['bitrate'] <= 0:
            raise errors.InvalidBitrateError('bitrate' + suffix)
        p['track'] = values.get('track' + suffix)
        p['artist'] = values.get('artist' + suffix)
        p['album'] = values.get('album' + suffix)
        p['album_artist'] = values.get('albumartist' + suffix)
        p['track_no'] = values.get('trackno' + suffix, type=int)
        p['disc_no'] = values.get('discno' + suffix, type=int)
        p['year'] = values.get('year' + suffix, type=int)
        self.submissions.append(p)
dataset/ETHPy150Open lalinsky/acoustid-server/acoustid/api/v2/__init__.py/SubmitHandlerParams._parse_submission/original