-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Idea] Any way to search for all photos "Shared by a Google user"? #8
Comments
theoretically possible, but would require sending a request to get each file's info, so it would be slow and be vary of the ownership filter, it produces inconsistent results |
Ownership filter worked fine for me, it separated all files not owned by me in a separate album. Could you guide what request to send in order to get photos owned by specific people. |
It would not be possible to just get all media owned by "x", the only way is to scan the library, then for each media item send a request to get that info, and filter based on it. |
Here is a little POC script to find and delete "shared by x" items. let nextPageId = null;
const ownerName = 'John';
do {
const page = await gptkApi.getItemsByUploadedDate(nextPageId);
for (const item of page.items){
if (item.isOwned) continue
const itemInfo = await gptkApi.getItemInfo(item.mediaKey);
if (itemInfo.owner.name == ownerName){
await gptkApi.moveItemsToTrash([itemInfo.dedupKey]);
console.log('item moved to trash', itemInfo);
}
}
nextPageId = page.nextPageId;
} while (nextPageId);
console.log("DONE") 04.07.24 - updated the script to work with the latest version of gptk |
Thank you so much. That's really helpful. In the end I archived by date uploaded, restored those taken by my partners phone, and deleted those in archive - but this would have been much better, and is what I'll use next time (if there is a next time). I'm also rebuilding my own library from scratch, using my own API key (rather than rclones) so I can share albums, rather than rely on partner sharing. SO much learnt. Your tool has been an invaluable part of fixing my own mistakes, so thank you. |
My library consist of photos that I saved from various shared album and partner account. Now, I have filtered photos not owned by me using gptk, can I futher filter them by ownership of specific person?
The text was updated successfully, but these errors were encountered: