mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-10 23:29:53 +02:00
Fixed EpisodeProvider queries with multiple terms.
SeriesProvider.FindSeries will now return the QualityProfile when a series is found.
This commit is contained in:
parent
85d5b07c67
commit
d6920ee8ea
@ -106,7 +106,6 @@ public void import_new_daily_file()
|
||||
mocker.GetMock<DiskProvider>()
|
||||
.Setup(e => e.GetSize(fileName)).Returns(size).Verifiable();
|
||||
|
||||
|
||||
//Act
|
||||
var result = mocker.Resolve<MediaFileProvider>().ImportFile(fakeSeries, fileName);
|
||||
|
||||
|
Binary file not shown.
@ -292,7 +292,6 @@
|
||||
<ItemGroup>
|
||||
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
@ -38,12 +38,12 @@ public virtual Episode GetEpisode(long id)
|
||||
|
||||
public virtual Episode GetEpisode(int seriesId, int seasonNumber, int episodeNumber)
|
||||
{
|
||||
return _database.Single<Episode>("WHERE SeriesId = @0 AND SeasonNumber = @2 AND EpisodeNumber = @3", seriesId, seasonNumber, episodeNumber);
|
||||
return _database.Single<Episode>("WHERE SeriesId = @0 AND SeasonNumber = @1 AND EpisodeNumber = @2", seriesId, seasonNumber, episodeNumber);
|
||||
}
|
||||
|
||||
public virtual Episode GetEpisode(int seriesId, DateTime date)
|
||||
{
|
||||
return _database.Single<Episode>("WHERE SeriesId = @0 AND AirDate = @2", seriesId, date.Date);
|
||||
return _database.Single<Episode>("WHERE SeriesId = @0 AND AirDate = @1", seriesId, date.Date);
|
||||
}
|
||||
|
||||
public virtual IList<Episode> GetEpisodeBySeries(long seriesId)
|
||||
|
@ -119,7 +119,15 @@ public virtual Series FindSeries(string title)
|
||||
return GetSeries(seriesId.Value);
|
||||
}
|
||||
|
||||
return _database.FirstOrDefault<Series>("WHERE CleanTitle = @0", normalizeTitle);
|
||||
var series = _database.FirstOrDefault<Series>("WHERE CleanTitle = @0", normalizeTitle);
|
||||
|
||||
if (series != null)
|
||||
{
|
||||
series.QualityProfile = _qualityProvider.Get(series.QualityProfileId);
|
||||
return series;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public virtual void UpdateSeries(Series series)
|
||||
|
Loading…
Reference in New Issue
Block a user