Skip to content

Commit

Permalink
static topics pk replacement started
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-zhur committed Sep 28, 2024
1 parent f01fdd8 commit c48e1db
Show file tree
Hide file tree
Showing 9 changed files with 1,023 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,23 +105,23 @@ public async Task SaveMessages()
var albums = await _videosDatabase.Albums
.Where(x => x.UploadedAlbum == null)
.Include(x => x.Constraints)
.ThenInclude(x => x.StaticTopic)
.ToListAsync();

var messages = (await _videosDatabase.Mediae
.Where(x => x.StaticMessage != null)
.Where(x => x.StaticMessage!.SelectedType.HasValue && x.StaticMessage.StaticTopicId.HasValue)
.Where(x => x.StaticMessage!.SelectedType.HasValue && x.StaticMessage.StaticTopic != null)
.Select(m => new
{
TopicId = m.StaticMessage!.StaticTopicId,
StaticTopicId = m.StaticMessage!.StaticTopic!.Id,
m.StaticMessage.StaticTopicRootMessageIdOr0,
m.StaticMessage.Width,
m.StaticMessage.Height,
m.StaticMessage.Date,
m.StaticMessage.SelectedType,
m.Id,
})
.ToListAsync())
.ToLookup(x => x.TopicId!.Value);
.ToLookup(x => x.StaticTopicId);

var uploadedItems = await _videosDatabase.UploadedItems
.Where(i => _videosDatabase.InventoryItems.Any(j => j.Id == i.MediaItemId && (j.IsPhoto || j.MediaMetadataVideoStatus == "READY")))
Expand Down
Loading

0 comments on commit c48e1db

Please sign in to comment.