Fixed: _coverMapper is null for other album entities

pull/6/head
Qstick 6 years ago
parent adfaec3864
commit b2d87cccb2

@ -35,6 +35,7 @@ namespace Lidarr.Api.V1.Albums
protected AlbumModuleWithSignalR(IAlbumService albumService, protected AlbumModuleWithSignalR(IAlbumService albumService,
IArtistStatisticsService artistStatisticsService, IArtistStatisticsService artistStatisticsService,
IMapCoversToLocal coverMapper,
IUpgradableSpecification qualityUpgradableSpecification, IUpgradableSpecification qualityUpgradableSpecification,
IBroadcastSignalRMessage signalRBroadcaster, IBroadcastSignalRMessage signalRBroadcaster,
string resource) string resource)
@ -42,6 +43,7 @@ namespace Lidarr.Api.V1.Albums
{ {
_albumService = albumService; _albumService = albumService;
_artistStatisticsService = artistStatisticsService; _artistStatisticsService = artistStatisticsService;
_coverMapper = coverMapper;
_qualityUpgradableSpecification = qualityUpgradableSpecification; _qualityUpgradableSpecification = qualityUpgradableSpecification;
GetResourceById = GetAlbum; GetResourceById = GetAlbum;

@ -7,6 +7,7 @@ using NzbDrone.Core.ArtistStats;
using NzbDrone.SignalR; using NzbDrone.SignalR;
using Lidarr.Api.V1.Albums; using Lidarr.Api.V1.Albums;
using Lidarr.Http.Extensions; using Lidarr.Http.Extensions;
using NzbDrone.Core.MediaCover;
namespace Lidarr.Api.V1.Calendar namespace Lidarr.Api.V1.Calendar
{ {
@ -14,9 +15,10 @@ namespace Lidarr.Api.V1.Calendar
{ {
public CalendarModule(IAlbumService albumService, public CalendarModule(IAlbumService albumService,
IArtistStatisticsService artistStatisticsService, IArtistStatisticsService artistStatisticsService,
IMapCoversToLocal coverMapper,
IUpgradableSpecification upgradableSpecification, IUpgradableSpecification upgradableSpecification,
IBroadcastSignalRMessage signalRBroadcaster) IBroadcastSignalRMessage signalRBroadcaster)
: base(albumService, artistStatisticsService, upgradableSpecification, signalRBroadcaster, "calendar") : base(albumService, artistStatisticsService, coverMapper, upgradableSpecification, signalRBroadcaster, "calendar")
{ {
GetResourceAll = GetCalendar; GetResourceAll = GetCalendar;
} }

@ -7,6 +7,7 @@ using NzbDrone.SignalR;
using Lidarr.Api.V1.Albums; using Lidarr.Api.V1.Albums;
using Lidarr.Http; using Lidarr.Http;
using Lidarr.Http.Extensions; using Lidarr.Http.Extensions;
using NzbDrone.Core.MediaCover;
namespace Lidarr.Api.V1.Wanted namespace Lidarr.Api.V1.Wanted
{ {
@ -17,9 +18,10 @@ namespace Lidarr.Api.V1.Wanted
public CutoffModule(IAlbumCutoffService albumCutoffService, public CutoffModule(IAlbumCutoffService albumCutoffService,
IAlbumService albumService, IAlbumService albumService,
IArtistStatisticsService artistStatisticsService, IArtistStatisticsService artistStatisticsService,
IMapCoversToLocal coverMapper,
IUpgradableSpecification upgradableSpecification, IUpgradableSpecification upgradableSpecification,
IBroadcastSignalRMessage signalRBroadcaster) IBroadcastSignalRMessage signalRBroadcaster)
: base(albumService, artistStatisticsService, upgradableSpecification, signalRBroadcaster, "wanted/cutoff") : base(albumService, artistStatisticsService, coverMapper, upgradableSpecification, signalRBroadcaster, "wanted/cutoff")
{ {
_albumCutoffService = albumCutoffService; _albumCutoffService = albumCutoffService;
GetResourcePaged = GetCutoffUnmetAlbums; GetResourcePaged = GetCutoffUnmetAlbums;

@ -7,6 +7,7 @@ using NzbDrone.SignalR;
using Lidarr.Api.V1.Albums; using Lidarr.Api.V1.Albums;
using Lidarr.Http; using Lidarr.Http;
using Lidarr.Http.Extensions; using Lidarr.Http.Extensions;
using NzbDrone.Core.MediaCover;
namespace Lidarr.Api.V1.Wanted namespace Lidarr.Api.V1.Wanted
{ {
@ -14,9 +15,10 @@ namespace Lidarr.Api.V1.Wanted
{ {
public MissingModule(IAlbumService albumService, public MissingModule(IAlbumService albumService,
IArtistStatisticsService artistStatisticsService, IArtistStatisticsService artistStatisticsService,
IMapCoversToLocal coverMapper,
IUpgradableSpecification upgradableSpecification, IUpgradableSpecification upgradableSpecification,
IBroadcastSignalRMessage signalRBroadcaster) IBroadcastSignalRMessage signalRBroadcaster)
: base(albumService, artistStatisticsService, upgradableSpecification, signalRBroadcaster, "wanted/missing") : base(albumService, artistStatisticsService, coverMapper, upgradableSpecification, signalRBroadcaster, "wanted/missing")
{ {
GetResourcePaged = GetMissingAlbums; GetResourcePaged = GetMissingAlbums;
} }

Loading…
Cancel
Save