remove unused code [no ci]
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using ErsatzTV.Core.Domain;
|
||||
@@ -12,14 +11,10 @@ namespace ErsatzTV.Infrastructure.Data.Repositories
|
||||
{
|
||||
public class MediaItemRepository : IMediaItemRepository
|
||||
{
|
||||
private readonly IDbConnection _dbConnection;
|
||||
private readonly IDbContextFactory<TvContext> _dbContextFactory;
|
||||
|
||||
public MediaItemRepository(IDbContextFactory<TvContext> dbContextFactory, IDbConnection dbConnection)
|
||||
{
|
||||
public MediaItemRepository(IDbContextFactory<TvContext> dbContextFactory) =>
|
||||
_dbContextFactory = dbContextFactory;
|
||||
_dbConnection = dbConnection;
|
||||
}
|
||||
|
||||
public async Task<Option<MediaItem>> Get(int id)
|
||||
{
|
||||
@@ -37,27 +32,6 @@ namespace ErsatzTV.Infrastructure.Data.Repositories
|
||||
return await context.MediaItems.ToListAsync();
|
||||
}
|
||||
|
||||
public Task<List<MediaItem>> Search(string searchString) =>
|
||||
// TODO: fix this when we need to search
|
||||
// IQueryable<TelevisionEpisodeMediaItem> episodeData =
|
||||
// from c in _dbContext.TelevisionEpisodeMediaItems.Include(c => c.LibraryPath) select c;
|
||||
//
|
||||
// if (!string.IsNullOrEmpty(searchString))
|
||||
// {
|
||||
// episodeData = episodeData.Where(c => EF.Functions.Like(c.Metadata.Title, $"%{searchString}%"));
|
||||
// }
|
||||
//
|
||||
// IQueryable<Movie> movieData =
|
||||
// from c in _dbContext.Movies.Include(c => c.LibraryPath) select c;
|
||||
//
|
||||
// // if (!string.IsNullOrEmpty(searchString))
|
||||
// // {
|
||||
// // movieData = movieData.Where(c => EF.Functions.Like(c.Metadata.Title, $"%{searchString}%"));
|
||||
// // }
|
||||
//
|
||||
// return episodeData.OfType<MediaItem>().Concat(movieData.OfType<MediaItem>()).ToListAsync();
|
||||
new List<MediaItem>().AsTask();
|
||||
|
||||
public async Task<bool> Update(MediaItem mediaItem)
|
||||
{
|
||||
await using TvContext context = _dbContextFactory.CreateDbContext();
|
||||
|
||||
Reference in New Issue
Block a user