mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-05 23:38:45 +01:00
Fix multiple mistakes and warnings
This commit is contained in:
@@ -57,7 +57,6 @@ namespace Emby.Server.Implementations.Library
|
||||
}
|
||||
|
||||
var filename = fileInfo.Name;
|
||||
var path = fileInfo.FullName;
|
||||
|
||||
// Ignore hidden files on UNIX
|
||||
if (Environment.OSVersion.Platform != PlatformID.Win32NT
|
||||
|
||||
@@ -273,14 +273,12 @@ namespace Emby.Server.Implementations.Library
|
||||
var user = Users.FirstOrDefault(i => string.Equals(username, i.Name, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
var success = false;
|
||||
string updatedUsername = null;
|
||||
IAuthenticationProvider authenticationProvider = null;
|
||||
|
||||
if (user != null)
|
||||
{
|
||||
var authResult = await AuthenticateLocalUser(username, password, hashedPassword, user, remoteEndPoint).ConfigureAwait(false);
|
||||
authenticationProvider = authResult.authenticationProvider;
|
||||
updatedUsername = authResult.username;
|
||||
success = authResult.success;
|
||||
}
|
||||
else
|
||||
@@ -288,7 +286,7 @@ namespace Emby.Server.Implementations.Library
|
||||
// user is null
|
||||
var authResult = await AuthenticateLocalUser(username, password, hashedPassword, null, remoteEndPoint).ConfigureAwait(false);
|
||||
authenticationProvider = authResult.authenticationProvider;
|
||||
updatedUsername = authResult.username;
|
||||
string updatedUsername = authResult.username;
|
||||
success = authResult.success;
|
||||
|
||||
if (success
|
||||
|
||||
@@ -236,7 +236,7 @@ namespace Emby.Server.Implementations.Library
|
||||
if (!parentId.Equals(Guid.Empty))
|
||||
{
|
||||
var parentItem = _libraryManager.GetItemById(parentId);
|
||||
if (parentItem is Channel parentItemChannel)
|
||||
if (parentItem is Channel)
|
||||
{
|
||||
return _channelManager.GetLatestChannelItemsInternal(
|
||||
new InternalItemsQuery(user)
|
||||
@@ -248,7 +248,7 @@ namespace Emby.Server.Implementations.Library
|
||||
IncludeItemTypes = request.IncludeItemTypes,
|
||||
EnableTotalRecordCount = false
|
||||
},
|
||||
CancellationToken.None).Result.Items;
|
||||
CancellationToken.None).GetAwaiter().GetResult().Items;
|
||||
}
|
||||
|
||||
if (parentItem is Folder parent)
|
||||
|
||||
Reference in New Issue
Block a user