Skip to content

Commit

Permalink
fix google photos picker videos
Browse files Browse the repository at this point in the history
would previously just download thumbnails
  • Loading branch information
mifi committed Feb 3, 2025
1 parent dd555d8 commit 250203a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -337,14 +337,15 @@ async function resolvePickedPhotos({
return mediaItems.map(
({
id,
type,
// we want the original resolution, so we don't append any parameter to the baseUrl
// https://developers.google.com/photos/library/guides/access-media-items#base-urls
mediaFile: { mimeType, filename, baseUrl },
}) => ({
platform: 'photos' as const,
id,
mimeType,
url: baseUrl,
url: type === 'VIDEO' ? `${baseUrl}=dv` : baseUrl, // dv to download video
name: filename,
}),
)
Expand Down

0 comments on commit 250203a

Please sign in to comment.