A boatload of Bugs (#3704)
Co-authored-by: Amelia <77553571+Fesaa@users.noreply.github.com>
This commit is contained in:
parent
ea9b7ad0d1
commit
37734554ba
102 changed files with 2051 additions and 1115 deletions
|
|
@ -15,10 +15,12 @@ public interface IMediaErrorRepository
|
|||
{
|
||||
void Attach(MediaError error);
|
||||
void Remove(MediaError error);
|
||||
void Remove(IList<MediaError> errors);
|
||||
Task<MediaError> Find(string filename);
|
||||
IEnumerable<MediaErrorDto> GetAllErrorDtosAsync();
|
||||
Task<bool> ExistsAsync(MediaError error);
|
||||
Task DeleteAll();
|
||||
Task<List<MediaError>> GetAllErrorsAsync(IList<string> comments);
|
||||
}
|
||||
|
||||
public class MediaErrorRepository : IMediaErrorRepository
|
||||
|
|
@ -44,6 +46,11 @@ public class MediaErrorRepository : IMediaErrorRepository
|
|||
_context.MediaError.Remove(error);
|
||||
}
|
||||
|
||||
public void Remove(IList<MediaError> errors)
|
||||
{
|
||||
_context.MediaError.RemoveRange(errors);
|
||||
}
|
||||
|
||||
public Task<MediaError?> Find(string filename)
|
||||
{
|
||||
return _context.MediaError.Where(e => e.FilePath == filename).SingleOrDefaultAsync();
|
||||
|
|
@ -71,4 +78,11 @@ public class MediaErrorRepository : IMediaErrorRepository
|
|||
_context.MediaError.RemoveRange(await _context.MediaError.ToListAsync());
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
|
||||
public Task<List<MediaError>> GetAllErrorsAsync(IList<string> comments)
|
||||
{
|
||||
return _context.MediaError
|
||||
.Where(m => comments.Contains(m.Comment))
|
||||
.ToListAsync();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue