updated caption file name and clean code
This commit is contained in:
parent
1afb9cdba9
commit
50269d0f5e
|
@ -568,16 +568,16 @@ public class DownloadDialog extends DialogFragment
|
||||||
private void onItemSelectedSetFileName() {
|
private void onItemSelectedSetFileName() {
|
||||||
final String setSubtitleLanguageCode = subtitleStreamsAdapter.getItem(selectedSubtitleIndex)
|
final String setSubtitleLanguageCode = subtitleStreamsAdapter.getItem(selectedSubtitleIndex)
|
||||||
.getLanguageTag();
|
.getLanguageTag();
|
||||||
|
final String fileName = FilenameUtils.createFilename(getContext(),
|
||||||
|
currentInfo.getName());
|
||||||
switch (dialogBinding.videoAudioGroup.getCheckedRadioButtonId()) {
|
switch (dialogBinding.videoAudioGroup.getCheckedRadioButtonId()) {
|
||||||
case R.id.audio_button:
|
case R.id.audio_button:
|
||||||
case R.id.video_button:
|
case R.id.video_button:
|
||||||
dialogBinding.fileName.setText(FilenameUtils.createFilename(getContext(),
|
dialogBinding.fileName.setText(fileName);
|
||||||
currentInfo.getName()));
|
|
||||||
break;
|
break;
|
||||||
case R.id.subtitle_button:
|
case R.id.subtitle_button:
|
||||||
dialogBinding.fileName.setText(FilenameUtils.createFilename(getContext(),
|
dialogBinding.fileName.setText(fileName + getString(
|
||||||
currentInfo.getName() + getString(
|
R.string.caption_file_name, fileName, setSubtitleLanguageCode));
|
||||||
R.string.caption_file_name, setSubtitleLanguageCode)));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -452,7 +452,7 @@
|
||||||
<string name="resize_zoom">Zoom</string>
|
<string name="resize_zoom">Zoom</string>
|
||||||
<string name="caption_auto_generated">Auto-generated</string>
|
<string name="caption_auto_generated">Auto-generated</string>
|
||||||
<!-- Caption Settings -->
|
<!-- Caption Settings -->
|
||||||
<string name="caption_file_name">-%s</string>
|
<string name="caption_file_name">%1$s-%2$s</string>
|
||||||
<string name="caption_setting_title">Captions</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>
|
<string name="caption_setting_description">Modify player caption text scale and background styles. Requires app restart to take effect</string>
|
||||||
<!-- Debug Settings -->
|
<!-- Debug Settings -->
|
||||||
|
|
Loading…
Reference in New Issue