Changeset 887 for lang/perl/plagger/lib/Plagger/Plugin/Filter/FFmpeg.pm
- Timestamp:
- 10/30/07 15:01:02 (13 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/plagger/lib/Plagger/Plugin/Filter/FFmpeg.pm
r272 r887 26 26 if $self->conf->{ext} and $self->conf->{filename}; 27 27 28 my $encoding = $self->conf->{encoding} || 'cp932';29 30 28 my $enclosures = $entry->enclosures; 31 29 $context->log( warn => 'You shuld not use filename option because the entry has several enclosures.' ) … … 49 47 50 48 my $ff = FFmpeg::Command->new($self->conf->{command}); 51 $ff->input_options({ file => encode($encoding,$enclosure->local_path) });49 $ff->input_options({ file => $self->convert($enclosure->local_path) }); 52 50 53 51 my $output_file = File::Spec->catfile($self->conf->{dir}, "$file"); 54 52 my $output_options = { 55 file => encode($encoding,$output_file),53 file => $self->convert($output_file), 56 54 device => $self->conf->{device} || 'ipod', 57 title => encode($encoding,$entry->title),58 author => encode($encoding,$entry->author),59 comment => encode($encoding,$entry->summary),55 title => $self->convert($entry->title), 56 author => $self->convert($entry->author), 57 comment => $self->convert($entry->summary), 60 58 %{ $self->conf->{options} || {} }, 61 59 }; … … 90 88 $enclosure->type( Plagger::Util::mime_type_of($file) ); 91 89 } 90 } 91 92 93 sub convert { 94 my ($self, $str) = @_; 95 utf8::decode($str) unless utf8::is_utf8($str); 96 return encode($self->conf->{encoding} || 'cp932', $str); 92 97 } 93 98
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)