minor cleanup.

This commit is contained in:
kay.one 2013-06-02 20:44:31 -07:00
parent 77f7427230
commit 6c1d16ae57
5 changed files with 9 additions and 4 deletions

View File

@ -63,6 +63,12 @@ namespace NzbDrone.Core.Test.MediaFileTests
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]
public void GetFileByPath_should_return_EpisodeFile_if_file_exists_in_database()
{

View File

@ -106,7 +106,7 @@ namespace NzbDrone.Core.Datastore
{
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);

View File

@ -100,7 +100,7 @@ namespace NzbDrone.Core.Parser
//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);
if (episodeInfo != null)

View File

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

View File

@ -132,7 +132,7 @@ namespace NzbDrone.Core.Tv
episodeToUpdate.SeasonNumber != episode.SeasonNumber) &&
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;
}