june contest ... GOSSIP

Share your music, collaborate, and partake in monthly music contests.
Post Reply New Topic
RELATED
PRODUCTS

Post

Hovmod wrote:
Ixox wrote:I just like to add that many of us use Garret automatic downloader and i'm afraid it can only download direct link.
So if there is no direct access you lose many listeners.
What's that?
It creates a directory and download inside all the mp3 it founds on markleford page.

I think there is a windows wrapper somewhere but the perl code is:

Code: Select all

#!/usr/bin/perl
# KVR MIRRORING SCRIPT
# ver 0.3 by Garret Gengler

use LWP::UserAgent;
use URI::URL;

$|=1;
my $ua = LWP::UserAgent->new;
$ua->timeout(20);
$ua->env_proxy;
@nothing=();
$ua->requests_redirectable(\@nothing);

# get the date
my ($sec,$min,$hour,$mday,$mon,$year, $wday,$yday,$isdst) = localtime time;

 #fix the 0 indexed month
++$mon;

# get the two digit year (by default perl returns 1900 less than reality)
# i.e., 2004 -> 104... so let's just subrtact another hundred
$year = $year - 100;

# build a directory name from the date
my $param=sprintf("%02d%02d", $year, $mon);
$localdir = "kvr-contest-$param/$filename";

print "KVR CONTEST AUTO-DOWNLOADER v0.3\n";
print "--------------------------------\n";
print "Downloading Markelford's latest playlist: (http://www.markleford.com/kvr/)\n";
print "Mirroring files locally into directory ./$localdir\n";

unlink "./radio.m3u";
$result = $ua->mirror('http://www.markleford.com/kvr/radio.jsp?month=' . $param, "radio.m3u");

if ($result->is_error) {
  print "COULD NOT GET PLAYLIST$url\n";
}
else {
        open (SOURCE, "radio.m3u") || die "Cannot open source file";
           @urls = <SOURCE>;
           chomp(@urls);
        close (SOURCE);

        mkdir $localdir;

        foreach $url (@urls) {
                ($base,$filename) = $url =~ /(.+\/)(.+)/;
                $origurl=$url;

                $result=$ua->head($url);
                # check if we got a file attachment... if so, parse to get the local filename... it won't be in the url<br>

                if ($result->header('Content-Disposition')) {
                        # parse out a filename from this kind of thing:
                        # Content-Disposition: attachment; filename=02-05_Farlukar_-_Stop_the_skill.mp3
                        $line = $result->header('Content-Disposition');
                        $line =~ /filename=(.*)$/i;
                        $filename=$1;
                }

                # check if we got a redirect and failed... if so, try manually to follow it (fix up relative redirects)
                if ($result->is_redirect) {

                        # manually fix up relative redirects to be absolute
                        my $dest = $result->header('Location');

                        # parse the url to get the remote server
                        my $urlobj = new URI::URL($url);
                        my $server = $urlobj->host();

                        # fix up the destination to get rid of spaces
                        $dest =~ s/ /%20/g;

                        # and get the true filename out of the dest url
                        ($base,$filename) = $dest =~ /(.+\/)(.+)/;

                        # get rid of %20 markup for the filesystem
                        $filename =~ s/%20/ /g;

                        if ($dest =~ m|^http://|i) {
                                # okay, it looks absolute... pass this one as is
#                               print "\nRedirect, but absolute!\n";
                                $url = $dest;
                        }
                        elsif($dest =~ m|^/|) {
                                # it starts with a slash, so let's prefix with the server
                                $url = "http://$server$dest";
#                               print "\nRedirect, but relative!\n";
                        }
                        elsif ($dest) {
                                # no slash, so we need to add one
                                $url = "http://$server/$dest";
#                               print "\nRedirect, but relative with no slash!\n";
                        }
#                 print "\nREDIRECT $origurl\n   to $url\n";
        #               print "mirroring $url as $filename\n";
                }
                $result=$ua->mirror($url, "$localdir/$filename");

                if ($result->is_error) {
                  print "\nCOULD NOT MIRROR $url\n";
                }
                else {
                        print ".";
                }

        }

}
print "\nCompleted.\n";
print "Press ENTER to continue... ";
$keypress=<STDIN>;


Post

Ixox wrote: I think there is a windows wrapper somewhere
Yep, here it is...
http://www.worksongs.net/util/kvrmirror.exe

-Garret

Post

garret wrote:
Ixox wrote: I think there is a windows wrapper somewhere
Yep, here it is...
http://www.worksongs.net/util/kvrmirror.exe

-Garret
Every month the same: Some people don´t know this very useful program. pHz should post the link every month in the RULES & SUBMISSIONS thread.
Andreas (I presume my forefathers were apes)

Image Listen to some Monkey-Music

Post

respirator wrote:Hey

I entered anyway. But with a slightly, eh, unusual track for me. Enjoy!
Indeed. Sounds a lot like Beck.

Post

AndreasE wrote:
garret wrote:
Ixox wrote: I think there is a windows wrapper somewhere
Yep, here it is...
http://www.worksongs.net/util/kvrmirror.exe

-Garret
Every month the same: Some people don´t know this very useful program. pHz should post the link every month in the RULES & SUBMISSIONS thread.
OK - as far as I can see it doesn't try to stream the files, so I'm probably fine with my free hosting now, no?

I'll try to remember this thing from now on then, Andreas. Looks useful...
Rakkervoksen

Post

One little problem I have with the downloaders (there's a Mac version too) is that they don't let you read the text or see the pix that go along with each entry (if they have them). Obviously that collateral isn't as important as the song itself, but often they are enlightening or entertaining. I wonder if there were a way to use RSS to broadcast only the RULES & SUBMISSIONS thread, then we could use whatever reader we like to manage the downloads while getting to read the accompanying text and images - plus Markleford's radio could probably be automated so he didn't have to manually update his list each time a new entry was posted.

Post

Hey cool, a "get signed" contest. Finally a competition where commercial appeal is not a liability. I've been away working on my entry for this i know some of you think all i do is hang out in HPC but I -do- write music. it's just that you seldom hear it here as i am saving stuff up for my pop debut. :)

Give me an hour and I will post up my entry for this month
Image

Post

Delightful! :)

Post

Hey LadyJ.

Thanks for spicing this up!8)

You sound good and look great. I will have no trouble voting now! :D



Cheers,
Gordon

Post


Post

Uhoh.. In terms of commercial viability, it's Game, Set and Match to Ms J :o
Music with dinner is an insult both to the cook and the violinist.

Post

Yeah, too bad it will be disqualified as it's 160 kbps :(

Will it help my standings if I upload some glamour shots of me? I do have some of me in a cute skirt. :hihi:

Post

Uhoh.. In terms of commercial viability, it's Game, Set and Match to Ms J
No kidding! LadyJ can take all my racquets. :hail:

Post

You™ wrote:Yeah, too bad it will be disqualified as it's 160 kbps :(
Eep.. And the ball bounced on the line :shock: I wonder if Lady J reuploaded at 128kbps exception could be made?
You wrote: Will it help my standings if I upload some glamour shots of me? I do have some of me in a cute skirt. :hihi:
Hmm, I think Donkey Tugger likes that sort of thing, gives 'im the 'orn y'know.
:hihi:
Music with dinner is an insult both to the cook and the violinist.

Post

Can we play a let?

Post Reply

Return to “Music Cafe”