added Language suffix for subtitle downloads

pull/9499/head
pratyaksh1610 2022-12-04 17:59:22 +05:30
rodzic bd6b3c53c5
commit 1afb9cdba9
2 zmienionych plików z 19 dodań i 0 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -452,6 +452,7 @@
<string name="resize_zoom">Zoom</string>
<string name="caption_auto_generated">Auto-generated</string>
<!-- Caption Settings -->
<string name="caption_file_name">-%s</string>
<string name="caption_setting_title">Captions</string>
<string name="caption_setting_description">Modify player caption text scale and background styles. Requires app restart to take effect</string>
<!-- Debug Settings -->