diff --git a/frontend/src/Series/Index/Table/SeriesIndexHeader.css b/frontend/src/Series/Index/Table/SeriesIndexHeader.css
index 6781ef951..ce9f0f6ed 100644
--- a/frontend/src/Series/Index/Table/SeriesIndexHeader.css
+++ b/frontend/src/Series/Index/Table/SeriesIndexHeader.css
@@ -37,6 +37,7 @@
flex: 1 0 125px;
}
+.releaseGroups,
.nextAiring,
.previousAiring,
.added,
diff --git a/frontend/src/Series/Index/Table/SeriesIndexRow.css b/frontend/src/Series/Index/Table/SeriesIndexRow.css
index c67a02479..df4b4b9ab 100644
--- a/frontend/src/Series/Index/Table/SeriesIndexRow.css
+++ b/frontend/src/Series/Index/Table/SeriesIndexRow.css
@@ -73,6 +73,7 @@
flex: 1 0 125px;
}
+.releaseGroups,
.nextAiring,
.previousAiring,
.added,
diff --git a/frontend/src/Series/Index/Table/SeriesIndexRow.js b/frontend/src/Series/Index/Table/SeriesIndexRow.js
index e6161ec9f..2732030ed 100644
--- a/frontend/src/Series/Index/Table/SeriesIndexRow.js
+++ b/frontend/src/Series/Index/Table/SeriesIndexRow.js
@@ -114,6 +114,7 @@ class SeriesIndexRow extends Component {
episodeCount,
episodeFileCount,
totalEpisodeCount,
+ releaseGroups,
sizeOnDisk
} = statistics;
@@ -413,6 +414,24 @@ class SeriesIndexRow extends Component {
);
}
+ if (name === 'releaseGroups') {
+ const joinedReleaseGroups = releaseGroups.join(', ');
+ const truncatedReleaseGroups = releaseGroups.length > 3 ?
+ `${releaseGroups.slice(0, 3).join(', ')}...` :
+ joinedReleaseGroups;
+
+ return (
+
+
+ {truncatedReleaseGroups}
+
+
+ );
+ }
+
if (name === 'tags') {
return (
ReleaseGroups
+ {
+ get
+ {
+ var releasegroups = new List();
+
+ if (ReleaseGroupsString.IsNotNullOrWhiteSpace())
+ {
+ releasegroups = ReleaseGroupsString
+ .Split('|')
+ .Distinct()
+ .Where(rg => rg.IsNotNullOrWhiteSpace())
+ .OrderBy(rg => rg)
+ .ToList();
+ }
+
+ return releasegroups;
+ }
+ }
}
}
diff --git a/src/NzbDrone.Core/SeriesStats/SeriesStatistics.cs b/src/NzbDrone.Core/SeriesStats/SeriesStatistics.cs
index 363d1f346..44f477c0b 100644
--- a/src/NzbDrone.Core/SeriesStats/SeriesStatistics.cs
+++ b/src/NzbDrone.Core/SeriesStats/SeriesStatistics.cs
@@ -13,6 +13,7 @@ namespace NzbDrone.Core.SeriesStats
public int EpisodeCount { get; set; }
public int TotalEpisodeCount { get; set; }
public long SizeOnDisk { get; set; }
+ public List ReleaseGroups { get; set; }
public List SeasonStatistics { get; set; }
public DateTime? NextAiring
diff --git a/src/NzbDrone.Core/SeriesStats/SeriesStatisticsRepository.cs b/src/NzbDrone.Core/SeriesStats/SeriesStatisticsRepository.cs
index 699531198..469dfd2f0 100644
--- a/src/NzbDrone.Core/SeriesStats/SeriesStatisticsRepository.cs
+++ b/src/NzbDrone.Core/SeriesStats/SeriesStatisticsRepository.cs
@@ -53,7 +53,7 @@ namespace NzbDrone.Core.SeriesStats
private string GetSelectClause(bool series)
{
- return @"SELECT Episodes.*, SUM(EpisodeFiles.Size) as SizeOnDisk FROM
+ return @"SELECT Episodes.*, SUM(EpisodeFiles.Size) as SizeOnDisk, GROUP_CONCAT(EpisodeFiles.ReleaseGroup, '|') AS ReleaseGroupsString FROM
(SELECT
Episodes.SeriesId,
Episodes.SeasonNumber,
diff --git a/src/NzbDrone.Core/SeriesStats/SeriesStatisticsService.cs b/src/NzbDrone.Core/SeriesStats/SeriesStatisticsService.cs
index b273f84ce..2c1900f9a 100644
--- a/src/NzbDrone.Core/SeriesStats/SeriesStatisticsService.cs
+++ b/src/NzbDrone.Core/SeriesStats/SeriesStatisticsService.cs
@@ -43,7 +43,8 @@ namespace NzbDrone.Core.SeriesStats
EpisodeFileCount = seasonStatistics.Sum(s => s.EpisodeFileCount),
EpisodeCount = seasonStatistics.Sum(s => s.EpisodeCount),
TotalEpisodeCount = seasonStatistics.Sum(s => s.TotalEpisodeCount),
- SizeOnDisk = seasonStatistics.Sum(s => s.SizeOnDisk)
+ SizeOnDisk = seasonStatistics.Sum(s => s.SizeOnDisk),
+ ReleaseGroups = seasonStatistics.SelectMany(s => s.ReleaseGroups).Distinct().ToList()
};
var nextAiring = seasonStatistics.Where(s => s.NextAiring != null)
diff --git a/src/Sonarr.Api.V3/Series/SeasonStatisticsResource.cs b/src/Sonarr.Api.V3/Series/SeasonStatisticsResource.cs
index 12ee9434f..e482cd12a 100644
--- a/src/Sonarr.Api.V3/Series/SeasonStatisticsResource.cs
+++ b/src/Sonarr.Api.V3/Series/SeasonStatisticsResource.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Generic;
using NzbDrone.Core.SeriesStats;
namespace Sonarr.Api.V3.Series
@@ -11,6 +12,7 @@ namespace Sonarr.Api.V3.Series
public int EpisodeCount { get; set; }
public int TotalEpisodeCount { get; set; }
public long SizeOnDisk { get; set; }
+ public List ReleaseGroups { get; set; }
public decimal PercentOfEpisodes
{
@@ -36,7 +38,8 @@ namespace Sonarr.Api.V3.Series
EpisodeFileCount = model.EpisodeFileCount,
EpisodeCount = model.EpisodeCount,
TotalEpisodeCount = model.TotalEpisodeCount,
- SizeOnDisk = model.SizeOnDisk
+ SizeOnDisk = model.SizeOnDisk,
+ ReleaseGroups = model.ReleaseGroups
};
}
}
diff --git a/src/Sonarr.Api.V3/Series/SeriesStatisticsResource.cs b/src/Sonarr.Api.V3/Series/SeriesStatisticsResource.cs
index a2c797b95..dcdecbdf2 100644
--- a/src/Sonarr.Api.V3/Series/SeriesStatisticsResource.cs
+++ b/src/Sonarr.Api.V3/Series/SeriesStatisticsResource.cs
@@ -11,6 +11,7 @@ namespace Sonarr.Api.V3.Series
public int EpisodeCount { get; set; }
public int TotalEpisodeCount { get; set; }
public long SizeOnDisk { get; set; }
+ public List ReleaseGroups { get; set; }
public decimal PercentOfEpisodes
{
@@ -37,7 +38,8 @@ namespace Sonarr.Api.V3.Series
EpisodeFileCount = model.EpisodeFileCount,
EpisodeCount = model.EpisodeCount,
TotalEpisodeCount = model.TotalEpisodeCount,
- SizeOnDisk = model.SizeOnDisk
+ SizeOnDisk = model.SizeOnDisk,
+ ReleaseGroups = model.ReleaseGroups
};
}
}