mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 06:18:28 +01:00
Remove redundant 'else' keywords
This commit is contained in:
@@ -1309,7 +1309,8 @@ namespace Emby.Server.Implementations.Data
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (type == typeof(UserRootFolder))
|
||||
|
||||
if (type == typeof(UserRootFolder))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1319,55 +1320,68 @@ namespace Emby.Server.Implementations.Data
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (type == typeof(MusicArtist))
|
||||
|
||||
if (type == typeof(MusicArtist))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (type == typeof(Person))
|
||||
|
||||
if (type == typeof(Person))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (type == typeof(MusicGenre))
|
||||
|
||||
if (type == typeof(MusicGenre))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (type == typeof(Genre))
|
||||
|
||||
if (type == typeof(Genre))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (type == typeof(Studio))
|
||||
|
||||
if (type == typeof(Studio))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (type == typeof(PlaylistsFolder))
|
||||
|
||||
if (type == typeof(PlaylistsFolder))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (type == typeof(PhotoAlbum))
|
||||
|
||||
if (type == typeof(PhotoAlbum))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (type == typeof(Year))
|
||||
|
||||
if (type == typeof(Year))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (type == typeof(Book))
|
||||
|
||||
if (type == typeof(Book))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (type == typeof(LiveTvProgram))
|
||||
|
||||
if (type == typeof(LiveTvProgram))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (type == typeof(AudioBook))
|
||||
|
||||
if (type == typeof(AudioBook))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (type == typeof(Audio))
|
||||
|
||||
if (type == typeof(Audio))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (type == typeof(MusicAlbum))
|
||||
|
||||
if (type == typeof(MusicAlbum))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,8 @@ namespace Emby.Server.Implementations.Library.Resolvers
|
||||
Set3DFormat(videoTmp);
|
||||
return videoTmp;
|
||||
}
|
||||
else if (IsBluRayDirectory(filename))
|
||||
|
||||
if (IsBluRayDirectory(filename))
|
||||
{
|
||||
var videoTmp = new TVideoType
|
||||
{
|
||||
|
||||
@@ -627,10 +627,8 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||
_timerProvider.Update(existingTimer);
|
||||
return Task.FromResult(existingTimer.Id);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new ArgumentException("A scheduled recording already exists for this program.");
|
||||
}
|
||||
|
||||
throw new ArgumentException("A scheduled recording already exists for this program.");
|
||||
}
|
||||
|
||||
info.Id = Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture);
|
||||
|
||||
@@ -415,14 +415,13 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else if (uri.IndexOf("http", StringComparison.OrdinalIgnoreCase) != -1)
|
||||
|
||||
if (uri.IndexOf("http", StringComparison.OrdinalIgnoreCase) != -1)
|
||||
{
|
||||
return uri;
|
||||
}
|
||||
else
|
||||
{
|
||||
return apiUrl + "/image/" + uri + "?token=" + token;
|
||||
}
|
||||
|
||||
return apiUrl + "/image/" + uri + "?token=" + token;
|
||||
}
|
||||
|
||||
private static double GetAspectRatio(ImageDataDto i)
|
||||
|
||||
@@ -620,10 +620,8 @@ namespace Emby.Server.Implementations.SyncPlay
|
||||
RestartCurrentItem();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -637,10 +635,8 @@ namespace Emby.Server.Implementations.SyncPlay
|
||||
RestartCurrentItem();
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -339,10 +339,8 @@ namespace Emby.Server.Implementations.SyncPlay
|
||||
{
|
||||
return sessionsCounter > 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user