1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-27 22:57:09 -04:00

better method to obtain the folderName

This commit is contained in:
geogolem
2017-03-11 01:37:50 -05:00
parent e6dfd89300
commit 05a83e4e95
3 changed files with 9 additions and 2 deletions
+6
View File
@@ -5,6 +5,7 @@ using NzbDrone.Common.Extensions;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Profiles;
using NzbDrone.Core.MediaFiles;
using System.IO;
namespace NzbDrone.Core.Tv
{
@@ -54,6 +55,11 @@ namespace NzbDrone.Core.Tv
public bool HasFile => MovieFileId > 0;
public string FolderName()
{
return new DirectoryInfo(Path).Name;
}
public bool IsAvailable(int delay = 0)
{
//the below line is what was used before delay was implemented, could still be used for cases when delay==0