mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 20:12:41 +02:00
Removed IRenameProvider.
This commit is contained in:
parent
29690d9b6f
commit
e5413d67d6
@ -61,7 +61,7 @@ public static void BindKernel()
|
|||||||
_kernel.Bind<TvDbProvider>().ToSelf();
|
_kernel.Bind<TvDbProvider>().ToSelf();
|
||||||
_kernel.Bind<HttpProvider>().ToSelf();
|
_kernel.Bind<HttpProvider>().ToSelf();
|
||||||
_kernel.Bind<SeriesProvider>().ToSelf().InSingletonScope();
|
_kernel.Bind<SeriesProvider>().ToSelf().InSingletonScope();
|
||||||
_kernel.Bind<IRssSyncProvider>().To<RssSyncProvider>().InSingletonScope();
|
_kernel.Bind<RssSyncProvider>().ToSelf().InSingletonScope();
|
||||||
_kernel.Bind<ISeasonProvider>().To<SeasonProvider>();
|
_kernel.Bind<ISeasonProvider>().To<SeasonProvider>();
|
||||||
_kernel.Bind<IEpisodeProvider>().To<EpisodeProvider>();
|
_kernel.Bind<IEpisodeProvider>().To<EpisodeProvider>();
|
||||||
_kernel.Bind<UpcomingEpisodesProvider>().To<UpcomingEpisodesProvider>();
|
_kernel.Bind<UpcomingEpisodesProvider>().To<UpcomingEpisodesProvider>();
|
||||||
@ -75,7 +75,7 @@ public static void BindKernel()
|
|||||||
_kernel.Bind<IConfigProvider>().To<ConfigProvider>().InSingletonScope();
|
_kernel.Bind<IConfigProvider>().To<ConfigProvider>().InSingletonScope();
|
||||||
_kernel.Bind<ISyncProvider>().To<SyncProvider>().InSingletonScope();
|
_kernel.Bind<ISyncProvider>().To<SyncProvider>().InSingletonScope();
|
||||||
_kernel.Bind<IIndexerProvider>().To<IndexerProvider>().InSingletonScope();
|
_kernel.Bind<IIndexerProvider>().To<IndexerProvider>().InSingletonScope();
|
||||||
_kernel.Bind<IRenameProvider>().To<RenameProvider>().InSingletonScope();
|
_kernel.Bind<RenameProvider>().ToSelf().InSingletonScope();
|
||||||
_kernel.Bind<NotificationProvider>().ToSelf().InSingletonScope();
|
_kernel.Bind<NotificationProvider>().ToSelf().InSingletonScope();
|
||||||
_kernel.Bind<ILogProvider>().To<LogProvider>().InSingletonScope();
|
_kernel.Bind<ILogProvider>().To<LogProvider>().InSingletonScope();
|
||||||
_kernel.Bind<IMediaFileProvider>().To<MediaFileProvider>().InSingletonScope();
|
_kernel.Bind<IMediaFileProvider>().To<MediaFileProvider>().InSingletonScope();
|
||||||
|
@ -182,11 +182,10 @@
|
|||||||
<Compile Include="Providers\ExternalNotificationProvider.cs" />
|
<Compile Include="Providers\ExternalNotificationProvider.cs" />
|
||||||
<Compile Include="Providers\Feed\NzbsOrgFeedProvider.cs" />
|
<Compile Include="Providers\Feed\NzbsOrgFeedProvider.cs" />
|
||||||
<Compile Include="Providers\HistoryProvider.cs" />
|
<Compile Include="Providers\HistoryProvider.cs" />
|
||||||
<Compile Include="Providers\IBacklogProvider.cs" />
|
<Compile Include="Providers\BacklogProvider.cs" />
|
||||||
<Compile Include="Providers\IIndexerProvider.cs" />
|
<Compile Include="Providers\IIndexerProvider.cs" />
|
||||||
<Compile Include="Providers\IndexerProvider.cs" />
|
<Compile Include="Providers\IndexerProvider.cs" />
|
||||||
<Compile Include="Providers\IRenameProvider.cs" />
|
<Compile Include="Providers\RssSyncProvider.cs" />
|
||||||
<Compile Include="Providers\IRssSyncProvider.cs" />
|
|
||||||
<Compile Include="Providers\PostProcessingProvider.cs" />
|
<Compile Include="Providers\PostProcessingProvider.cs" />
|
||||||
<Compile Include="Providers\QualityProvider.cs" />
|
<Compile Include="Providers\QualityProvider.cs" />
|
||||||
<Compile Include="Providers\RenameProvider.cs" />
|
<Compile Include="Providers\RenameProvider.cs" />
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace NzbDrone.Core.Providers
|
|
||||||
{
|
|
||||||
public interface IRenameProvider
|
|
||||||
{
|
|
||||||
void RenameAll();
|
|
||||||
void RenameSeries(int seriesId);
|
|
||||||
void RenameSeason(int seasonId);
|
|
||||||
void RenameEpisode(int episodeId);
|
|
||||||
void RenameEpisodeFile(int episodeFileId, bool newDownload);
|
|
||||||
}
|
|
||||||
}
|
|
@ -13,10 +13,10 @@ public class PostProcessingProvider
|
|||||||
{
|
{
|
||||||
private readonly SeriesProvider _seriesProvider;
|
private readonly SeriesProvider _seriesProvider;
|
||||||
private readonly IMediaFileProvider _mediaFileProvider;
|
private readonly IMediaFileProvider _mediaFileProvider;
|
||||||
private readonly IRenameProvider _renameProvider;
|
private readonly RenameProvider _renameProvider;
|
||||||
|
|
||||||
public PostProcessingProvider(SeriesProvider seriesProvider,
|
public PostProcessingProvider(SeriesProvider seriesProvider,
|
||||||
IMediaFileProvider mediaFileProvider, IRenameProvider renameProvider)
|
IMediaFileProvider mediaFileProvider, RenameProvider renameProvider)
|
||||||
{
|
{
|
||||||
_seriesProvider = seriesProvider;
|
_seriesProvider = seriesProvider;
|
||||||
_mediaFileProvider = mediaFileProvider;
|
_mediaFileProvider = mediaFileProvider;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
namespace NzbDrone.Core.Providers
|
namespace NzbDrone.Core.Providers
|
||||||
{
|
{
|
||||||
public class RenameProvider : IRenameProvider
|
public class RenameProvider
|
||||||
{
|
{
|
||||||
private readonly SeriesProvider _seriesProvider;
|
private readonly SeriesProvider _seriesProvider;
|
||||||
private readonly ISeasonProvider _seasonProvider;
|
private readonly ISeasonProvider _seasonProvider;
|
||||||
@ -41,8 +41,8 @@ public RenameProvider(SeriesProvider seriesProvider, ISeasonProvider seasonProvi
|
|||||||
_externalNotificationProvider = extenalNotificationProvider;
|
_externalNotificationProvider = extenalNotificationProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region IRenameProvider Members
|
#region RenameProvider Members
|
||||||
public void RenameAll()
|
public virtual void RenameAll()
|
||||||
{
|
{
|
||||||
//Get a list of all episode files/episodes and rename them
|
//Get a list of all episode files/episodes and rename them
|
||||||
|
|
||||||
@ -61,8 +61,8 @@ public void RenameAll()
|
|||||||
StartRename();
|
StartRename();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RenameSeries(int seriesId)
|
public virtual void RenameSeries(int seriesId)
|
||||||
{
|
{
|
||||||
//Get a list of all applicable episode files/episodes and rename them
|
//Get a list of all applicable episode files/episodes and rename them
|
||||||
|
|
||||||
@ -83,8 +83,8 @@ public void RenameSeries(int seriesId)
|
|||||||
StartRename();
|
StartRename();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RenameSeason(int seasonId)
|
public virtual void RenameSeason(int seasonId)
|
||||||
{
|
{
|
||||||
//Get a list of all applicable episode files/episodes and rename them
|
//Get a list of all applicable episode files/episodes and rename them
|
||||||
var season = _seasonProvider.GetSeason(seasonId);
|
var season = _seasonProvider.GetSeason(seasonId);
|
||||||
@ -105,8 +105,8 @@ public void RenameSeason(int seasonId)
|
|||||||
StartRename();
|
StartRename();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RenameEpisode(int episodeId)
|
public virtual void RenameEpisode(int episodeId)
|
||||||
{
|
{
|
||||||
//This will properly rename multi-episode files if asked to rename either of the episode
|
//This will properly rename multi-episode files if asked to rename either of the episode
|
||||||
var episode = _episodeProvider.GetEpisode(episodeId);
|
var episode = _episodeProvider.GetEpisode(episodeId);
|
||||||
@ -126,8 +126,8 @@ public void RenameEpisode(int episodeId)
|
|||||||
_epsToRename.Add(erm);
|
_epsToRename.Add(erm);
|
||||||
StartRename();
|
StartRename();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RenameEpisodeFile(int episodeFileId, bool newDownload)
|
public virtual void RenameEpisodeFile(int episodeFileId, bool newDownload)
|
||||||
{
|
{
|
||||||
//This will properly rename multi-episode files if asked to rename either of the episode
|
//This will properly rename multi-episode files if asked to rename either of the episode
|
||||||
var episodeFile = _mediaFileProvider.GetEpisodeFile(episodeFileId);
|
var episodeFile = _mediaFileProvider.GetEpisodeFile(episodeFileId);
|
||||||
|
@ -10,7 +10,7 @@ namespace NzbDrone.Core.Providers
|
|||||||
{
|
{
|
||||||
public class TimerProvider
|
public class TimerProvider
|
||||||
{
|
{
|
||||||
private readonly IRssSyncProvider _rssSyncProvider;
|
private readonly RssSyncProvider _rssSyncProvider;
|
||||||
private readonly SeriesProvider _seriesProvider;
|
private readonly SeriesProvider _seriesProvider;
|
||||||
private readonly ISeasonProvider _seasonProvider;
|
private readonly ISeasonProvider _seasonProvider;
|
||||||
private readonly IEpisodeProvider _episodeProvider;
|
private readonly IEpisodeProvider _episodeProvider;
|
||||||
@ -21,7 +21,7 @@ public class TimerProvider
|
|||||||
private DateTime _rssSyncNextInterval;
|
private DateTime _rssSyncNextInterval;
|
||||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||||
|
|
||||||
public TimerProvider(IRssSyncProvider rssSyncProvider, SeriesProvider seriesProvider, ISeasonProvider seasonProvider, IEpisodeProvider episodeProvider, IMediaFileProvider mediaFileProvider)
|
public TimerProvider(RssSyncProvider rssSyncProvider, SeriesProvider seriesProvider, ISeasonProvider seasonProvider, IEpisodeProvider episodeProvider, IMediaFileProvider mediaFileProvider)
|
||||||
{
|
{
|
||||||
_rssSyncProvider = rssSyncProvider;
|
_rssSyncProvider = rssSyncProvider;
|
||||||
_seriesProvider = seriesProvider;
|
_seriesProvider = seriesProvider;
|
||||||
|
@ -24,19 +24,19 @@ public class SeriesController : Controller
|
|||||||
private readonly SeriesProvider _seriesProvider;
|
private readonly SeriesProvider _seriesProvider;
|
||||||
private readonly IEpisodeProvider _episodeProvider;
|
private readonly IEpisodeProvider _episodeProvider;
|
||||||
private readonly ISyncProvider _syncProvider;
|
private readonly ISyncProvider _syncProvider;
|
||||||
private readonly IRssSyncProvider _rssSyncProvider;
|
private readonly RssSyncProvider _rssSyncProvider;
|
||||||
private readonly QualityProvider _qualityProvider;
|
private readonly QualityProvider _qualityProvider;
|
||||||
private readonly IMediaFileProvider _mediaFileProvider;
|
private readonly IMediaFileProvider _mediaFileProvider;
|
||||||
private readonly IRenameProvider _renameProvider;
|
private readonly RenameProvider _renameProvider;
|
||||||
private readonly RootDirProvider _rootDirProvider;
|
private readonly RootDirProvider _rootDirProvider;
|
||||||
private readonly TvDbProvider _tvDbProvider;
|
private readonly TvDbProvider _tvDbProvider;
|
||||||
//
|
//
|
||||||
// GET: /Series/
|
// GET: /Series/
|
||||||
|
|
||||||
public SeriesController(ISyncProvider syncProvider, SeriesProvider seriesProvider,
|
public SeriesController(ISyncProvider syncProvider, SeriesProvider seriesProvider,
|
||||||
IEpisodeProvider episodeProvider, IRssSyncProvider rssSyncProvider,
|
IEpisodeProvider episodeProvider, RssSyncProvider rssSyncProvider,
|
||||||
QualityProvider qualityProvider, IMediaFileProvider mediaFileProvider,
|
QualityProvider qualityProvider, IMediaFileProvider mediaFileProvider,
|
||||||
IRenameProvider renameProvider, RootDirProvider rootDirProvider,
|
RenameProvider renameProvider, RootDirProvider rootDirProvider,
|
||||||
TvDbProvider tvDbProvider)
|
TvDbProvider tvDbProvider)
|
||||||
{
|
{
|
||||||
_seriesProvider = seriesProvider;
|
_seriesProvider = seriesProvider;
|
||||||
|
Loading…
Reference in New Issue
Block a user