check if ffmpeg converted successfully

This commit is contained in:
aliveoutside
2022-07-11 20:14:34 +03:00
parent 94c72eb490
commit 8c63ff69c7
@@ -35,15 +35,17 @@ public class AudioDownloader {
public void onSuccess() {
try {
var fileName = track.toString();
FFMpeg.convert(downloadPath, musicPath + File.separator + fileName + ".mp3");
var success = FFMpeg.convert(downloadPath, musicPath + File.separator + fileName + ".mp3");
if (success)
ToastUtils.a("Загрузка завершена");
else
onFailure();
}
catch (UnsatisfiedLinkError e) {
Log.e("AudioDownloader","Опять эти нативные либы");
Log.e("AudioDownloader", e.getMessage());
onFailure();
}
ToastUtils.a("Загрузка завершена");
}
@Override