'Search all episodes in show. Can search all data, or a specific key (for
example, episodename)
Always returns an array (can be empty). First index contains the first
match, and so on.
Each array index is an Episode() instance, so doing
search_results[0][\'episodename\'] will retrieve the episode name of the
first match.
Search terms are converted to lower case (unicode) strings.'

def search(self, term=None, key=None):

    results = []
    for cur_season in self.values():
        searchresult = cur_season.search(term=term, key=key)
        if (len(searchresult) != 0):
            results.extend(searchresult)
    return results
