Just in case it is of use to anyone else. I have found a bit of a hack that enables a plugin using the register_track_metadata_processor()
API to get the filenames for a track. This is illustrated in the following code snippet:
album_filenames = album.tagger.get_files_from_objects([album])
trackno = track.metadata['tracknumber']
discno = track.metadata['discnumber']
track_file = None
for album_file in album_filenames:
if str(album_file.tracknumber) == trackno and str(album_file.discnumber) == discno:
track_file = album_file.filename
break
This, of course, assumes that Picard has managed to match the files correctly.
EDIT:
BTW to use the above code, you need to get the track object first, for which you can use the hack track = album._new_tracks[-1]
. Otherwise, replace track.metadata by the metadata argument in the function which is the argument in register_track_metadata_processor()