mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-03 19:17:24 -05:00 
			
		
		
		
	update hls subtitle display name
This commit is contained in:
		
							parent
							
								
									c90a30a0fe
								
							
						
					
					
						commit
						5bd44644cc
					
				@ -572,13 +572,11 @@ namespace MediaBrowser.Api.Playback.Hls
 | 
				
			|||||||
            {
 | 
					            {
 | 
				
			||||||
                const string format = "#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID=\"subs\",NAME=\"{0}\",DEFAULT={1},FORCED={2},AUTOSELECT=YES,URI=\"{3}\",LANGUAGE=\"{4}\"";
 | 
					                const string format = "#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID=\"subs\",NAME=\"{0}\",DEFAULT={1},FORCED={2},AUTOSELECT=YES,URI=\"{3}\",LANGUAGE=\"{4}\"";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                var name = stream.Language;
 | 
					                var name = stream.DisplayTitle;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                var isDefault = selectedIndex.HasValue && selectedIndex.Value == stream.Index;
 | 
					                var isDefault = selectedIndex.HasValue && selectedIndex.Value == stream.Index;
 | 
				
			||||||
                var isForced = stream.IsForced;
 | 
					                var isForced = stream.IsForced;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (string.IsNullOrWhiteSpace(name)) name = stream.Codec ?? "Unknown";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                var url = string.Format("{0}/Subtitles/{1}/subtitles.m3u8?SegmentLength={2}&api_key={3}",
 | 
					                var url = string.Format("{0}/Subtitles/{1}/subtitles.m3u8?SegmentLength={2}&api_key={3}",
 | 
				
			||||||
                    state.Request.MediaSourceId,
 | 
					                    state.Request.MediaSourceId,
 | 
				
			||||||
                    stream.Index.ToString(UsCulture),
 | 
					                    stream.Index.ToString(UsCulture),
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user