Beispiel #1
0
        private async void AddAllFilesToLibrary()
        {
            mode = Mode.ADDING_FILES;
            UpdateAddAllFilesToLibraryButton();
            List <LibraryFile> filesToAdd = FoundItems.Where(foundItem => !foundItem.ExistsInLibrary).Select(foundItem =>
                                                                                                             new LibraryFile
            {
                FilePath     = Path.Combine(scanDirectory, foundItem.RelativeFilePath),
                ArchiveEntry = null,
                ObjectType   = foundItem.LibgenObjectType,
                ObjectId     = foundItem.ObjectId
            }).ToList();
            await MainModel.AddFiles(filesToAdd);

            mode = Mode.FILES_ADDED;
            UpdateAddAllFilesToLibraryButton();
        }