mirror of
				https://github.com/devine-dl/devine.git
				synced 2025-11-04 03:44:49 +00:00 
			
		
		
		
	Remove forced removal of Multi-Language SRT header
Services needing this done should apply it themselves, e.g. OnMultiplex. A convenience function to do it is available now as `Subtitle.remove_multi_lang_srt_header()`, so you can do e.g., `subtitle.OnMultiplex = remove_multi_lang_srt_header` and it will pass through this function just before muxing.
This commit is contained in:
		
							parent
							
								
									53de34da51
								
							
						
					
					
						commit
						3c1c408ccd
					
				@ -600,11 +600,8 @@ class dl:
 | 
			
		||||
                            subtitle.merge_same_cues(caption_set)
 | 
			
		||||
 | 
			
		||||
                            subtitle_text = writer().write(caption_set)
 | 
			
		||||
                            if sub_format == Subtitle.Codec.SubRip:
 | 
			
		||||
                                # NOW sometimes has this, when it isn't, causing mux problems
 | 
			
		||||
                                subtitle_text = subtitle_text.replace("MULTI-LANGUAGE SRT\n", "")
 | 
			
		||||
 | 
			
		||||
                            subtitle.path.write_text(subtitle_text, encoding="utf8")
 | 
			
		||||
 | 
			
		||||
                            subtitle.codec = sub_format
 | 
			
		||||
                            subtitle.move(subtitle.path.with_suffix(f".{sub_format.value.lower()}"))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user