MP3 player does not work with Arabic file name - any idea?

Powerfull XFileSharing version

Moderator: admin

Message
Author
Dellow
Posts: 26
Joined: Oct 11, 2007 2:08 am

MP3 player does not work with Arabic file name - any idea?

#1 Postby Dellow » Aug 19, 2009 8:55 am

Hello,

Flash MP3 pleyr does not work with Arabic file name.

I don't like to enable Sanitize filename option to replace all letters except a-z0-9-. with underline , because the file link will be like this :

Code: Select all

http://site.com/0emst9y/___________________2_.mp3.html

Which i don't like.

So any one have idea for this issue ?

ankurs
Posts: 1054
Joined: Mar 10, 2009 2:34 am

#2 Postby ankurs » Aug 19, 2009 11:59 am

flash doesn't support some special characters , you will have to sanitize it

User avatar
PilgrimX182
Posts: 2181
Joined: Mar 22, 2006 1:39 pm
Location: UFO Lab
Contact:

#3 Postby PilgrimX182 » Aug 19, 2009 12:55 pm

Here goes quick hack: in index.cgi find this part part of code:

Code: Select all

   if($c->{mp3_mod} && $file->{file_name}=~/\.mp3$/i && $file->{file_size}<1048576*10 && !$file->{message})
   {
      my $res = $ses->api($file->{srv_cgi_url},
                          {
                           op           => 'gen_link',
                           file_id      => $file->{file_real_id}||$file->{file_id},
                           file_code    => $file->{file_real},
                           file_name    => $file->{file_name},

and replace

Code: Select all

$file->{file_name}

with

Code: Select all

'song.mp3'

User avatar
PilgrimX182
Posts: 2181
Joined: Mar 22, 2006 1:39 pm
Location: UFO Lab
Contact:

#4 Postby PilgrimX182 » Aug 19, 2009 1:09 pm

Also do same replace in line

Code: Select all

$file->{song_url} = "$file->{srv_htdocs_url}/$ddcode/$file->{file_name}";

Dellow
Posts: 26
Joined: Oct 11, 2007 2:08 am

#5 Postby Dellow » Aug 22, 2009 8:32 am

WOW good idea.. i hope this resolve my and others problem.

but i made the modification that give , but seems not working for me. and even the file name uploaded as numbers.mp3.

i think still somthing missing...

Dellow
Posts: 26
Joined: Oct 11, 2007 2:08 am

#6 Postby Dellow » Aug 25, 2009 9:25 am

No chance to resolve this isseu ? :(

User avatar
PilgrimX182
Posts: 2181
Joined: Mar 22, 2006 1:39 pm
Location: UFO Lab
Contact:

#7 Postby PilgrimX182 » Aug 25, 2009 10:23 am

PM me FTP access, will do quickly.

Dellow
Posts: 26
Joined: Oct 11, 2007 2:08 am

#8 Postby Dellow » Aug 26, 2009 12:49 pm

Great, Works thank you PilgrimX182...

This hack will be lost in next version and we will need it again unless you include it by default in next version.

User avatar
PilgrimX182
Posts: 2181
Joined: Mar 22, 2006 1:39 pm
Location: UFO Lab
Contact:

#9 Postby PilgrimX182 » Aug 26, 2009 3:11 pm

Yea, already fixed it in upcoming version.


Return to “XFileSharing Pro”

Who is online

Users browsing this forum: No registered users and 1 guest