mirror of https://github.com/lidarr/Lidarr
Metadata issues with renaming resolved
This commit is contained in:
parent
f296f38742
commit
1d2cd49bde
|
@ -69,12 +69,13 @@ namespace NzbDrone.Core.Jobs
|
|||
{
|
||||
try
|
||||
{
|
||||
var oldFile = new EpisodeFile(episodeFile);
|
||||
var newFile = _diskScanProvider.MoveEpisodeFile(episodeFile);
|
||||
|
||||
if (newFile != null)
|
||||
{
|
||||
newEpisodeFiles.Add(newFile);
|
||||
oldEpisodeFiles.Add(episodeFile);
|
||||
oldEpisodeFiles.Add(oldFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -66,12 +66,13 @@ namespace NzbDrone.Core.Jobs
|
|||
{
|
||||
try
|
||||
{
|
||||
var oldFile = new EpisodeFile(episodeFile);
|
||||
var newFile = _diskScanProvider.MoveEpisodeFile(episodeFile);
|
||||
|
||||
if (newFile != null)
|
||||
{
|
||||
newEpisodeFiles.Add(newFile);
|
||||
oldEpisodeFiles.Add(episodeFile);
|
||||
oldEpisodeFiles.Add(oldFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,8 @@ namespace NzbDrone.Core.Providers.Metadata
|
|||
{
|
||||
public class Xbmc : MetadataBase
|
||||
{
|
||||
public Xbmc(ConfigProvider configProvider, DiskProvider diskProvider, BannerProvider bannerProvider, EpisodeProvider episodeProvider)
|
||||
public Xbmc(ConfigProvider configProvider, DiskProvider diskProvider,
|
||||
BannerProvider bannerProvider, EpisodeProvider episodeProvider)
|
||||
: base(configProvider, diskProvider, bannerProvider, episodeProvider)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -21,7 +21,8 @@ namespace NzbDrone.Core.Providers
|
|||
private readonly TvDbProvider _tvDbProvider;
|
||||
|
||||
[Inject]
|
||||
public MetadataProvider(IDatabase database, IEnumerable<MetadataBase> metadataProviders, TvDbProvider tvDbProvider)
|
||||
public MetadataProvider(IDatabase database, IEnumerable<MetadataBase> metadataProviders,
|
||||
TvDbProvider tvDbProvider)
|
||||
{
|
||||
_database = database;
|
||||
_metadataProviders = metadataProviders;
|
||||
|
@ -121,6 +122,9 @@ namespace NzbDrone.Core.Providers
|
|||
|
||||
public virtual void CreateForEpisodeFiles(List<EpisodeFile> episodeFiles)
|
||||
{
|
||||
if (episodeFiles == null || !episodeFiles.Any())
|
||||
return;
|
||||
|
||||
var tvDbSeries = _tvDbProvider.GetSeries(episodeFiles.First().SeriesId, true, true);
|
||||
|
||||
foreach(var episodeFile in episodeFiles)
|
||||
|
@ -158,10 +162,5 @@ namespace NzbDrone.Core.Providers
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void RenameForEpisodeFile(EpisodeFile episodeFile)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
|
@ -9,6 +9,22 @@ namespace NzbDrone.Core.Repository
|
|||
[PrimaryKey("EpisodeFileId", autoIncrement = true)]
|
||||
public class EpisodeFile
|
||||
{
|
||||
public EpisodeFile()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public EpisodeFile(EpisodeFile source)
|
||||
{
|
||||
EpisodeFileId = source.EpisodeFileId;
|
||||
SeriesId = source.SeriesId;
|
||||
SeasonNumber = source.SeasonNumber;
|
||||
Path = source.Path;
|
||||
Quality = source.Quality;
|
||||
Proper = source.Proper;
|
||||
Size = source.Size;
|
||||
}
|
||||
|
||||
public int EpisodeFileId { get; set; }
|
||||
|
||||
public int SeriesId { get; set; }
|
||||
|
|
Loading…
Reference in New Issue