<%inherit file="base.html" /> <%! import headphones # Removed direct DB imports and queries from template. # These operations (fetching artists and creating json_artists) # should be performed in the Python view/controller and passed # to the template as part of its context. # import json # from headphones import db, helpers # myDB = db.DBConnection() # artist_json = {} # counter = 0 # artist_list = myDB.action("SELECT ArtistName from artists ORDER BY ArtistName COLLATE NOCASE") # for artist in artist_list: # artist_json[counter] = artist['ArtistName'] # counter+=1 # json_artists = json.dumps(artist_json) %> <%def name="headerIncludes()">
Manage Manually Matched & Ignored
« Back to manage overview <%def name="body()">

Manage Unmatched Albums

<%-- Changed ID for clarity --%> <% count_albums=0 %> <%-- Still useful for unique IDs if needed, but aiming for generic dialogs --%> %for album in unmatchedalbums: <% # Pre-escape for direct use in data-attributes where JS string is needed. # URL encoding will happen in JS with encodeURIComponent. old_artist_js_str = album['ArtistName'].replace("'","\\'").replace('"','"') old_album_js_str = album['AlbumTitle'].replace("'","\\'").replace('"','"') %> <% count_albums+=1 %> %endfor
Local Artist Local Album
${album['ArtistName']}
<%-- Data attributes to pass context to JS --%>
${album['AlbumTitle']}
<%-- Generic Ignore Confirmation Dialog --%> <%-- Generic Match Dialog --%>
<%def name="headIncludes()"> ${parent.headIncludes()} <%-- Ensure parent head includes are kept --%> <%def name="javascriptIncludes()"> ${parent.javascriptIncludes()} <%-- Ensure parent javascript includes are kept --%>