From 5d17e224f37e08004c4561ec9cee1a1cf9ee2bd2 Mon Sep 17 00:00:00 2001 From: KoalaBear Date: Mon, 23 Nov 2020 22:52:44 +0100 Subject: [PATCH] - Add support for Google Team Drives --- OpenDirectoryDownloader.GoogleDrive/GoogleDriveIndexer.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OpenDirectoryDownloader.GoogleDrive/GoogleDriveIndexer.cs b/OpenDirectoryDownloader.GoogleDrive/GoogleDriveIndexer.cs index 7c54c24d..4c39bbe0 100644 --- a/OpenDirectoryDownloader.GoogleDrive/GoogleDriveIndexer.cs +++ b/OpenDirectoryDownloader.GoogleDrive/GoogleDriveIndexer.cs @@ -85,6 +85,8 @@ public static async Task IndexAsync(WebDirectory webDirectory) listRequest.Q = $"'{folderId}' in parents"; listRequest.PageToken = nextPageToken; listRequest.Fields = "nextPageToken, files(id, name, mimeType, size)"; + listRequest.IncludeItemsFromAllDrives = true; + listRequest.SupportsAllDrives = true; Google.Apis.Drive.v3.Data.FileList fileList = await listRequest.ExecuteAsync(); foreach (Google.Apis.Drive.v3.Data.File file in fileList.Files.OrderByDescending(f => f.MimeType == FolderMimeType).ThenBy(f => f.Name))