-
Notifications
You must be signed in to change notification settings - Fork 14
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
Limit on Get photo assets #11
Comments
@firsname-markus : Did you use |
@domax : Yep, i tried with different combos like --> limit: 10 interval:100, limit: 30 interval: 100, limit: 100 interval: 1000... No matter what i always get 393 photos. I'm testing with iPhone 7 and i havent noticed any freezing or slowing no matter what combo of settings, but still only 393 photos.. |
That shouldn't happen then. The only reason that may prevent fetching is that your 394th photo has some absent, wrong or corrupted attribute. Are you able to run your app in Xcode and catch in debugger what happens with 394th photo in your roll? |
I tested fetching roll with more than 2.5k photos on iPhone 6 |
@domax first of all, thanks for the support :) Fecthing photo #393 for some reason returns an empty object.. EDIT: Actually #392 is the last working fetch, after that only empty object is returned. If i put offset to for example 410, still Photos are returning [] and fails on that. Weird because all the other apps in my phone shows all the photos just fine |
Could you please provide your snippet of code you use. |
I have a clean PhoneGap project with only this inside deviceReady..
as I said earlier i have tried with different limit ( 1-100), interval (30-3000) and offset (395++). I have also tried to determine the album. Each will fetch without freezing, slacking or other problems until photo #392. It doesn't matter which photo is #392. #393 always returns []. IF offset is for example 395 it returns [] I'm totally out of ideas |
OK, got it. First of all -
It's a second question - why it is empty. That may happen in following cases:
2nd I believe is your case. So far you have no any errors during fetching, I suppose you have only 393 available photos in your roll. To make sure try to use the following snippet: Photos.photos(console.log, console.error); This will try to get all available photos on your "Camera Roll" "smart" album at once and drop it all into webview log. Please notice that calling You may try to:
Smth like that: Photos.collections({"collectionMode": "ALBUMS"},
function(albums) {
var ids = [];
albums.forEach(function(album){ids.push(album.id)});
console.log(ids);
Photos.photos(ids, {limit:100}, console.log, console.error);
}, console.error); Since it's iOS, you may try "MOMENTS" and "SMART" |
--> returns 389 photos
--> returns 389 photos
--> returns 389 photos
--> returns 389 photos I have 569 photos in roll, all of them are either JPG, GIF or PNG |
There is a bug in assetResourcesForAsset - it doesn't work properly for all the images. Moreover, it obtains resource for very long time - too long for just a file name. Implementation was replaced with getting file name from asset properties directly - quite hacky however.
Well, looks like I found where bug was - see comment for commit above. |
Hey, I also got this issue. I got 3,3k images but can only find 2,8k of them. My xCode output is filled with the skipped assets. Where I can see the ID of the images but I can't seem to find them in my js response. Image counter:
What should I do to get the ID:s of the skipped assets? |
Do you still develop this plugin for Cordvoa? @domax |
Assets are skipped in 3 cases:
All these cases depend on
Now I have neither time nor motivation for that. Feel free to take support of this plugin. |
When fecthing all photos, max 393 photos is returned. There are 500+ photos in a roll. I tried increase the interval and lower the limit but still no help.
Any ideas?
The text was updated successfully, but these errors were encountered: