def search_show_ids_by_names(self, *names, exact=False) -> Set[Show]:
shows = set()
for name in names:
debug("Searching shows by name: {}".format(name))
if exact:
self.q.execute("SELECT show, name FROM ShowNames WHERE name = ?", (name,))
else:
self.q.execute("SELECT show, name FROM ShowNames WHERE name = ? COLLATE alphanum", (name,))
matched = self.q.fetchall()
for match in matched:
debug(" Found match: {} | {}".format(match[0], match[1]))
shows.add(match[0])
return shows
# Helper methods
## Conversions
评论列表
文章目录