public void deleteTag(AudioFile f) throws CannotWriteException { //Because audio file is an instanceof MP3File this directs it to save //taking into account if the tag has been sent to null in which case it will be deleted f.commit(); }
public void writeFile(AudioFile f) throws CannotWriteException { //Because audio file is an instanceof MP3File this directs it to save f.commit(); }
public void deleteTag(AudioFile f) throws CannotWriteException { //Because audio file is an instanceof MP3File this directs it to save //taking into account if the tag has been sent to null in which case it will be deleted f.commit(); }
public void writeFile(AudioFile f) throws CannotWriteException { //Because audio file is an instanceof MP3File this directs it to save f.commit(); }
public void deleteTag(AudioFile f) throws CannotWriteException { //Because audio file is an instanceof MP3File this directs it to save //taking into account if the tag has been sent to null in which case it will be deleted f.commit(); }
public void writeFile(AudioFile f) throws CannotWriteException { //Because audio file is an instanceof MP3File this directs it to save f.commit(); }
private void commitAudio(Context context, AudioFile f, File file) { try { f.commit(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { Intent mediaScanIntent = new Intent( Intent.ACTION_MEDIA_SCANNER_SCAN_FILE); Uri contentUri = Uri.fromFile(file); mediaScanIntent.setData(contentUri); context.sendBroadcast(mediaScanIntent); } else { context.sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" + Utils.getStoragePath(context)))); } } catch (CannotWriteException e) { e.printStackTrace(); } } }
/** * Delete the Id3v1 and ID3v2 tags from file * * @param af * @throws CannotReadException * @throws CannotWriteException */ @Override public synchronized void delete(AudioFile af) throws CannotReadException, CannotWriteException { ((MP3File) af).setID3v1Tag(null); ((MP3File) af).setID3v2Tag(null); af.commit(); }
/** * Delete the Id3v1 and ID3v2 tags from file * * @param af * @throws CannotReadException * @throws CannotWriteException */ @Override public synchronized void delete(AudioFile af) throws CannotReadException, CannotWriteException { ((MP3File)af).setID3v1Tag(null); ((MP3File)af).setID3v2Tag(null); af.commit(); }
/** * Delete the Id3v1 and ID3v2 tags from file * * @param af * @throws CannotReadException * @throws CannotWriteException */ @Override public synchronized void delete(AudioFile af) throws CannotReadException, CannotWriteException { ((MP3File)af).setID3v1Tag(null); ((MP3File)af).setID3v2Tag(null); af.commit(); }
AudioFile audioFile = AudioFileIO.read(testFile); Tag newTag = audioFile.getTag(); newTag.setField(FieldKey.ALBUM,"October"); newTag.setField(FieldKey.ARTIST,"U2"); audioFile.commit();
TagOptionSingleton.getInstance().setAndroid(true); File mp3File = new File(mp3Song); AudioFile audioFile = AudioFileIO.read(mp3File); audioFile.setTag(new ID3v23Tag()); Tag newTag= audioFile.getTag(); if (album != null) { newTag.setField(ALBUM, album); } if (artist != null) { newTag.setField(ARTIST, artist); } if (trackName != null) { Log.d("ALBUM TITLE",trackName); newTag.setField(TITLE, trackName); } if (imageAlbum != null) { Log.d("ALBUM COVER",imageAlbum); File fileCover = new File(imageAlbum); if (!fileCover.exists()){ Log.d("ALBUM ","DOESNT EXIST"); } Artwork artwork = Artwork.createArtworkFromFile(fileCover); newTag.addField(artwork); newTag.setField(artwork); } audioFile.commit();de here
af.commit(); return;
af.commit(); return;
audioFile.commit(); } catch (CannotWriteException e) { e.printStackTrace();