mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-31 15:23:00 +00:00 
			
		
		
		
	added Language suffix for subtitle downloads
This commit is contained in:
		| @@ -562,6 +562,24 @@ public class DownloadDialog extends DialogFragment | |||||||
|                 selectedSubtitleIndex = position; |                 selectedSubtitleIndex = position; | ||||||
|                 break; |                 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 |     @Override | ||||||
|   | |||||||
| @@ -452,6 +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_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 --> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 pratyaksh1610
					pratyaksh1610