Fix - Issue with description when the mp4 option is enabled https://github.com/Crunchy-DL/Crunchy-Downloader/issues/73
This commit is contained in:
parent
52369e84dc
commit
29376c59a6
|
@ -61,6 +61,7 @@ public class Merger{
|
|||
} else{
|
||||
metaData.Add($"-disposition:a:{audioIndex} 0");
|
||||
}
|
||||
|
||||
index++;
|
||||
audioIndex++;
|
||||
}
|
||||
|
@ -86,6 +87,7 @@ public class Merger{
|
|||
} else{
|
||||
metaData.Add($"-disposition:s:{sub.i} 0");
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
|
@ -106,7 +108,11 @@ public class Merger{
|
|||
XmlDocument doc = new XmlDocument();
|
||||
doc.Load(options.Description[0].Path);
|
||||
XmlNode? node = doc.SelectSingleNode("//Tag/Simple[Name='DESCRIPTION']/String");
|
||||
args.Add($"-metadata comment=\"{node?.InnerText ?? string.Empty}\"");
|
||||
string description = node?.InnerText
|
||||
.Replace("\\", "\\\\") // Escape backslashes
|
||||
.Replace("\"", "\\\"") // Escape double quotes
|
||||
?? string.Empty;
|
||||
args.Add($"-metadata comment=\"{description}\"");
|
||||
}
|
||||
|
||||
if (options.Options.ffmpeg?.Count > 0){
|
||||
|
|
Loading…
Reference in New Issue