diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java
index 2975fe43a..c54fd5173 100644
--- a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java
+++ b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java
@@ -562,6 +562,24 @@ public class DownloadDialog extends DialogFragment
selectedSubtitleIndex = position;
break;
}
+ onItemSelectedSetFileName();
+ }
+
+ private void onItemSelectedSetFileName() {
+ final String setSubtitleLanguageCode = subtitleStreamsAdapter.getItem(selectedSubtitleIndex)
+ .getLanguageTag();
+ switch (dialogBinding.videoAudioGroup.getCheckedRadioButtonId()) {
+ case R.id.audio_button:
+ case R.id.video_button:
+ dialogBinding.fileName.setText(FilenameUtils.createFilename(getContext(),
+ currentInfo.getName()));
+ break;
+ case R.id.subtitle_button:
+ dialogBinding.fileName.setText(FilenameUtils.createFilename(getContext(),
+ currentInfo.getName() + getString(
+ R.string.caption_file_name, setSubtitleLanguageCode)));
+ break;
+ }
}
@Override
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 3fa37155a..fefba2c77 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -452,6 +452,7 @@
Zoom
Auto-generated
+ -%s
Captions
Modify player caption text scale and background styles. Requires app restart to take effect