RegisterRegister    SearchSearch   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AJAX upload progress bar

File sharing script

File mirror script

Newsletter script
mp3 preview problems
Goto page 1, 2  Next
 
Post new topic   This topic is locked: you cannot edit posts or make replies.    SibSoft Ltd Forum Index -> XFileSharing Pro
View previous topic :: View next topic  
Author Message
Arthur



Joined: 04 Dec 2009
Posts: 74

PostPosted: Dec 05, 2009 11:46 pm    Post subject: mp3 preview problems Reply with quote

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?


Last edited by Arthur on Dec 06, 2009 12:00 am; edited 1 time in total
Back to top
View user's profile Send private message
komi



Joined: 27 Nov 2009
Posts: 159

PostPosted: Dec 05, 2009 11:51 pm    Post subject: Reply with quote

If you are using 1.5:

In /cgi-bin/index.cgi find:

Code:
   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}";
   }


and replace with:

Code:
   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";
   }


That should help you out Wink
Back to top
View user's profile Send private message
Arthur



Joined: 04 Dec 2009
Posts: 74

PostPosted: Dec 05, 2009 11:54 pm    Post subject: Reply with quote

im using 1.6 is it still the same?

I have this:

Code:
   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};
   }
Back to top
View user's profile Send private message
komi



Joined: 27 Nov 2009
Posts: 159

PostPosted: Dec 06, 2009 12:01 am    Post subject: Reply with quote

To resolve the filesize problem, simply remove:

Code:
&& $file->{file_size}<1048576*10


The filename problem should be fixed already in 1.6
Back to top
View user's profile Send private message
Arthur



Joined: 04 Dec 2009
Posts: 74

PostPosted: Dec 06, 2009 12:10 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
komi



Joined: 27 Nov 2009
Posts: 159

PostPosted: Dec 06, 2009 12:14 am    Post subject: Reply with quote

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, as I said it should be fixed already. Can you give me an example link?
Back to top
View user's profile Send private message
Arthur



Joined: 04 Dec 2009
Posts: 74

PostPosted: Dec 06, 2009 12:23 am    Post subject: Reply with quote

link

Last edited by Arthur on Dec 06, 2009 12:59 am; edited 1 time in total
Back to top
View user's profile Send private message
komi



Joined: 27 Nov 2009
Posts: 159

PostPosted: Dec 06, 2009 12:50 am    Post subject: Reply with quote

As I can see you are using dl.cgi
Try enabling the "Generate direct links" option.
Back to top
View user's profile Send private message
Arthur



Joined: 04 Dec 2009
Posts: 74

PostPosted: Dec 06, 2009 12:54 am    Post subject: Reply with quote

Okay yes when I enable direct links it seems to work. But I dont want use direct linking..
Back to top
View user's profile Send private message
komi



Joined: 27 Nov 2009
Posts: 159

PostPosted: Dec 06, 2009 12:56 am    Post subject: Reply with quote

Sorry, I don't know anything about the dl.cgi
Why do you want to use dl.cgi?
Back to top
View user's profile Send private message
Arthur



Joined: 04 Dec 2009
Posts: 74

PostPosted: Dec 06, 2009 12:58 am    Post subject: Reply with quote

what do you mean? Do I have other options? I bought the script like a week ago so im getting the hang of it still Wink
Back to top
View user's profile Send private message
komi



Joined: 27 Nov 2009
Posts: 159

PostPosted: Dec 06, 2009 1:06 am    Post subject: Reply with quote

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.

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.
Back to top
View user's profile Send private message
Arthur



Joined: 04 Dec 2009
Posts: 74

PostPosted: Dec 06, 2009 1:09 am    Post subject: Reply with quote

But how do I not use dl.cgi? Just having it with direct links?
Back to top
View user's profile Send private message
komi



Joined: 27 Nov 2009
Posts: 159

PostPosted: Dec 06, 2009 1:10 am    Post subject: Reply with quote

When "Generate direct links" is checked, you are using direct links instead of dl.cgi
Back to top
View user's profile Send private message
Arthur



Joined: 04 Dec 2009
Posts: 74

PostPosted: Dec 06, 2009 1:13 am    Post subject: Reply with quote

oh k but is there a way to do it so it doesnt generate a page with a direct link, instead maybe replace the "create download link" button with jpg button and allow only download?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    SibSoft Ltd Forum Index -> XFileSharing Pro All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group