PubSub not downloading image enclosures automatically.
PubSub not downloading image enclosures automatically.
- Subject: PubSub not downloading image enclosures automatically.
- From: "Colin Barrett" <email@hidden>
- Date: Tue, 30 Sep 2008 21:09:31 -0700
PubSub does not seem to be downloading image enclosures automatically.
I'm pretty sure it's not just that the delegate methods that aren't
getting called, since I checked the PubSub sqlite DB and from what I
could tell no files were downloaded.
Any suggestions? Or is PubSub just broken... in which case I'd file a
radar and write my own RSS parsing code... ick...
Here's a codesample that seems to not be working.
-----------
- (void)awakeFromNib
{
PSClient *client = [PSClient applicationClient];
PSFeedSettings *settings = client.settings;
settings.downloadsEnclosures = YES;
settings.enclosureTypes = [NSArray arrayWithObject:@"image/jpeg"];
settings.maxEnclosureSize = PSFeedSettingsUnlimitedSize;
settings.refreshesInBackground = NO;
client.settings = settings;
client.delegate = self;
PSFeed *feed = [client addFeedWithURL:[NSURL
URLWithString:@"http://api.flickr.com/services/feeds/photos_public.gne?id=13058742@N00&lang=en-us&format=atom"]];
[feed refresh:NULL];
}
- (void)feed:(PSFeed *)feed didAddEntries:(NSArray *)entries
{
NSLog(@"%@ added entries %@", feed, entries);
}
- (void)enclosure:(PSEnclosure *)enclosure
downloadStateDidChange:(PSEnclosureDownloadState)state
{
NSLog(@"%@ %d", enclosure, state);
}
----------
When I run the code, I get the following output:
----------
2008-09-27 15:42:26.434 PhotoRSS[92602:10b]
PSFeed[<http://api.flickr.com/services/feeds/photos_public.gne?id=13058742@N00&lang=en-us&format=atom>
2/8] added entries (
PSEntry['Happy Birthday' 3166],
PSEntry['OpenDoc ftw' 3157],
PSEntry['Loot from Portland' 3159],
PSEntry['Nerd mode engage!' 3158],
PSEntry['Anne' 3170],
PSEntry['Ready for Action' 3171],
PSEntry['Hotel Monaco' 3155],
PSEntry['Palin hates polar bears' 3172],
PSEntry['Nice Hawaii license plate!' 3165],
PSEntry['photo.jpg' 3163],
PSEntry['KILL' 3164],
PSEntry['WALL·E Rides ... Muni?' 3169],
PSEntry['My new pixel rig' 3162],
PSEntry['Aloha Shoyu is the best, don't pose' 3161],
PSEntry['New glasses have arrived!' 3160],
PSEntry['New Digs' 3168],
PSEntry['L&Ls Loco Moco and Spam musubi' 3153],
PSEntry['WTF hot sauce?' 3154],
PSEntry['Inside Macintosh' 3156],
PSEntry['CA$H' 3167]
)
---------
-Colin
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden