예제 #1
0
from albumart import AlbumArt
import generique
from PIL import Image

# Random generation of a band, album and keywords
res = generique.generate(['band/keywords', 'band/album', 'band/base', '1'])[0]
album_title = res.split('~~')[1].strip()
band_name = res.split('~~')[2].strip()

keywords = []
for a in res.split('~~')[0].split('~'):
    keywords.append(a.strip())

album = AlbumArt(band_name, album_title, keywords)
cover = album.generate()

album.emit()
예제 #2
0
파일: dogvibes.py 프로젝트: estock/dogvibes
 def fetch_albumart(self, artist, album, size, request):
     try:
         request.finish(AlbumArt.get_image(artist, album, size), raw = True)
     except ValueError as e:
         request.finish(AlbumArt.get_standard_image(size), raw = True)
예제 #3
0
 def API_getAlbumArt(self, uri, size = 0):
     try:
         track = self.create_track_from_uri(uri)
         return AlbumArt.get_image(track.artist, track.album, size)
     except ValueError:
         return AlbumArt.get_standard_image(size)