mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
* Abstract media servers content into interfaces * Media server entities into abstract classes * Abstract media server content repository * First pass at newsletter refactoring * Minor code clean up * Attempt at abstracting repositories (WIP) * Fixed cast issue * Corrected the other properties * A step towards newsletter refactoring * Clean up leftovers * Fix broken episodes db interaction * Save absolute URL for Plex content Let's be consistent with Emby and Jellyfin * Fix broken integration with Plex libraries * Fix error when multiple media servers configured * Fix newsletter being sent if no movies or episodes * Fix broken tests * Remove unneccesary logs * Expose stored media server URL No need to recalculate it + Plex URL was broken due to an earlier change * Remove unused variable * Remove obsolete tests URLs are now fetched from database directly * Retro-compatibility for Plex content URL Solves URL for media synced before absolute URL was saved in PlexServerContent * chore: added some obsoletes * fix: removed the unsub link when not present Co-authored-by: tidusjar <tidusjar@gmail.com>
29 lines
No EOL
954 B
C#
29 lines
No EOL
954 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Linq.Expressions;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Query;
|
|
using Ombi.Store.Entities;
|
|
|
|
namespace Ombi.Store.Repository
|
|
{
|
|
public interface IExternalRepository<T> where T : IEntity
|
|
{
|
|
Task<T> Find(object key);
|
|
IQueryable<T> GetAll();
|
|
Task<T> FirstOrDefaultAsync(Expression<Func<T, bool>> predicate);
|
|
Task AddRange(IEnumerable<T> content, bool save = true);
|
|
Task<T> Add(T content);
|
|
Task DeleteRange(IEnumerable<T> req);
|
|
Task Delete(T request);
|
|
Task<int> SaveChangesAsync();
|
|
|
|
IIncludableQueryable<TEntity, TProperty> Include<TEntity, TProperty>(
|
|
IQueryable<TEntity> source, Expression<Func<TEntity, TProperty>> navigationPropertyPath)
|
|
where TEntity : class;
|
|
|
|
Task ExecuteSql(string sql);
|
|
}
|
|
} |