1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-11 13:32:42 +01:00
Radarr/NzbDrone.Core/Providers/Jobs/RenameEpisodeJob.cs
Mark McDowall 560706ae8f Fixed Renaming of episodes to include extension.
PostDownload Importing setup, need to setup job for period scan.
2011-06-06 23:29:07 -07:00

43 lines
1.3 KiB
C#

using System;
using System.IO;
using System.Linq;
using NLog;
using NzbDrone.Core.Model.Notification;
using NzbDrone.Core.Providers.Core;
namespace NzbDrone.Core.Providers.Jobs
{
public class RenameEpisodeJob : IJob
{
private readonly DiskProvider _diskProvider;
private readonly EpisodeProvider _episodeProvider;
private readonly MediaFileProvider _mediaFileProvider;
private readonly SeriesProvider _seriesProvider;
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
public RenameEpisodeJob(DiskProvider diskProvider, EpisodeProvider episodeProvider,
MediaFileProvider mediaFileProvider, SeriesProvider seriesProvider)
{
_diskProvider = diskProvider;
_episodeProvider = episodeProvider;
_mediaFileProvider = mediaFileProvider;
_seriesProvider = seriesProvider;
}
public string Name
{
get { return "Rename Episode"; }
}
public int DefaultInterval
{
get { return 0; }
}
public void Start(ProgressNotification notification, int targetId)
{
_mediaFileProvider.RenameEpisodeFile(targetId, notification);
}
}
}