<%inherit file="base.html" /> <%! from mylar import db, helpers myDB = db.DBConnection() %> <%def name="headerIncludes()">
Delete Album %if album['Status'] == 'Skipped': Mark Album as Wanted %elif album['Status'] == 'Wanted': Force Check Mark Album as Skipped %else: Retry Download Try New Version %endif
« Back to ${album['ArtistName']} <%def name="body()">

${album['AlbumTitle']}

${album['ArtistName']}

<% totalduration = myDB.action("SELECT SUM(TrackDuration) FROM tracks WHERE AlbumID=?", [album['AlbumID']]).fetchone()[0] totaltracks = len(myDB.select("SELECT TrackTitle from tracks WHERE AlbumID=?", [album['AlbumID']])) try: albumduration = helpers.convert_milliseconds(totalduration) except: albumduration = 'n/a' %>
  • Tracks: ${totaltracks}
  • Duration: ${albumduration}
%for track in tracks: <% if track['Location']: grade = 'A' location = track['Location'] else: grade = 'X' location = '' if track['BitRate']: bitrate = str(track['BitRate']/1000) + ' kbps' else: bitrate = '' try: trackduration = helpers.convert_milliseconds(track['TrackDuration']) except: trackduration = 'n/a' if not track['Format']: format = 'Unknown' else: format = track['Format'] %> %endfor <% unmatched = myDB.select('SELECT * from have WHERE ArtistName LIKE ? AND AlbumTitle LIKE ?', [album['ArtistName'], album['AlbumTitle']]) %> %if unmatched: %for track in unmatched: <% duration = helpers.convert_seconds(float(track['TrackLength'])) %> %endfor %endif
# Track Title Duration Local File Bit Rate Format
${track['TrackNumber']} ${track['TrackTitle']} ${trackduration} ${location} ${bitrate} ${format}
${track['TrackNumber']} ${track['TrackTitle']} ${duration} ${track['Location']} ${int(track['BitRate'])/1000} kbps ${track['Format']}
<%def name="headIncludes()"> <%def name="javascriptIncludes()">