Bashpodder downloading mp3 as mirror.php

Hey drop us a line about the show. Feel free to ask questions, provide feedback and criticism, or just ramble on about anything your little heart desires.

Moderators: snarkout, Patrick, dann

Post Reply
elgordo123
Posts: 47
Joined: Wed Nov 02, 2005 5:46 pm

Bashpodder downloading mp3 as mirror.php

Post by elgordo123 » Mon Oct 23, 2006 8:02 pm

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? :lol:
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...

User avatar
CptnObvious999
Posts: 798
Joined: Fri Jun 03, 2005 7:54 pm
Location: Maryland
Contact:

Post by CptnObvious999 » Mon Oct 23, 2006 9:20 pm

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.

User avatar
Linc
Site Admin
Posts: 345
Joined: Mon Apr 26, 2004 11:54 pm
Contact:

Post by Linc » Mon Oct 23, 2006 10:46 pm

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...
-Linc Fessenden

In the Beginning there was nothing, which exploded - Yeah right...

User avatar
CptnObvious999
Posts: 798
Joined: Fri Jun 03, 2005 7:54 pm
Location: Maryland
Contact:

Post by CptnObvious999 » Mon Oct 23, 2006 10:53 pm

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 :wink: :P

tirespeed
Posts: 5
Joined: Thu Jun 01, 2006 4:52 pm

Post by tirespeed » Tue Oct 24, 2006 3:21 pm

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

User avatar
snarkout
Site Admin
Posts: 1342
Joined: Tue Aug 16, 2005 9:35 pm

Post by snarkout » Thu Oct 26, 2006 12:07 pm

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.
Shared pain is lessened, shared joy is increased; thus do we refute entropy.
--Spider Robinson

User avatar
Gomer_X
Posts: 901
Joined: Fri Jun 03, 2005 1:31 pm
Location: Cincinnati, Ohio, USA
Contact:

Post by Gomer_X » Fri Oct 27, 2006 11:03 am

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. :D

User avatar
Chess
Posts: 386
Joined: Thu Nov 17, 2005 2:06 pm
Location: Raleigh, NC
Contact:

Post by Chess » Fri Oct 27, 2006 11:24 am

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.
Chess Griffin

Post Reply