/** * Fetches all the tags from the local music file: - Artist - Album - Title - Genre * * @return Song filled with tags * @throws InvalidAudioFrameException * @throws ReadOnlyFileException * @throws CannotReadException * @throws TagException * @throws IOException */ public Song getSongTags() throws CannotReadException, IOException, TagException, ReadOnlyFileException, InvalidAudioFrameException { // create song Song song = new Song(); // instantiate audio file AudioFile audio = AudioFileIO.read(this.songFile); Tag tag = audio.getTag(); song.setArtist(tag.getFirst(FieldKey.ARTIST)); song.setAlbum(tag.getFirst(FieldKey.ALBUM)); song.setTitle(tag.getFirst(FieldKey.TITLE)); song.setGenre(tag.getFirst(FieldKey.GENRE)); return song; }