minor cleanup.

pull/6/head
kay.one 12 years ago
parent 77f7427230
commit 6c1d16ae57

@ -63,6 +63,12 @@ namespace NzbDrone.Core.Test.MediaFileTests
Subject.GetFileByPath(@"C:\Test\EpisodeFile.avi").Should().BeNull(); Subject.GetFileByPath(@"C:\Test\EpisodeFile.avi").Should().BeNull();
} }
[Test]
public void exists_should_return_false_if_file_doesnt_exist()
{
Subject.Exists(@"C:\Test\EpisodeFile.avi").Should().BeFalse();
}
[Test] [Test]
public void GetFileByPath_should_return_EpisodeFile_if_file_exists_in_database() public void GetFileByPath_should_return_EpisodeFile_if_file_exists_in_database()
{ {

@ -106,7 +106,7 @@ namespace NzbDrone.Core.Datastore
{ {
if (model.Id != 0) if (model.Id != 0)
{ {
throw new InvalidOperationException("Can't insert model with existing ID"); throw new InvalidOperationException("Can't insert model with existing ID " + model.Id);
} }
DataMapper.Insert(model); DataMapper.Insert(model);

@ -100,7 +100,7 @@ namespace NzbDrone.Core.Parser
//TODO: this will fail since parsed date will be local, and stored date will be UTC //TODO: this will fail since parsed date will be local, and stored date will be UTC
//which means they will probebly end up on diffrent dates //which means they will probably end up on different dates
var episodeInfo = _episodeService.GetEpisode(series.Id, parsedEpisodeInfo.AirDate.Value); var episodeInfo = _episodeService.GetEpisode(series.Id, parsedEpisodeInfo.AirDate.Value);
if (episodeInfo != null) if (episodeInfo != null)

@ -2,7 +2,6 @@
using Marr.Data; using Marr.Data;
using NzbDrone.Core.Datastore; using NzbDrone.Core.Datastore;
using NzbDrone.Core.MediaFiles; using NzbDrone.Core.MediaFiles;
using NzbDrone.Core.Model;
namespace NzbDrone.Core.Tv namespace NzbDrone.Core.Tv

@ -132,7 +132,7 @@ namespace NzbDrone.Core.Tv
episodeToUpdate.SeasonNumber != episode.SeasonNumber) && episodeToUpdate.SeasonNumber != episode.SeasonNumber) &&
episodeToUpdate.EpisodeFileId > 0) episodeToUpdate.EpisodeFileId > 0)
{ {
_logger.Info("Unlinking episode file because the episode number has changed"); _logger.Debug("Un-linking episode file because the episode number has changed");
episodeToUpdate.EpisodeFileId = 0; episodeToUpdate.EpisodeFileId = 0;
} }

Loading…
Cancel
Save