Changeset 16952

Show
Ignore:
Timestamp:
21.08.2008 16:31:16 (11 years ago)
Author:
ak19
Message:

Associated file names are url-encoded

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugins/MP3Plugin.pm

    r16392 r16952  
    171171    return 0 if ($file eq "" || $filename eq ""); 
    172172 
    173     # Add the file metadata 
    174     my $assoc_url = $file; 
    175 #    $assoc_url =~ s/ /%20/g; # probably need to do more escaping than this!! 
    176     $assoc_url =~ s/ /_/g; # workaround for now 
    177     my $dst_file = $file; 
    178     $dst_file =~ s/ /_/g; 
     173    # Add the file metadata. 
     174    # $assoc_url will be the srcurl. Since it is URL encoded here, it will be 
     175    # able to cope with special characters--including spaces--in mp3 filenames. 
     176    # the assocfilename generated will be a URL encoded version of the utf8 filename 
     177    my $assoc_url = $doc_obj->get_sourcefile();  
     178    my $dst_file = $doc_obj->get_assocfile_from_sourcefile(); 
    179179 
    180180    # Add the file as an associated file ...