Various anime improvements

Series type is persisted in the client
New: Warning in UI if anime episode doesn't have an absolute episode number
New: If series type is changed the series will be rescanned
New: Update scene mappings when series is refreshed
This commit is contained in:
Mark McDowall 2014-07-09 22:59:23 -07:00
parent 86936303dd
commit 25abeb8c9c
12 changed files with 108 additions and 14 deletions

View file

@ -8,6 +8,7 @@ using NzbDrone.Core.Messaging.Commands;
using NzbDrone.Core.Messaging.Events;
using NzbDrone.Core.Parser;
using System.Collections.Generic;
using NzbDrone.Core.Tv.Events;
namespace NzbDrone.Core.DataAugmentation.Scene
{
@ -21,6 +22,7 @@ namespace NzbDrone.Core.DataAugmentation.Scene
public class SceneMappingService : ISceneMappingService,
IHandleAsync<ApplicationStartedEvent>,
IHandle<SeriesRefreshStartingEvent>,
IExecute<UpdateSceneMappingCommand>
{
private readonly ISceneMappingRepository _repository;
@ -80,9 +82,6 @@ namespace NzbDrone.Core.DataAugmentation.Scene
public Nullable<Int32> GetSeasonNumber(string title)
{
//TODO: we should be able to override xem aliases with ones from services
//Example Fairy Tail - Alias is assigned to season 2 (anidb), but we're still using tvdb for everything
var mapping = _gettvdbIdCache.Find(title.CleanSeriesTitle());
if (mapping == null)
@ -155,6 +154,11 @@ namespace NzbDrone.Core.DataAugmentation.Scene
UpdateMappings();
}
public void Handle(SeriesRefreshStartingEvent message)
{
UpdateMappings();
}
public void Execute(UpdateSceneMappingCommand message)
{
UpdateMappings();