<%inherit file="base.html"/> <%! from headphones import helpers %> <%def name="body()">
%for artist in artists: <% totaltracks = artist['TotalTracks'] havetracks = artist['HaveTracks'] if not havetracks: havetracks = 0 try: percent = (havetracks*100.0)/totaltracks if percent > 100: percent = 100 except (ZeroDivisionError, TypeError): percent = 0 totaltracks = '?' %>
%if artist['Status'] == 'Loading': %else: ${havetracks}/${totaltracks} %endif
${artist['ArtistName']}
%endfor

| Artist Name | Latest Album | Have
--- | --- | --- | ---
%for artist in artists: <% totaltracks = artist['TotalTracks'] havetracks = artist['HaveTracks'] if not havetracks: havetracks = 0 try: percent = (havetracks*100.0)/totaltracks if percent > 100: percent = 100 except (ZeroDivisionError, TypeError): percent = 0 totaltracks = '?' if artist['ReleaseDate'] and artist['LatestAlbum']: releasedate = artist['ReleaseDate'] albumdisplay = '%s (%s)' % (artist['LatestAlbum'], artist['ReleaseDate']) if releasedate > helpers.today(): grade = 'A' else: grade = 'Z' elif artist['LatestAlbum']: releasedate = '' grade = 'Z' albumdisplay = '%s' % artist['LatestAlbum'] else: releasedate = '' grade = 'Z' albumdisplay = 'None' if artist['Status'] == 'Paused': grade = 'X' %>
%if artist['Status'] == 'Loading': %endif | ${artist['ArtistName']} | ${albumdisplay} | ${havetracks}/${totaltracks}
%endfor

<%def name="headIncludes()"> <%def name="javascriptIncludes()">