示例#1
0
        public List <RootFolder> AllWithUnmappedFolders()
        {
            var rootFolders = _rootFolderRepository.All().ToList();
            var seriesPaths = _seriesRepository.AllSeriesPaths();

            rootFolders.ForEach(folder =>
            {
                try
                {
                    if (folder.Path.IsPathValid())
                    {
                        GetDetails(folder, seriesPaths, true);
                    }
                }
                //We don't want an exception to prevent the root folders from loading in the UI, so they can still be deleted
                catch (Exception ex)
                {
                    _logger.Error(ex, "Unable to get free space and unmapped folders for root folder {0}", folder.Path);
                    folder.UnmappedFolders = new List <UnmappedFolder>();
                }
            });

            return(rootFolders);
        }
示例#2
0
 public List <string> GetAllSeriesPaths()
 {
     return(_seriesRepository.AllSeriesPaths());
 }