Fix some warnings

This commit is contained in:
Bond_009
2021-09-03 18:46:34 +02:00
parent fb5385f1df
commit 637e86478f
31 changed files with 366 additions and 451 deletions

View File

@@ -97,8 +97,7 @@ namespace MediaBrowser.Controller.Entities
{
try
{
var result = XmlSerializer.DeserializeFromFile(typeof(LibraryOptions), GetLibraryOptionsPath(path)) as LibraryOptions;
if (result == null)
if (XmlSerializer.DeserializeFromFile(typeof(LibraryOptions), GetLibraryOptionsPath(path)) is not LibraryOptions result)
{
return new LibraryOptions();
}