|
|
@ -12,7 +12,7 @@ using NzbDrone.Core.Repository;
|
|
|
|
|
|
|
|
|
|
|
|
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 @@ namespace NzbDrone.Core.Providers
|
|
|
|
_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
|
|
|
|
|
|
|
|
|
|
|
@ -62,7 +62,7 @@ namespace NzbDrone.Core.Providers
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
@ -84,7 +84,7 @@ namespace NzbDrone.Core.Providers
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
@ -106,7 +106,7 @@ namespace NzbDrone.Core.Providers
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
@ -127,7 +127,7 @@ namespace NzbDrone.Core.Providers
|
|
|
|
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);
|
|
|
|