Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ImmichFrame.Core/Logic/Pool/MemoryAssetsPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@

namespace ImmichFrame.Core.Logic.Pool;

public class MemoryAssetsPool(ImmichApi immichApi, IAccountSettings accountSettings) : CachingApiAssetsPool(new DailyApiCache(), immichApi, accountSettings)

Check warning on line 8 in ImmichFrame.Core/Logic/Pool/MemoryAssetsPool.cs

View workflow job for this annotation

GitHub Actions / test

Parameter 'IAccountSettings accountSettings' is captured into the state of the enclosing type and its value is also passed to the base constructor. The value might be captured by the base class as well.

Check warning on line 8 in ImmichFrame.Core/Logic/Pool/MemoryAssetsPool.cs

View workflow job for this annotation

GitHub Actions / test

Parameter 'ImmichApi immichApi' is captured into the state of the enclosing type and its value is also passed to the base constructor. The value might be captured by the base class as well.

Check warning on line 8 in ImmichFrame.Core/Logic/Pool/MemoryAssetsPool.cs

View workflow job for this annotation

GitHub Actions / test

Parameter 'IAccountSettings accountSettings' is captured into the state of the enclosing type and its value is also passed to the base constructor. The value might be captured by the base class as well.

Check warning on line 8 in ImmichFrame.Core/Logic/Pool/MemoryAssetsPool.cs

View workflow job for this annotation

GitHub Actions / test

Parameter 'ImmichApi immichApi' is captured into the state of the enclosing type and its value is also passed to the base constructor. The value might be captured by the base class as well.

Check warning on line 8 in ImmichFrame.Core/Logic/Pool/MemoryAssetsPool.cs

View workflow job for this annotation

GitHub Actions / test

Parameter 'IAccountSettings accountSettings' is captured into the state of the enclosing type and its value is also passed to the base constructor. The value might be captured by the base class as well.

Check warning on line 8 in ImmichFrame.Core/Logic/Pool/MemoryAssetsPool.cs

View workflow job for this annotation

GitHub Actions / test

Parameter 'ImmichApi immichApi' is captured into the state of the enclosing type and its value is also passed to the base constructor. The value might be captured by the base class as well.

Check warning on line 8 in ImmichFrame.Core/Logic/Pool/MemoryAssetsPool.cs

View workflow job for this annotation

GitHub Actions / test

Parameter 'IAccountSettings accountSettings' is captured into the state of the enclosing type and its value is also passed to the base constructor. The value might be captured by the base class as well.

Check warning on line 8 in ImmichFrame.Core/Logic/Pool/MemoryAssetsPool.cs

View workflow job for this annotation

GitHub Actions / test

Parameter 'ImmichApi immichApi' is captured into the state of the enclosing type and its value is also passed to the base constructor. The value might be captured by the base class as well.
{
protected override async Task<IEnumerable<AssetResponseDto>> LoadAssets(CancellationToken ct = default)
{
var memories = await immichApi.SearchMemoriesAsync(DateTime.Today.ToUniversalTime(), null, null, null, ct);
var searchDate = new DateTimeOffset(DateTime.SpecifyKind(DateTime.Today, DateTimeKind.Utc), TimeSpan.Zero);
var memories = await immichApi.SearchMemoriesAsync(searchDate, null, null, null, ct);

var memoryAssets = new List<AssetResponseDto>();
foreach (var memory in memories)
{
var assets = memory.Assets.ToList();
var yearsAgo = DateTime.Now.Year - memory.Data.Year;
var yearsAgo = searchDate.Year - memory.Data.Year;

if (!accountSettings.ShowVideos)
{
Expand Down
Loading