Example #1
0
 def album_data():
     try:
         cwd = os.getcwd()
         coverart = cwd +  '/coverart'
         f=open(coverart)
         coverart = f.readline()
         file = cStringIO.StringIO(urllib.urlopen(coverart).read())
         img = pygame.image.load(file)
         screen.blit(pygame.transform.scale(img, (200, 200)), (140, 112))
         pygame.draw.rect(screen, black, [  4, 4, 480, 100])
         make_label(song(),4,2,32,music_data_color)
         make_label(artist(),4,28,32,music_data_color)
         make_label(album(),4,52,32,music_data_color)
         make_label(station(),4,76,32,music_data_color)
         pygame.display.update()            
     except IOError:
         pass 
Example #2
0
    def getArtistFromDB(self):
        try:

            showArtists = self.cur.execute("SELECT * from artist").fetchall()
            print(showArtists)
            artists = []
            i = 0
            for t in showArtists:
                artists.append(artist(t[0], t[1], t[2], t[3], t[4], t[5]))
                i += 1
            if len(artists) > 0:
                return artists

            print("Nada que mostrar")
            return 1
        except:
            print("Error en consulta de playlist")
            return 1
    def resultToArtistObj(self, result):
        artis = None
        artists = []
        for x in result['artist-list']:

            area = x['area']['name']
            name = x['name']
            score = x['ext:score']
            try:
                date = x['life-span']['begin']
                gender = x['gender']
                type = x['type']
            except:
                date = "EMPTY"
                gender = "EMPTY"
                type = "EMPTY"
            artis = artist(area, date, name, gender, type, score)
            artists.append(artis)
        return artists
Example #4
0
 def menu_lable():
     lable = song() + ' ... By ... ' + artist()
     pygame.draw.rect(screen, black, [  30, 30, 469, 30])
     make_button(lable , 30, 30, 40, 445, menu_color)
     pygame.display.update()
Example #5
0
 def artist(self):
     self.artist = artist.artist(self.lyric)