def _getSectionIds(self, server, sections):
if not sections: return []<EOL>allSectionIds = {}<EOL>machineIdentifier = server.machineIdentifier if isinstance(server, PlexServer) else server<EOL>url = self.PLEXSERVERS.replace('<STR_LIT>', machineIdentifier)<EOL>data = self.query(url, self._session.get)<EOL>for elem in data[<NUM_LIT:0>]:<EOL><INDENT>allSectionIds[elem.attrib.get('<STR_LIT:id>', '<STR_LIT>').lower()] = elem.attrib.get('<STR_LIT:id>')<EOL>allSectionIds[elem.attrib.get('<STR_LIT:title>', '<STR_LIT>').lower()] = elem.attrib.get('<STR_LIT:id>')<EOL>allSectionIds[elem.attrib.get('<STR_LIT:key>', '<STR_LIT>').lower()] = elem.attrib.get('<STR_LIT:id>')<EOL><DEDENT>log.debug(allSectionIds)<EOL>sectionIds = []<EOL>for section in sections:<EOL><INDENT>sectionKey = section.key if isinstance(section, LibrarySection) else section<EOL>sectionIds.append(allSectionIds[sectionKey.lower()])<EOL><DEDENT>return sectionIds<EOL>
Converts a list of section objects or names to sectionIds needed for library sharing.