mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01:00
Fixed some broken tests
This commit is contained in:
parent
e43cb87620
commit
b1e772d852
@ -33,7 +33,7 @@ public void CalculateFilePath_SeasonFolder_SingleNumber(string filename, int sea
|
||||
{
|
||||
var fakeSeries = Builder<Series>.CreateNew()
|
||||
.With(s => s.Title = "30 Rock")
|
||||
.With(s => s.RootFolder = new LazyLoaded<RootFolder>(new RootFolder { Path = @"C:\Test\TV" }))
|
||||
.With(s => s.RootFolder = new LazyLoaded<RootFolder>(new RootFolder { Path = @"C:\Test" }))
|
||||
.With(s => s.FolderName = "30 Rock")
|
||||
.With(s => s.SeasonFolder = useSeasonFolder)
|
||||
.Build();
|
||||
|
@ -53,7 +53,15 @@ public Series()
|
||||
//Todo: Use this to auto link RootFolder and Folder (using the proper path separator)
|
||||
public string Path
|
||||
{
|
||||
get { return System.IO.Path.Combine(RootFolder.Value.Path, FolderName); }
|
||||
get
|
||||
{
|
||||
if (RootFolder == null || RootFolder.Value == null || String.IsNullOrWhiteSpace(RootFolder.Value.Path))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return System.IO.Path.Combine(RootFolder.Value.Path, FolderName);
|
||||
}
|
||||
}
|
||||
|
||||
//Todo: This should be a double since there are timezones that aren't on a full hour offset
|
||||
|
Loading…
Reference in New Issue
Block a user