Пример #1
0
    def idsearch ():
        """"""

        for mov in getdat.cache:
            if mov[MKEY[1]] == ID:
                dispdat.movdata(mov)
                return True
        else:
            return False
Пример #2
0
    def titlesearch ():
        """"""

        for mov in getdat.cache:
            
            movtitle = mov[MKEY[3]].lower()
            movtitlespl = mov[MKEY[3]].lower().split()
            
            if search == movtitle or search == movtitle[4:]:
                if year == "":
                    dispdat.movdata(mov)
                    return True
                else:
                    if year == mov[MKEY[4]]:
                        dispdat.movdata(mov)
                        return True
            # elif any(word in searchspl for word in movtitlespl):
            #     for word in search.split():
            #          if word in movtitlespl:
            #                 matches.append("{0} ({1})").format(mov[MKEY[3]], 
            #                                                    mov[MKEY[4]])

        else:
            return False