mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-22 16:54:46 +03:00
remove async when there's nothing to await
This commit is contained in:
@@ -132,8 +132,7 @@ namespace Emby.Server.Implementations.Data
|
||||
/// <summary>
|
||||
/// Opens the connection to the database
|
||||
/// </summary>
|
||||
/// <returns>Task.</returns>
|
||||
public async Task Initialize(SqliteUserDataRepository userDataRepo)
|
||||
public void Initialize(SqliteUserDataRepository userDataRepo)
|
||||
{
|
||||
using (var connection = CreateConnection())
|
||||
{
|
||||
@@ -600,16 +599,15 @@ namespace Emby.Server.Implementations.Data
|
||||
/// </summary>
|
||||
/// <param name="item">The item.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="System.ArgumentNullException">item</exception>
|
||||
public Task SaveItem(BaseItem item, CancellationToken cancellationToken)
|
||||
public void SaveItem(BaseItem item, CancellationToken cancellationToken)
|
||||
{
|
||||
if (item == null)
|
||||
{
|
||||
throw new ArgumentNullException("item");
|
||||
}
|
||||
|
||||
return SaveItems(new List<BaseItem> { item }, cancellationToken);
|
||||
SaveItems(new List<BaseItem> { item }, cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -617,13 +615,12 @@ namespace Emby.Server.Implementations.Data
|
||||
/// </summary>
|
||||
/// <param name="items">The items.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="System.ArgumentNullException">
|
||||
/// items
|
||||
/// or
|
||||
/// cancellationToken
|
||||
/// </exception>
|
||||
public async Task SaveItems(List<BaseItem> items, CancellationToken cancellationToken)
|
||||
public void SaveItems(List<BaseItem> items, CancellationToken cancellationToken)
|
||||
{
|
||||
if (items == null)
|
||||
{
|
||||
@@ -1959,22 +1956,18 @@ namespace Emby.Server.Implementations.Data
|
||||
/// Gets the critic reviews.
|
||||
/// </summary>
|
||||
/// <param name="itemId">The item id.</param>
|
||||
/// <returns>Task{IEnumerable{ItemReview}}.</returns>
|
||||
public List<ItemReview> GetCriticReviews(Guid itemId)
|
||||
{
|
||||
return new List<ItemReview>();
|
||||
}
|
||||
|
||||
private readonly Task _cachedTask = Task.FromResult(true);
|
||||
/// <summary>
|
||||
/// Saves the critic reviews.
|
||||
/// </summary>
|
||||
/// <param name="itemId">The item id.</param>
|
||||
/// <param name="criticReviews">The critic reviews.</param>
|
||||
/// <returns>Task.</returns>
|
||||
public Task SaveCriticReviews(Guid itemId, IEnumerable<ItemReview> criticReviews)
|
||||
public void SaveCriticReviews(Guid itemId, IEnumerable<ItemReview> criticReviews)
|
||||
{
|
||||
return _cachedTask;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2079,7 +2072,7 @@ namespace Emby.Server.Implementations.Data
|
||||
/// <summary>
|
||||
/// Saves the chapters.
|
||||
/// </summary>
|
||||
public async Task SaveChapters(Guid id, List<ChapterInfo> chapters)
|
||||
public void SaveChapters(Guid id, List<ChapterInfo> chapters)
|
||||
{
|
||||
CheckDisposed();
|
||||
|
||||
@@ -4654,12 +4647,12 @@ namespace Emby.Server.Implementations.Data
|
||||
typeof(AggregateFolder)
|
||||
};
|
||||
|
||||
public async Task UpdateInheritedValues(CancellationToken cancellationToken)
|
||||
public void UpdateInheritedValues(CancellationToken cancellationToken)
|
||||
{
|
||||
await UpdateInheritedTags(cancellationToken).ConfigureAwait(false);
|
||||
UpdateInheritedTags(cancellationToken);
|
||||
}
|
||||
|
||||
private async Task UpdateInheritedTags(CancellationToken cancellationToken)
|
||||
private void UpdateInheritedTags(CancellationToken cancellationToken)
|
||||
{
|
||||
var newValues = new List<Tuple<Guid, string[]>>();
|
||||
|
||||
@@ -4754,7 +4747,7 @@ limit 100";
|
||||
return new[] { value }.Where(IsValidType);
|
||||
}
|
||||
|
||||
public async Task DeleteItem(Guid id, CancellationToken cancellationToken)
|
||||
public void DeleteItem(Guid id, CancellationToken cancellationToken)
|
||||
{
|
||||
if (id == Guid.Empty)
|
||||
{
|
||||
@@ -5485,7 +5478,7 @@ limit 100";
|
||||
}
|
||||
}
|
||||
|
||||
public async Task UpdatePeople(Guid itemId, List<PersonInfo> people)
|
||||
public void UpdatePeople(Guid itemId, List<PersonInfo> people)
|
||||
{
|
||||
if (itemId == Guid.Empty)
|
||||
{
|
||||
@@ -5615,7 +5608,7 @@ limit 100";
|
||||
}
|
||||
}
|
||||
|
||||
public async Task SaveMediaStreams(Guid id, List<MediaStream> streams, CancellationToken cancellationToken)
|
||||
public void SaveMediaStreams(Guid id, List<MediaStream> streams, CancellationToken cancellationToken)
|
||||
{
|
||||
CheckDisposed();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user