def METHOD_NAME(self, tracklist):
    # fill in self.id and self.toc.
    # if the argument is a string ending in .rdb, the part
    # upto the suffix is taken as the id.
    if type(tracklist) == type(''):
        if tracklist[-4:] == '.rdb':
            self.id = tracklist[:-4]
            self.toc = ''
            return
        t = []
        for i in range(2, len(tracklist), 4):
            t.append((None, \
                      (int(tracklist[i:i+2]), \
                       int(tracklist[i+2:i+4]))))
        tracklist = t
    ntracks = len(tracklist)
    self.id = _dbid((ntracks >> 4) & 0xF) + _dbid(ntracks & 0xF)
    if ntracks <= _DB_ID_NTRACKS:
        nidtracks = ntracks
    else:
        nidtracks = _DB_ID_NTRACKS - 1
        min = 0
        sec = 0
        for track in tracklist:
            start, length = track
            min = min + length[0]
            sec = sec + length[1]
        min = min + sec / 60
        sec = sec % 60
        self.id = self.id + _dbid(min) + _dbid(sec)
    for i in range(nidtracks):
        start, length = tracklist[i]
        self.id = self.id + _dbid(length[0]) + _dbid(length[1])
    self.toc = string.zfill(ntracks, 2)
    for track in tracklist:
        start, length = track
        self.toc = self.toc + string.zfill(length[0], 2) + \
                  string.zfill(length[1], 2)