def InitData(self): dbsql = AnimeData() self.infos = dbsql.SqliteInfoSelect() self.animelist.clear() if self.infos: for info in self.infos: self.animelist.addItem(QListWidgetItem(QIcon('./source/pic/bili.png'), info[0]))
def ShowData(self): dbsql = AnimeData() self.infos = dbsql.SqliteInfoSearch(self.choose_info) self.animelist.clear() if self.infos: for info in self.infos: self.animelist.addItem(QListWidgetItem(QIcon('./source/pic/bili.png'), info[0])) else: self.InitData()
def GetDetail(self,title): dbsql = AnimeData() infos = dbsql.SqliteInfoSearch({'title':title}) resinfo = [] if infos: for info in infos: resinfo.append(info[0]) resinfo.append(info[1]) resinfo.append(info[2]) resinfo.append(info[3]) resinfo.append(info[4]) resinfo.append(info[5]) resinfo.append(info[6]) resinfo.append(info[7]) return resinfo
def FollowInAnime(self): follow = connect('./database/follow.db') anime = AnimeData() cur_follow = follow.cursor() title_list = cur_follow.execute(''' SELECT TITLE FROM FOLLOW ''') titles = [] for title in title_list: titles.append(title[0]) follow.commit() follow.close() return titles
def WatchedInAnime(self): watched = connect('./database/watched.db') anime = AnimeData() cur_watched = watched.cursor() title_list = cur_watched.execute(''' SELECT TITLE FROM WATCHED ''') titles = [] for title in title_list: titles.append(title[0]) watched.commit() watched.close() return titles