public List <FolderInfo> GetFolders() { List <FolderInfo> folders = new List <FolderInfo>(); PathConverter pathConverter = PathConverter.GetInstance(); if (!pathConverter.IsValidPath(this.virtualAddress)) { this.virtualAddress = pathConverter.CorrectPath(this.virtualAddress); } List <string> folderPaths = pathConverter.GetFoldersPhysicalPathInVirtual(this.virtualAddress); foreach (var path in folderPaths) { if (settings.FolderFilter.Test(path)) { FolderInfo folderInfo = new FolderInfo(path, false); folders.Add(folderInfo); } } folders = pathConverter.SortByNumeric <FolderInfo>(folders); return(folders); }
public bool IsPlayable(out String parentVirtualDirectory) { PathConverter pathConverter = PathConverter.GetInstance(); if (!pathConverter.IsValidPath(this.virtualAddress)) { this.virtualAddress = pathConverter.CorrectPath(this.virtualAddress); } if (this.virtualAddress == null) { this.virtualAddress = String.Format("/{0}", settings.DefaultLibrary); } bool valid = settings.PlayFilter.Test(this.virtualAddress); if (valid) { parentVirtualDirectory = pathConverter.GetParentDirectory(this.virtualAddress); } else { parentVirtualDirectory = this.virtualAddress; } return(valid); }