diff options
author | Sam Wilkins <samwilkins333@gmail.com> | 2019-09-15 14:42:47 -0400 |
---|---|---|
committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-09-15 14:42:47 -0400 |
commit | 411d6015c7a9f2a3c10bd170e6e584e7c53833f8 (patch) | |
tree | e00dc73346440df79284789220375bd6ef88cd27 /src | |
parent | 14da721a8cf5362d50e946a61617c25be2149828 (diff) |
unable to support drag drop
Diffstat (limited to 'src')
-rw-r--r-- | src/client/apis/google_docs/GooglePhotosClientUtils.ts | 8 | ||||
-rw-r--r-- | src/client/views/collections/CollectionSubView.tsx | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/client/apis/google_docs/GooglePhotosClientUtils.ts b/src/client/apis/google_docs/GooglePhotosClientUtils.ts index dfc4a6ddf..a13d9dcd6 100644 --- a/src/client/apis/google_docs/GooglePhotosClientUtils.ts +++ b/src/client/apis/google_docs/GooglePhotosClientUtils.ts @@ -214,9 +214,9 @@ export namespace GooglePhotos { let nextPageTokenStored: Opt<string> = undefined; let found = 0; do { - const { mediaItems, nextPageToken } = (await photos.search(albumId, pageSize, nextPageTokenStored)) as any; - mediaItems.push(...mediaItems); - nextPageTokenStored = nextPageToken; + const response: any = await photos.mediaItems.search(albumId, pageSize, nextPageTokenStored); + mediaItems.push(...response.mediaItems); + nextPageTokenStored = response.nextPageToken; } while (found); return mediaItems; }; @@ -280,6 +280,8 @@ export namespace GooglePhotos { baseUrl: string; } + export const ListAlbums = async () => (await endpoint()).albums.list(); + export const AddTextEnrichment = async (collection: Doc, content?: string) => { const photos = await endpoint(); const albumId = StrCast(collection.albumId); diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx index aafd9460e..4d4f69b92 100644 --- a/src/client/views/collections/CollectionSubView.tsx +++ b/src/client/views/collections/CollectionSubView.tsx @@ -220,6 +220,7 @@ export function CollectionSubView<T>(schemaCtor: (doc: Doc) => T) { return; } if ((matches = /(https:\/\/)?photos\.google\.com\/(u\/3\/)?album\/([^\\]+)/g.exec(text)) !== null) { + const albums = await GooglePhotos.Transactions.ListAlbums(); const albumId = matches[3]; const mediaItems = await GooglePhotos.Query.AlbumSearch(albumId); console.log(mediaItems); |