Skip to content

Commit

Permalink
first version of lastfmfad
Browse files Browse the repository at this point in the history
  • Loading branch information
JacK_McRiDER authored and JacK_McRiDER committed Apr 28, 2011
1 parent 93f2998 commit 8d217e3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
24 changes: 24 additions & 0 deletions lastfmfad
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

if [[ $1 == "" ]]; then
echo "usage: $0 URL"
echo ""
echo -e " URL\tlast.fm album url (e.c. http://www.lastfm.de/music/___dRE%C3%A0g%C3%A4nN||||||/Loliphilia)"
exit 0;
fi

dir=`echo $1 | sed -ne 's/.*\/\(.*\)\/\(.*\)/\1_-_\2/p'`

wget $1 -O album.tmp
files=`cat album.tmp | grep mp3 | sed -ne 's/.*\(http:\/\/freedownloads\.last\.fm\/download\/.*\.mp3\).*/\1/p'`

for i in $files; do
echo -n "Downloading $i..."
wget -P $dir -q $i
echo " done!"
done

rm album.tmp

echo -e "\nFinished getting the full album!"
exit 0;
8 changes: 8 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
IDIR = /usr/bin
INAME = lastfmfad

install : $(IDIR)/$(INAME)

$(IDIR)/$(INAME) : $(INAME)
@echo "Installing lastfmFAD..."
@install $+ $@ && echo "...done!"

0 comments on commit 8d217e3

Please sign in to comment.