Changeset 227

Show
Ignore:
Timestamp:
08/22/06 12:54:31 (2 years ago)
Author:
miya
Message:

CustomFeed::AmazonWebService: add the link to original script.
Filter::FFmpeg: encode local_path and file name.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plagger/trunk/lib/Plagger/Plugin/CustomFeed/AmazonWebService.pm

    r226 r227  
    2727    my $feed = Plagger::Feed->new; 
    2828    $feed->type('AmazonWebService'); 
    29     $feed->title('Amazon Web Service'); 
     29 
     30    my $title = $self->conf->{title} || 'Amazon Web Service'; 
     31    $feed->title($title); 
    3032 
    3133    my $attr; 
     
    5052            my $date = Plagger::Date->strptime('%Y/%m/%d', $item->ReleaseDate); 
    5153            $date = Plagger::Date->strptime('%Y/%m', $item->ReleaseDate) unless $date; 
    52             next unless $date; 
     54            unless($date){ 
     55                $context->log(error => 'Date format is invalid: ' . $item->ReleaseDate); 
     56                next; 
     57            } 
    5358            $entry->date($date); 
    5459 
     
    135140=back 
    136141 
     142=head1 SEE ALSO 
     143 
     144This plugin in originally made by id:wata_d . 
     145See http://d.hatena.ne.jp/wata_d/20060821 . 
     146 
     147L<Plagger>, L<Net::Amazon> 
     148 
    137149=head1 AUTHOR 
    138150 
    139151Gosuke Miyashita 
    140152 
    141 =head1 SEE ALSO 
    142  
    143 L<Plagger>, L<Net::Amazon> 
    144  
    145153=cut 
  • plagger/trunk/lib/Plagger/Plugin/Filter/FFmpeg.pm

    r222 r227  
    66use File::Spec; 
    77use FFmpeg::Command; 
    8 use Encode; 
    98 
    109sub register { 
     
    3231 
    3332    my $ff = FFmpeg::Command->new($self->conf->{command}); 
    34     $ff->input_options({ file => $e->enclosure->local_path }); 
     33    $ff->input_options({ file => encode($encoding, $e->enclosure->local_path) }); 
    3534 
    3635    my $output_file = File::Spec->catfile($self->conf->{dir}, "$file.$ext"); 
    3736    $ff->output_options({ 
    38         file    => $output_file
     37        file    => encode($encoding, $output_file)
    3938        device  => $self->conf->{device} || 'ipod', 
    4039        title   => encode($encoding, $e->title),