You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Radarr/NzbDrone.Core/DataAugmentation/Scene/SceneMappingRepository.cs

31 lines
905 B

12 years ago
using System.Linq;
using NzbDrone.Common.Messaging;
12 years ago
using NzbDrone.Core.Datastore;
namespace NzbDrone.Core.DataAugmentation.Scene
12 years ago
{
public interface ISceneMappingRepository : IBasicRepository<SceneMapping>
{
SceneMapping FindByTvdbId(int tvdbId);
SceneMapping FindByCleanTitle(string cleanTitle);
}
public class SceneMappingRepository : BasicRepository<SceneMapping>, ISceneMappingRepository
{
public SceneMappingRepository(IDatabase database, IMessageAggregator messageAggregator)
: base(database, messageAggregator)
12 years ago
{
}
public SceneMapping FindByTvdbId(int tvdbId)
{
return Query.SingleOrDefault(c => c.TvdbId == tvdbId);
12 years ago
}
public SceneMapping FindByCleanTitle(string cleanTitle)
{
return Query.SingleOrDefault(c => c.CleanTitle == cleanTitle);
12 years ago
}
}
}