MCPcopy Create free account
hub / github.com/Useful-Scripts-Extension/useful-script / enlargePhotos

Function enlargePhotos

scripts/test.js:657–672  ·  view source on GitHub ↗
(albumPhotos, albumId, progress)

Source from the content-addressed store, hash-verified

655 }
656
657 async function enlargePhotos(albumPhotos, albumId, progress) {
658 let result = [];
659 for (let i = 0; i < albumPhotos.length; i++) {
660 try {
661 let photo = albumPhotos[i];
662 progress?.(i, albumPhotos.length);
663 let large = await enlargePhoto(photo.id, albumId);
664 result.push(...large);
665 console.log("large", photo.uri, large);
666 } catch (e) {
667 result.push(photo.uri);
668 console.log("ERROR", e);
669 }
670 }
671 return result;
672 }
673
674 async function downloadAlbum({ albumId, progress, cursor = null }) {
675 let result = [];

Callers 1

test.jsFile · 0.85

Calls 1

enlargePhotoFunction · 0.85

Tested by

no test coverage detected