Fixed video downloading

This commit is contained in:
gdlbo
2022-04-16 00:01:21 +03:00
parent 40400817c1
commit 20517fdf51
@@ -64,7 +64,7 @@ public class VideoDownloader {
DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url));
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
request.setTitle(videoFile.toString());
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_MOVIES, videoFile.s + ".mp4");
request.setDestinationInExternalPublicDir(Environment.DIRECTORY_MOVIES, videoFile.toString() + ".mp4");
((DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE)).enqueue(request);
}));
builder.show();