New: Added Network to Series Grid.

Fixed logging for RetentionSpecification.
This commit is contained in:
Mark McDowall 2012-02-28 23:20:40 -08:00
parent 5eed576e42
commit 4d918ff683
8 changed files with 27 additions and 4 deletions

View File

@ -0,0 +1,15 @@
using System.Data;
using Migrator.Framework;
namespace NzbDrone.Core.Datastore.Migrations
{
[Migration(20120228)]
public class Migration20120228 : NzbDroneMigration
{
protected override void MainDbUpgrade()
{
Database.AddColumn("Series", "Network", DbType.String, ColumnProperty.Null);
}
}
}

View File

@ -222,6 +222,7 @@
<Compile Include="Datastore\MigrationLogger.cs" />
<Compile Include="Datastore\MigrationsHelper.cs" />
<Compile Include="Datastore\CustomeMapper.cs" />
<Compile Include="Datastore\Migrations\Migration20120228.cs" />
<Compile Include="Datastore\Migrations\Migration20120227.cs" />
<Compile Include="Datastore\Migrations\Migration20120220.cs" />
<Compile Include="Datastore\Migrations\Migration20120123.cs" />

View File

@ -25,7 +25,7 @@ namespace NzbDrone.Core.Providers.DecisionEngine
logger.Trace("Checking if report meets retention requirements. {0}", subject.Age);
if (_configProvider.Retention > 0 && subject.Age > _configProvider.Retention)
{
logger.Trace("Quality {0} rejected by user's retention limit", subject.Age);
logger.Trace("Report age: {0} rejected by user's retention limit", subject.Age);
return false;
}

View File

@ -46,7 +46,7 @@ namespace NzbDrone.Core.Providers
{
var series = _database
.Fetch<Series, QualityProfile>(@"SELECT Series.SeriesId, Series.Title, Series.CleanTitle, Series.Status, Series.Overview, Series.AirsDayOfWeek,Series.AirTimes,
Series.Language, Series.Path, Series.Monitored, Series.QualityProfileId, Series.SeasonFolder, Series.BacklogSetting,
Series.Language, Series.Path, Series.Monitored, Series.QualityProfileId, Series.SeasonFolder, Series.BacklogSetting, Series.Network,
SUM(CASE WHEN Ignored = 0 AND Airdate <= @0 THEN 1 ELSE 0 END) AS EpisodeCount,
SUM(CASE WHEN Episodes.Ignored = 0 AND Episodes.EpisodeFileId > 0 AND Episodes.AirDate <= @0 THEN 1 ELSE 0 END) as EpisodeFileCount,
MAX(Episodes.SeasonNumber) as SeasonCount, MIN(CASE WHEN AirDate < @0 OR Ignored = 1 THEN NULL ELSE AirDate END) as NextAiring,
@ -55,8 +55,8 @@ namespace NzbDrone.Core.Providers
INNER JOIN QualityProfiles ON Series.QualityProfileId = QualityProfiles.QualityProfileId
LEFT JOIN Episodes ON Series.SeriesId = Episodes.SeriesId
WHERE Series.LastInfoSync IS NOT NULL
GROUP BY Series.SeriesId, Series.Title, Series.CleanTitle, Series.Status, Series.Overview, Series.AirsDayOfWeek,Series.AirTimes,
Series.Language, Series.Path, Series.Monitored, Series.QualityProfileId, Series.SeasonFolder, Series.BacklogSetting,
GROUP BY Series.SeriesId, Series.Title, Series.CleanTitle, Series.Status, Series.Overview, Series.AirsDayOfWeek, Series.AirTimes,
Series.Language, Series.Path, Series.Monitored, Series.QualityProfileId, Series.SeasonFolder, Series.BacklogSetting, Series.Network,
QualityProfiles.QualityProfileId, QualityProfiles.Name, QualityProfiles.Cutoff, QualityProfiles.SonicAllowed", DateTime.Today);
return series;
@ -97,6 +97,7 @@ namespace NzbDrone.Core.Providers
series.LastInfoSync = DateTime.Now;
series.Runtime = (int)tvDbSeries.Runtime;
series.BannerUrl = tvDbSeries.BannerPath;
series.Network = tvDbSeries.Network;
UpdateSeries(series);
return series;

View File

@ -46,6 +46,8 @@ namespace NzbDrone.Core.Repository
public BacklogSettingType BacklogSetting { get; set; }
public string Network { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this <see cref="Series"/> is hidden.
/// </summary>

View File

@ -193,6 +193,7 @@ namespace NzbDrone.Web.Controllers
Path = s.Path,
QualityProfileId = s.QualityProfileId,
QualityProfileName = s.QualityProfile.Name,
Network = s.Network,
SeasonFolder = s.SeasonFolder,
BacklogSetting = (int)s.BacklogSetting,
Status = s.Status,

View File

@ -26,6 +26,7 @@ namespace NzbDrone.Web.Models
public string NextAiring { get; set; }
public string NextAiringSorter { get; set; }
public string Details { get; set; }
public string Network { get; set; }
public IList<int> Seasons { get; set; }

View File

@ -88,6 +88,7 @@
<th style="width: auto">Title</th>
<th style="width: 100px">Seasons</th>
<th style="width: 100px">Quality</th>
<th style="width: 100px">Network</th>
<th style="width: 140px">Next Airing</th>
<th style="width: 100px">Episodes</th>
@ -170,6 +171,7 @@
}, //Title
{ sWidth: '100px', "mDataProp": "SeasonsCount", "bSortable": false }, //Seasons
{ sWidth: '100px', "mDataProp": "QualityProfileName" }, //Quality
{ sWidth: '100px', "mDataProp": "Network" }, //Network
{ sWidth: '120px', "mDataProp": function (source, type, val) {
// 'display' and 'filter' use our fancy naming
if (type === 'display' || type === 'filter') {