I have 3 problems with mp3 preview:
1. When I upload a mp3 file over 10mb the preview and song details don't show up. (It only lets me download)
2. How can I make it so when uploading a mp3 file that has the key ' it will change it to _ or something. When a mp3 file has the ' it wont preview anymore. (It only lets me download)
3. When using the software to upload mp3 file with the & or ' it wont preview anymore. (It only lets me download)
Help?
XFileSharing Pro - mp3 preview problems
mp3 preview problems
Last edited by Arthur on Dec 06, 2009 12:00 am, edited 1 time in total.
If you are using 1.5:
In /cgi-bin/index.cgi find:
and replace with:
That should help you out
In /cgi-bin/index.cgi find:
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},
fs_key => $file->{srv_key},
ip => $ses->getIP });
my ($ddcode) = $res=~/^OK:(.+)$/;
$file->{song_url} = "$file->{srv_htdocs_url}/$ddcode/$file->{file_name}";
}
Code: Select all
if($c->{mp3_mod} && $file->{file_name}=~/\.mp3$/i && !$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 => 'preview.mp3',
fs_key => $file->{srv_key},
ip => $ses->getIP });
my ($ddcode) = $res=~/^OK:(.+)$/;
$file->{song_url} = "$file->{srv_htdocs_url}/$ddcode/preview.mp3";
}
im using 1.6 is it still the same?
I have this:
I have this:
Code: Select all
if($c->{mp3_mod} && $file->{file_name}=~/\.mp3$/i && $file->{file_size}<1048576*10 && !$file->{message})
{
DownloadTrack($file) if $c->{mp3_mod_no_download};
$file->{song_url} = DownloadGenLink($file,"$file->{file_code}.mp3");
(undef,$file->{mp3_secs},$file->{mp3_bitrate},$file->{mp3_freq},$file->{mp3_artist},$file->{mp3_title},$file->{mp3_album},$file->{mp3_year}) = split(/\|/,$file->{file_spec}) if $file->{file_spec}=~/^A\|/;
$file->{no_link}=1 if $c->{mp3_mod_no_download};
$ses->{meta_keywords}.=", $file->{mp3_artist}" if $file->{mp3_artist};
$ses->{meta_keywords}.=", $file->{mp3_title}" if $file->{mp3_title};
$ses->{meta_keywords}.=", $file->{mp3_album}" if $file->{mp3_album};
}
To resolve the filesize problem, simply remove:
The filename problem should be fixed already in 1.6
Code: Select all
&& $file->{file_size}<1048576*10
Well, as I said it should be fixed already. Can you give me an example link?Arthur wrote:k that fixed it. Thnx
Now the other question is when I upload mp3 files with the key ' it wont show the preview instead it says "This text will be replaced"
How can I fix this? Maybe a solution where unrecognized keys to be replaced with _ so it will show the preview?
Well, I read multiple times that dl.cgi is only causing high server load.
So you should only use it when you necessarily want to cap download speeds.
So you should only use it when you necessarily want to cap download speeds.
PilgrimX182 wrote:Using sending files via script allow you to limit download speed, but generates high server load. It will be able to handle like 30-50 simultaneous downloads and no dl resume. Another download mode called "Direct Links" is able to handle so many users as your web server can handle sending static files. So it's pretty good designed for high load. Script itself can generate some load when browsing through files, etc, but it's peak load so it won't hurt a lot.