Changeset 210

Show
Ignore:
Timestamp:
03/01/06 10:08:33
Author:
miyagawa
Message:

Subscription::Bloglines: rename fetch_folders to fetch_meta. Set xmlUrl to $feed->url under fetch_meta mode.

Files:

Legend:

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

    r209 r210  
    6868        $context->subscription->add($feed); 
    6969 
    70         if ($self->conf->{fetch_folders}) { 
     70        if ($self->conf->{fetch_meta}) { 
    7171            # TODO: cache it! 
    72             $self->fetch_folders($context); 
    73         } 
    74     } 
    75 } 
    76  
    77 sub fetch_folders
     72            $self->fetch_meta($context); 
     73        } 
     74    } 
     75} 
     76 
     77sub fetch_meta
    7878    my($self, $context) = @_; 
    7979 
     
    8787        for my $feed (@feeds) { 
    8888            # BloglinesSubId is different from bloglines:siteid. Don't use it 
    89             $self->{folders}->{$feed->{htmlUrl}} = $folder->{title}; 
    90             $context->log(debug => "$feed->{htmlUrl}: $folder->{title}"); 
     89            $self->{bloglines_meta}->{$feed->{htmlUrl}} = { 
     90                folder => $folder->{title}, 
     91                xmlUrl => $feed->{xmlUrl}, 
     92            }; 
    9193        } 
    9294    } 
     
    115117        $feed->meta->{bloglines_id} = $source->{bloglines}->{siteid}; 
    116118 
    117         # under fetch_folders option, set folder as tags to feeds 
    118         if (my $folder = $self->{folders}->{$feed->link}) { 
    119             $feed->tags([ $folder ]); 
     119        # under fetch_pfolders option, set folder as tags to feeds 
     120        if (my $meta = $self->{bloglines_meta}->{$feed->link}) { 
     121            $feed->tags([ $meta->{folder} ]); 
     122            $feed->url($meta->{xmlUrl}); 
    120123        } 
    121124 
     
    185188to 1, the default. 
    186189 
    187 =item fetch_folders 
    188  
    189 C<fetch_folders> specifies whether this plugin fetches I<folder> 
     190=item fetch_meta 
     191 
     192C<fetch_meta> specifies whether this plugin fetches I<folder> 
    190193strucuture using listsubs API. With this option on, all feeds under 
    191194I<Plagger> folder will have I<Plagger> as its tag.