Changeset 252

Show
Ignore:
Timestamp:
03/03/06 12:21:12
Author:
miyagawa
Message:

Subscription::Bloglines: support xmlUrl mapping for feeds in root folder

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Subscription/Bloglines.pm

    r226 r252  
    8787 
    8888    my $meta; 
    89     for my $folder ($subscription->folders) { 
    90         my @feeds = $subscription->feeds_in_folder($folder->{BloglinesSubId}); 
     89    for my $folder ($subscription->folders, 0) { 
     90        my $subid = ref $folder ? $folder->{BloglinesSubId} : 0; 
     91        my @feeds = $subscription->feeds_in_folder($subid); 
    9192        for my $feed (@feeds) { 
    9293            # BloglinesSubId is different from bloglines:siteid. Don't use it 
    9394            $meta->{$feed->{htmlUrl}} = { 
    94                 folder => $folder->{title}
     95                folder => $folder ? $folder->{title} : undef
    9596                xmlUrl => $feed->{xmlUrl}, 
    9697            }; 
     
    125126        # under fetch_pfolders option, set folder as tags to feeds 
    126127        if (my $meta = $self->{bloglines_meta}->{$feed->link}) { 
    127             $feed->tags([ $meta->{folder} ])
     128            $feed->tags([ $meta->{folder} ]) if $meta->{folder}
    128129            $feed->url($meta->{xmlUrl}); 
    129130        }