kopia lustrzana https://github.com/TeamNewPipe/NewPipe
added Language suffix for subtitle downloads
rodzic
bd6b3c53c5
commit
1afb9cdba9
|
@ -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
|
||||
|
|
|
@ -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 -->
|
||||
|
|
Ładowanie…
Reference in New Issue