Changeset 4467 for extensions/pLoader/trunk/src/Uploader/ImageList.pm
- Timestamp:
- Dec 10, 2009, 3:21:06 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/pLoader/trunk/src/Uploader/ImageList.pm
r4422 r4467 95 95 use_exif_preview 96 96 image_sums 97 upload_image_sums 97 98 sums 98 99 version … … 120 121 upload_file 121 122 upload_name 123 ReuploadCallback 124 reupload_action_files 125 reupload_action_properties 126 reupload_action_properties_m 127 reupload_not_ask 122 128 / 123 129 ); … … 253 259 # ok 254 260 if(!$@){ 255 $self->progress_msg( "Selection thumbnail created for %s");261 $self->progress_msg(gettext("Selection thumbnail created for %s")); 256 262 } 257 263 else { … … 554 560 555 561 my $rval = 1 ; 556 return $rval if( -e $self->current_image->site_resized_file );562 #return $rval if( -e $self->current_image->site_resized_file ); 557 563 558 564 printf( … … 634 640 my ( $self ) = @_; 635 641 636 return 1 if( -e $self->current_image->site_thumb_file );642 #return 1 if( -e $self->current_image->site_thumb_file ); 637 643 638 644 my $rval = 1; … … 765 771 watermark_x 766 772 watermark_color 773 reupload_action_files 774 reupload_action_properties 775 reupload_action_properties_m 767 776 / 768 777 ] … … 797 806 $self->upload_begin_time(time); 798 807 $self->upload_selection_count(scalar @{$self->image_selection}); 808 # for re-upload management 809 $self->upload_image_sums( [ 810 map { $self->GetImage($_)->file_sum } 811 @{$self->image_selection} 812 ] 813 ); 814 815 # check if already exist on server 816 my $uploaded = $self->pwg->IsAlreadyUploaded($self->upload_image_sums); 817 my @already_uploaded = grep { $_ } values %$uploaded ; 818 $self->ReuploadCallback->() if ( scalar @already_uploaded and !$self->reupload_not_ask ); 819 820 799 821 foreach(@{$self->image_selection}) { 800 822 # current image object 801 823 $self->current_image( 802 824 $self->GetImage($_) 803 ); 825 ); 804 826 # prepare resized, high, thumbnail 805 $self->_upload_selection_prepare(); 827 # if not already uploaded 828 $self->_set_site_resized_file(); 829 $self-> _set_site_high_file (); 830 # photo metadata 831 $self->_prepare_upload_properties(); 832 $self->_upload_selection_prepare() if (!$uploaded->{$self->current_image->file_sum} or $self->reupload_action_files); 806 833 807 834 # transfert resized, high, thumbnail to site … … 827 854 $self->progress_thumbnail_refresh->(); 828 855 # PREPARE 829 $self->_set_site_resized_file();830 856 $self->_set_upload_msg(gettext("Preparing resized image for")); 831 857 $self->_upload_progress(); … … 848 874 'Yes, use a copy of the original photo' => 'ORIGINAL', 849 875 }; 850 876 printf("upload HD %s\n", $self->upload_hd); 851 877 $self->upload_high( 852 878 $decode->{$self->upload_hd} … … 866 892 $self->_upload_progress(); 867 893 868 # photo metadata869 $self->_prepare_upload_properties();870 894 871 895 } … … 923 947 highdef_msg=>gettext("Uploading high definition"), 924 948 checksum_msg=>gettext("Checksum for"), 949 original_sum=>$self->current_image->file_sum, 925 950 } 926 951 ); … … 1102 1127 1103 1128 if($bModifyOriginal){ 1104 $self-> _set_site_high_file ();1105 1129 1106 1130 my $image = Image::Magick->new(); … … 1238 1262 sub _prepare_upload_properties { 1239 1263 my ( $self ) = @_; 1264 1265 $self->pwg->reupload_action_files( 1266 $self->reupload_action_files||1 1267 ); 1268 $self->pwg->reupload_action_properties( 1269 $self->reupload_action_properties||2 1270 ); 1271 1272 $self->pwg->reupload_action_properties_m( 1273 $self->reupload_action_properties_m||1 1274 ); 1240 1275 1241 1276 $self->pwg->upload_high( … … 1285 1320 join(',', @{$self->current_image->site_tags}) 1286 1321 ); 1322 1287 1323 1288 1324 }
Note: See TracChangeset
for help on using the changeset viewer.