Page 1 of 1
Bashpodder downloading mp3 as mirror.php
Posted: Mon Oct 23, 2006 8:02 pm
by elgordo123
Hey guys. I'm using bashpodder and the mp3 files are always being downloaded as mirror.php. I have to rename it. Is there a fix for this?
Using this in bp.conf:
http://thelinuxlink.net/tllts/tllts.rss
The log shows:
http://www.tllts.org/mirror.php?fname=t ... -18-06.mp3
Could this be a result of one of those "unreliable bash scripts" I've heard about?
I guess I could reformat and load XP just so I can get the linux show, but then that would kinda defeat the purpose! Keep of the great work. Let me know...
Posted: Mon Oct 23, 2006 9:20 pm
by CptnObvious999
I have figured out a work around but it can only be done on the server side. Here's how to do it:
1) put all the files in /episodes/ as tllts160.ogg or tllts-134.mp3 etc.
2) type "AddType application/x-httpd-php tllts_*.ogg" into the appropriate place in httpd.conf or in the modules.d/70_mod_php5.conf (dependant on distro I think)
3) Create a php file named something like "tllts_123.ogg" for each episode and in it put the following code:
Code: Select all
<?php
$file = $_SERVER["SCRIPT_NAME"];
$parts = Explode('/', $file);
$file = $parts[count($parts) - 1];
$parts = Explode('_', $file);
$file = "tllts" + $parts[count($parts) - 1];
header("Location: http://www.tllts.org/episodes/" + $currentFile);
?>
That should do it. Basically all that does is allows some php files to run with the ogg extension but makes it so the files in /episodes/ don't get sent to the php interpreter. If one of the TLLTS crew members need things to run differently I can change it to fit your needs and I'm sure there is a better way to automate the creation of each php file for each episode (like with a good old bash script

). This is the only way I know of that will solve the problem and it seems kinda complicated for something so simple, but if someone knows a better way please tell me.
Posted: Mon Oct 23, 2006 10:46 pm
by Linc
CptnObvious999 wrote:I have figured out a work around but it can only be done on the server side. Here's how to do it:.......................
Or, you could just download the latest version of BashPodder...
Posted: Mon Oct 23, 2006 10:53 pm
by CptnObvious999
Linc wrote:CptnObvious999 wrote:I have figured out a work around but it can only be done on the server side. Here's how to do it:.......................
Or, you could just download the latest version of BashPodder...
bah, I like my way better

Posted: Tue Oct 24, 2006 3:21 pm
by tirespeed
Linc wrote:CptnObvious999 wrote:I have figured out a work around but it can only be done on the server side. Here's how to do it:.......................
Or, you could just download the latest version of BashPodder...
You could but for those that don't use bashpodder it is an annoying problem.
As I use mplayerplug-in, clicking on the link opens the mp3 in mplayer in the browser window. So of course I right-click and save link as and each time I must change the name from mirror.php to something.mp3
Looking at the code you have running for the mirror.php script, you should also validate input better. Granted mysql will not let you run more than one query in a request, someone could still fill up your log files throwing useless stuff at the script.
Just my $0.02
Posted: Thu Oct 26, 2006 12:07 pm
by snarkout
Same issue when I just right-click to download from Konqueror. I did that this morning since my ipod is completely fuxored on my arch box - normally I never even see what the file is named.
Posted: Fri Oct 27, 2006 11:03 am
by Gomer_X
Snarkout wrote:Same issue when I just right-click to download from Konqueror. I did that this morning since my ipod is completely fuxored on my arch box - normally I never even see what the file is named.
It just amazes me that Konqueror can't handle a redirect properly. It works just fine in IE.

Posted: Fri Oct 27, 2006 11:24 am
by Chess
FWIW, I have been using my "user contributed" version of Bashpodder for quite awhile now without any issues. It has downloaded every TLLTS show notwithstanding the server and feed changes.