def addItems(self, items):
if not isinstance(items, (list, tuple)):<EOL><INDENT>items = [items]<EOL><DEDENT>ratingKeys = []<EOL>for item in items:<EOL><INDENT>if item.listType != self.playlistType:  <EOL><INDENT>raise BadRequest('<STR_LIT>' %<EOL>(self.playlistType, item.listType))<EOL><DEDENT>ratingKeys.append(str(item.ratingKey))<EOL><DEDENT>uuid = items[<NUM_LIT:0>].section().uuid<EOL>ratingKeys = '<STR_LIT:U+002C>'.join(ratingKeys)<EOL>key = '<STR_LIT>' % (self.key, utils.joinArgs({<EOL>'<STR_LIT>': '<STR_LIT>' % (uuid, ratingKeys)<EOL>}))<EOL>result = self._server.query(key, method=self._server._session.put)<EOL>self.reload()<EOL>return result<EOL>
Add items to a playlist.