only update .ass file if contents will be different

pull/702/head
Luke Pulverenti 12 years ago
parent f8263b8b69
commit 0934a9ca76

@ -865,11 +865,14 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
text = await reader.ReadToEndAsync().ConfigureAwait(false); text = await reader.ReadToEndAsync().ConfigureAwait(false);
} }
text = text.Replace(",Arial,", ",Arial Unicode MS,"); var newText = text.Replace(",Arial,", ",Arial Unicode MS,");
if (!string.Equals(text, newText))
{
using (var writer = new StreamWriter(file, false, encoding)) using (var writer = new StreamWriter(file, false, encoding))
{ {
writer.Write(text); writer.Write(newText);
}
} }
} }

Loading…
Cancel
Save