video playback and timeline playhead
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user