rework emby collection scanning (#1205)

* optimize emby collection scan frequency

* add button to sync emby collections

* update changelog

* fix scanning; add progress indicator
This commit is contained in:
Jason Dove
2023-03-11 22:29:10 -06:00
committed by GitHub
parent 35445e2b3d
commit 78745de0ca
21 changed files with 4817 additions and 28 deletions
@@ -865,4 +865,12 @@ public class MediaSourceRepository : IMediaSourceRepository
return deletedMediaIds;
}
public async Task<Unit> UpdateLastScan(EmbyMediaSource embyMediaSource)
{
await using TvContext dbContext = await _dbContextFactory.CreateDbContextAsync();
return await dbContext.Connection.ExecuteAsync(
"UPDATE EmbyMediaSource SET LastCollectionsScan = @LastCollectionsScan WHERE Id = @Id",
new { embyMediaSource.LastCollectionsScan, embyMediaSource.Id }).ToUnit();
}
}