Show Path to episode on disk in Details.

Timer to cleanup/scan for EpisodeFiles (Midnight)
Fixed Relationship for EpisodeFile to Series
This commit is contained in:
markus101 2011-02-24 17:18:22 -08:00
parent b5c7135d24
commit a950a13c30
9 changed files with 40 additions and 11 deletions

View file

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Web;
@ -81,7 +82,8 @@ namespace NzbDrone.Web.Controllers
SeasonNumber = c.SeasonNumber,
Title = c.Title,
Overview = c.Overview,
AirDate = c.AirDate
AirDate = c.AirDate,
Path = GetEpisodePath(c.EpisodeFile)
});
return View(new GridModel(episodes));
}
@ -232,5 +234,15 @@ namespace NzbDrone.Web.Controllers
_renameProvider.RenameEpisode(episodeId);
return RedirectToAction("Index");
}
//Local Helpers
private string GetEpisodePath(EpisodeFile file)
{
if (file == null)
return String.Empty;
//Return the path relative to the Series' Folder
return file.Path.Replace(file.Series.Path, "").Trim(Path.DirectorySeparatorChar);
}
}
}