mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-20 22:33:36 +01:00
only update .ass file if contents will be different
This commit is contained in:
parent
f8263b8b69
commit
0934a9ca76
1 changed files with 6 additions and 3 deletions
|
|
@ -865,11 +865,14 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
|
|||
text = await reader.ReadToEndAsync().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
text = text.Replace(",Arial,", ",Arial Unicode MS,");
|
||||
var newText = text.Replace(",Arial,", ",Arial Unicode MS,");
|
||||
|
||||
using (var writer = new StreamWriter(file, false, encoding))
|
||||
if (!string.Equals(text, newText))
|
||||
{
|
||||
writer.Write(text);
|
||||
using (var writer = new StreamWriter(file, false, encoding))
|
||||
{
|
||||
writer.Write(newText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue