From 83c9fed9313ceae047cd7279a181691ce01d4bd4 Mon Sep 17 00:00:00 2001 From: hackbard Date: Sun, 13 Apr 2003 02:51:37 +0000 Subject: [PATCH 1/1] initial checkin of first beta mp3db --- INSTALL | 32 ++++++++++++ README | 20 ++++++++ main.shtml | 123 +++++++++++++++++++++++++++++++++++++++++++++++ make_mp3dbcompat | 36 ++++++++++++++ mp3db.conf | 15 ++++++ mp3user | 5 ++ playsong.shtml | 23 +++++++++ 7 files changed, 254 insertions(+) create mode 100644 INSTALL create mode 100644 README create mode 100644 main.shtml create mode 100755 make_mp3dbcompat create mode 100644 mp3db.conf create mode 100644 mp3user create mode 100644 playsong.shtml diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..95c1883 --- /dev/null +++ b/INSTALL @@ -0,0 +1,32 @@ +INSTALL +------- + +1) + +include main.shtml in your existing webpage. +it needs physical contact to the mp3 data. + +2) + +copy playsong.shtml somewhere in your htdocs root of your playing host. + +3) + +copy mp3db.conf and mp3user to your /etc directory. +(on the host where you also copied main.shtml) +adjust the examples !! important, defaults won't work !! + +4) + +make your mp3 data is mp3db compatible. +that means, no special character and small letters. +you may test ./make_mp3dbcompat script to do so. +this will definetly fuck your system, i mean it :) + +5) + +additionaly secure your mp3s using .htaccess files! +! do it ! + + +have fun, hackbard diff --git a/README b/README new file mode 100644 index 0000000..6a96d56 --- /dev/null +++ b/README @@ -0,0 +1,20 @@ +mp3db +##### + +WARNING: first beta, and probably no more development as it fits my needs + +wtf? +---- +mp3 database search and remote play tool using server side includes + +author +------ +hackbard@hackdaworld.dyndns.org + +requirements +------------ +- SSI supporting webbrowser (actually two times: 1. mp3 server 2.playing host) +- mplayer installed on playing host + + +regards, hackbard diff --git a/main.shtml b/main.shtml new file mode 100644 index 0000000..41feac5 --- /dev/null +++ b/main.shtml @@ -0,0 +1,123 @@ +

m - p - 3 <> d - a - t - a - b - a - s - e

+ + + + + diff --git a/make_mp3dbcompat b/make_mp3dbcompat new file mode 100755 index 0000000..9bca3e6 --- /dev/null +++ b/make_mp3dbcompat @@ -0,0 +1,36 @@ +#!/bin/sh + +for i in *; do + if [ -d $i ]; then + echo "renaming content of $i ..." + cd $i + for j in *; do + if [ -f "$j" ]; then + dst_file="`echo $j | sed 's/\ /\\ /g' | sed 's/(/\\(/g' | sed s'/)/\\)/g' | sed 's/&/\\&/g' | sed 's/!/\\!/g'`" + trg_file="`echo $j | sed 's/\ /_/g' | sed 's/&/_/g'| sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ()-,!/abcdefghijklmnopqrstuvwxyz_____/'`" + if [ "$dst_file" != "$trg_file" ]; then + mv "$dst_file" $trg_file + chmod 644 $trg_file + fi + fi + # assume albums + if [ -d "$j" ]; then + cd $j + album="`echo $j | sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ()-,/abcdefghijklmnopqrstuvwxyz____/'`" + for song in *; do + dst_file="`echo $song | sed 's/\ /\\ /g' | sed 's/(/\\(/g' | sed s'/)/\\)/g' | sed 's/&/\\&/g' | sed 's/!/\\!/g'`" + trg_file="`echo $song | sed 's/\ /_/g' | sed 's/&/_/g'| sed 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ()-,!/abcdefghijklmnopqrstuvwxyz_____/'`" + if [ ! -f ../${album}__${trg_file} ]; then + mv "$dst_file" ../${album}__${trg_file} + chmod 644 ../${album}__${trg_file} + fi + done + cd .. + rm -rf $j + fi + + done + cd .. + fi +done + diff --git a/mp3db.conf b/mp3db.conf new file mode 100644 index 0000000..d255f44 --- /dev/null +++ b/mp3db.conf @@ -0,0 +1,15 @@ +# /etc/mp3db.conf + +MP3_SERVER_NAME foobar.org +MP3_SRCDIR /www/htdocs/download/mp3db +MP3_HTTP_LOC /download/mp3db +HTTP_ROOT /www/htdocs +HTTP_OFFSET /mp3db +LOCAL_NET 192.168 + +LOCAL_PLAYER_IP 192.168.10.20 +PLAYFILE_DIR /mp3db + +USR_NAME foo +USER_PASSWD bar + diff --git a/mp3user b/mp3user new file mode 100644 index 0000000..4a7dbe8 --- /dev/null +++ b/mp3user @@ -0,0 +1,5 @@ +hans 192.168.10.20 +hans 192.168.10.24 +tina 192.168.10.33 +udo 192.168.10.70 + diff --git a/playsong.shtml b/playsong.shtml new file mode 100644 index 0000000..13fde32 --- /dev/null +++ b/playsong.shtml @@ -0,0 +1,23 @@ + + + -- 2.39.2