check if ffmpeg converted successfully

This commit is contained in:
aliveoutside
2022-07-11 20:14:34 +03:00
parent 87ef92eff8
commit 2d21a85259
@@ -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