mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-13 16:43:58 -07:00
cleaned up scene mapping code.
This commit is contained in:
parent
c1fba9093d
commit
48880e4964
25 changed files with 222 additions and 319 deletions
|
@ -1,31 +0,0 @@
|
|||
using System.Data;
|
||||
using System.Linq;
|
||||
using NzbDrone.Core.Datastore;
|
||||
|
||||
namespace NzbDrone.Core.ReferenceData
|
||||
{
|
||||
public interface ISceneMappingRepository : IBasicRepository<SceneMapping>
|
||||
{
|
||||
SceneMapping FindByTvdbId(int tvdbId);
|
||||
SceneMapping FindByCleanTitle(string cleanTitle);
|
||||
|
||||
}
|
||||
|
||||
public class SceneMappingRepository : BasicRepository<SceneMapping>, ISceneMappingRepository
|
||||
{
|
||||
public SceneMappingRepository(IDatabase database)
|
||||
: base(database)
|
||||
{
|
||||
}
|
||||
|
||||
public SceneMapping FindByTvdbId(int tvdbId)
|
||||
{
|
||||
return Query.SingleOrDefault(c => c.TvdbId == tvdbId);
|
||||
}
|
||||
|
||||
public SceneMapping FindByCleanTitle(string cleanTitle)
|
||||
{
|
||||
return Query.SingleOrDefault(c => c.CleanTitle == cleanTitle);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue