video playback and timeline playhead

This commit is contained in:
2026-03-05 19:18:45 -05:00
parent 20874ecff7
commit 78651ca58d
8 changed files with 227 additions and 37 deletions

View File

@@ -1,5 +1,7 @@
using AZKiServer.Models;
using MaybeError;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
using MongoDB.Driver;
@@ -39,6 +41,11 @@ public class MediaService(IMongoDatabase db)
return await _entries.Find(filter).ToListAsync(cancellationToken);
}
public async Task<MediaEntry?> GetEntryAsync(ObjectId id, CancellationToken cancellationToken = default)
{
return await _entries.Find(e => e.Id == id).FirstOrDefaultAsync(cancellationToken);
}
public async Task DeleteAllEntriesAsync(IEnumerable<ObjectId> ids, CancellationToken cancellationToken = default)
{
await _entries.DeleteManyAsync(e => ids.Contains(e.Id), cancellationToken);