(self, maxes=5)
return [i[0] for i in fetchedData]
返回前5个播放次数最多的歌曲信息。
返回前5个播放次数最多的歌曲信息。
返回前5个播放次数最多的歌曲信息。
def getSongByPlayTimes(self, maxes=5) -> list:
        """
            返回前5个播放次数最多的歌曲信息。
        """
        fetchedData = self.cursor.execute("""SELECT id FROM playhistory 
            ORDER BY playTimes DESC 
            LIMIT {}""".format(maxes))

        # TODO
        # 错误过滤
        return [i[0] for i in fetchedData]
def getSongByPlayTimes ( self , maxes = 5 ) -> list : fetchedData = self . cursor . execute ( """SELECT id FROM playhistory 
            ORDER BY playTimes DESC 
            LIMIT {}""" . format ( maxes ) ) # TODO # 错误过滤 return [ i [ 0 ] for i in fetchedData ]