Beispiel #1
0
    def create_album(self, _album):
        album = Album(_album['AlbumID'])
        try:
            album.title = u'%s' % _album['AlbumName']
        except:
            album.title = u'%s' % _album['Name']

        album.author = u'%s' % _album['ArtistName']
        if _album['Year']:
            album.year = int(_album['Year'])

        if _album['CoverArtFilename']:
            album.thumbnail = BaseImage(
                u'http://images.gs-cdn.net/static/albums/80_' +
                _album['CoverArtFilename'])
            album.thumbnail.url = album.thumbnail.id
        return album
Beispiel #2
0
    def create_album(self, _album):
        album = Album(_album['AlbumID'])
        try:
            album.title = u'%s' % _album['AlbumName']
        except:
            album.title = u'%s' % _album['Name']

        album.author = u'%s' % _album['ArtistName']
        if _album['Year']:
            album.year = int(_album['Year'])

        if _album['CoverArtFilename']:
            album.thumbnail = BaseImage(u'http://images.gs-cdn.net/static/albums/80_' + _album['CoverArtFilename'])
            album.thumbnail.url = album.thumbnail.id
        return album
Beispiel #3
0
 def _make_album(self, coll):
     alb = Album(coll.id)
     alb.title = coll.title
     alb.author = coll.title
     return alb
Beispiel #4
0
 def _make_album(self, coll):
     alb = Album(coll.id)
     alb.title = coll.title
     alb.author = coll.title
     return alb
Beispiel #5
0
 def fill_album(self, album, fields):
     _id = Album.decode_id(album.id)
     album.tracks_list = []
     for song in self.browser.get_all_songs_from_album(_id):
         album.tracks_list.append(song)
Beispiel #6
0
 def fill_album(self, album, fields):
     _id = Album.decode_id(album.id)
     album.tracks_list = []
     for song in self.browser.get_all_songs_from_album(_id):
         album.tracks_list.append(song)