mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
Resync'd UI and API
This commit is contained in:
parent
c3214a2e88
commit
000b7bf9e0
@ -52,7 +52,7 @@ private List<SeriesResource> AllSeries()
|
||||
|
||||
s.EpisodeCount = stats.EpisodeCount;
|
||||
s.EpisodeFileCount = stats.EpisodeFileCount;
|
||||
s.SeasonsCount = stats.NumberOfSeasons;
|
||||
s.SeasonCount = stats.SeasonCount;
|
||||
s.NextAiring = stats.NextAiring;
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ public class SeriesResource : RestResource
|
||||
|
||||
//View Only
|
||||
public String Title { get; set; }
|
||||
public Int32 SeasonsCount { get; set; }
|
||||
public Int32 SeasonCount { get; set; }
|
||||
public Int32 EpisodeCount { get; set; }
|
||||
public Int32 EpisodeFileCount { get; set; }
|
||||
public SeriesStatusType Status { get; set; }
|
||||
|
@ -6,7 +6,7 @@ namespace NzbDrone.Core.SeriesStats
|
||||
public class SeriesStatistics : ResultSet
|
||||
{
|
||||
public int SeriesId { get; set; }
|
||||
public int NumberOfSeasons { get; set; }
|
||||
public int SeasonCount { get; set; }
|
||||
public string NextAiringString { get; set; }
|
||||
public int EpisodeFileCount { get; set; }
|
||||
public int EpisodeCount { get; set; }
|
||||
|
@ -27,7 +27,7 @@ public List<SeriesStatistics> SeriesStatistics()
|
||||
SeriesId,
|
||||
SUM(CASE WHEN Ignored = 0 AND Airdate <= @currentDate THEN 1 ELSE 0 END) AS EpisodeCount,
|
||||
SUM(CASE WHEN Ignored = 0 AND Episodes.EpisodeFileId > 0 AND AirDate <= @currentDate THEN 1 ELSE 0 END) as EpisodeFileCount,
|
||||
MAX(Episodes.SeasonNumber) as NumberOfSeasons,
|
||||
MAX(Episodes.SeasonNumber) as SeasonCount,
|
||||
MIN(CASE WHEN AirDate < @currentDate THEN NULL ELSE AirDate END) as NextAiringString
|
||||
FROM Episodes
|
||||
GROUP BY SeriesId";
|
||||
|
@ -29,12 +29,12 @@
|
||||
{{#if bestDateString}}
|
||||
<span class="label">{{bestDateString}}</span>
|
||||
{{else}}
|
||||
<span class="label label-inverse">{{status}}</span>
|
||||
<span class="label label-inverse">{{statusText}}</span>
|
||||
{{/if}}
|
||||
<span class="label label-info">Season {{numberOfSeasons}}</span>
|
||||
<span class="label label-info">Season {{seasonCount}}</span>
|
||||
{{else}}
|
||||
<span class="label label-important">{{status}}</span>
|
||||
<span class="label label-info">{{numberOfSeasons}} Seasons</span>
|
||||
<span class="label label-important">{{statusText}}</span>
|
||||
<span class="label label-info">{{seasonCount}} Seasons</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="span2">
|
||||
|
@ -35,11 +35,18 @@
|
||||
return "http://trakt.tv/show/" + this.get('titleSlug');
|
||||
},
|
||||
isContinuing : function () {
|
||||
if (this.get('status') === 'Continuing'){
|
||||
if (this.get('status') === 0){
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
statusText: function () {
|
||||
if (this.get('status') === 0) {
|
||||
return 'Continuing';
|
||||
}
|
||||
|
||||
return 'Ended';
|
||||
}
|
||||
},
|
||||
|
||||
@ -48,7 +55,8 @@
|
||||
episodeCount : 0,
|
||||
qualityProfiles : qualityProfileCollection,
|
||||
rootFolders : rootFolders,
|
||||
isExisting : false
|
||||
isExisting : false,
|
||||
status: 0
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user