From 28acf9933dd3f5eedfae857155306b6140fab0b5 Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Wed, 28 Feb 2024 11:43:50 -0500 Subject: Version 7.0.1. Fix fallback video file name in ViewVideoActivity. --- .../docilealligator/infinityforreddit/activities/ViewVideoActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/src/main/java/ml/docilealligator/infinityforreddit') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java index 697f0237..27d9e6cf 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java @@ -843,7 +843,7 @@ public class ViewVideoActivity extends AppCompatActivity implements CustomFontRe videoType = VIDEO_TYPE_DIRECT; videoDownloadUrl = videoFallbackDirectUrl; mVideoUri = Uri.parse(videoFallbackDirectUrl); - videoFileName = FilenameUtils.getName(videoDownloadUrl); + videoFileName = videoFileName == null ? FilenameUtils.getName(videoDownloadUrl) : videoFileName; player.prepare(); player.setMediaSource(new ProgressiveMediaSource.Factory(dataSourceFactory).createMediaSource(MediaItem.fromUri(mVideoUri))); preparePlayer(savedInstanceState); -- cgit v1.2.3