mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-25 11:13:39 +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 @@ namespace NzbDrone.Core.Test
|
|||||||
mocker.GetMock<DiskProvider>()
|
mocker.GetMock<DiskProvider>()
|
||||||
.Setup(e => e.GetSize(fileName)).Returns(size).Verifiable();
|
.Setup(e => e.GetSize(fileName)).Returns(size).Verifiable();
|
||||||
|
|
||||||
|
|
||||||
//Act
|
//Act
|
||||||
var result = mocker.Resolve<MediaFileProvider>().ImportFile(fakeSeries, fileName);
|
var result = mocker.Resolve<MediaFileProvider>().ImportFile(fakeSeries, fileName);
|
||||||
|
|
||||||
|
Binary file not shown.
@ -292,7 +292,6 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- 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.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
@ -38,12 +38,12 @@ namespace NzbDrone.Core.Providers
|
|||||||
|
|
||||||
public virtual Episode GetEpisode(int seriesId, int seasonNumber, int episodeNumber)
|
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)
|
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)
|
public virtual IList<Episode> GetEpisodeBySeries(long seriesId)
|
||||||
|
@ -119,7 +119,15 @@ namespace NzbDrone.Core.Providers
|
|||||||
return GetSeries(seriesId.Value);
|
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)
|
public virtual void UpdateSeries(Series series)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user