def filename_priority(filename, cover_names):
 return [idx for (idx, x) in enumerate(cover_names) if (x in filename)]

def filename_priority ( filename , cover_names ) : return [ idx for ( idx , x ) in enumerate ( cover_names ) if ( x in filename ) ]
sort order for image names .