Muggle-plugin
Aus VDR Wiki
(Unterschied zwischen Versionen)
(→Mugglei)) |
(→Konfiguration) |
||
| Zeile 78: | Zeile 78: | ||
sh make-empty-db | sh make-empty-db | ||
cd - | cd - | ||
| − | + | cd /mp3 | |
| + | find * -path 'Assorted' -prune -o -type f -exec ./mugglei -z -h localhost -n GiantDisc -f \{} \; | ||
</pre> | </pre> | ||
Später via [[commands.conf]], mit folgenden Eintrag: | Später via [[commands.conf]], mit folgenden Eintrag: | ||
<pre> | <pre> | ||
| − | Update DB | + | Update DB : echo "cd /mp3 ; find * -path 'Assorted' -prune -o -type f -exec $PLGSRC/muggle/mugglei -z -h localhost -n GiantDisc -f '{}' ';'"|at now |
</pre> | </pre> | ||
| + | |||
==Probleme== | ==Probleme== | ||
===SuSE spezifisch=== | ===SuSE spezifisch=== | ||
Version vom 5. November 2004, 14:31 Uhr
Inhaltsverzeichnis |
Beschreibung
Das Plugin bietet eine Datenbankverbindung für den VDR so dass die Medienauswahl flexibler wird.
Hardwareanforderungen
Softwareanforderungen
- mySQL
- libmad
- taglib
- libvorbis und libvorbisfile (optional)
Installation
cd $SOURCEDIR
tar xvzf libmad-<VERSION>.tar.gz
cd libmad-<VERSION>
./configure --prefix=/usr/local
make
make install
ldconfig
cd -
tar xvzf libogg-<VERSION>.tar.gz
cd libogg-<VERSION>
./configure --prefix=/usr/local
make
make install
ldconfig
cd -
tar xvzf libvorbis-<VERSION>.tar.gz
cd libvorbis-<VERSION>
./configure --prefix=/usr/local \
--with-ogg-libraries=/usr/local/lib
make
make install
cd -
tar xvzf taglib-<VERSION>.tar.gz
cd taglib-<VERSION>
./configure --prefix=/usr/local
make
make install
ldconfig
cd -
tar xvzf mysql-<VERSION>.tar.gz
./configure --prefix=/usr/local
make
make install
find . -name my-medium.cnf -exec cp --backup=t \{} /etc/my.cnf \;
cd /usr/local/lib
ln -s mysql/* .
groupadd mysql
useradd -g mysql mysql
chown -R mysql var
mysql_install_db --user=mysql &
ldconfig
Konfiguration
Da ich auf meinen PC sämmtliche Software mit --prefix=/usr/local übersetze, müssen wir das Makefile des Plugins anpassen.
- -I/usr/include/mysql/ -I/usr/include/taglib + -I/usr/local/include/mysql/ -I/usr/local/include/taglib - MIFLAGS += -I/usr/include/taglib -lmysqlclient + MIFLAGS += -I/usr/local/include/taglib -lmysqlclient
Starten des Servers mit.
mysqld_safe --user=mysql &
Nun können wir die Datenbank füttern, vorrausgesetzt die Mp3 Sammlung befindet sich in /mp3
cd $SOURCEDIR/VDR/PLUGINS/src/muggle
make mugglei
cd scripts
sh make-empty-db
cd -
cd /mp3
find * -path 'Assorted' -prune -o -type f -exec ./mugglei -z -h localhost -n GiantDisc -f \{} \;
Später via commands.conf, mit folgenden Eintrag:
Update DB : echo "cd /mp3 ; find * -path 'Assorted' -prune -o -type f -exec $PLGSRC/muggle/mugglei -z -h localhost -n GiantDisc -f '{}' ';'"|at now
Probleme
SuSE spezifisch
Bei SuSE wurde mySQL so compiliert, dass import lokaler files nicht unterstuetzt wird. Einfach Sourcen nach der Anleitung oben übersetzen, oder z.B. rpms direkt von www.mysql.org installieren. Die SuSE eigenen Packete sollte man falls installiert entfernen, folgender Einzeiler erledigt dies:
rpm -qa|grep mysql|xargs rpm -e --nodeps
Parameter
Plugin
| Parameter (kurz) | Parameter (lang) | Beschreibung |
|---|---|---|
| -h HHHH | --host=HHHH | specify database host (default is localhost) |
| -s SSSS | --socket=PATH | specify database socket (default is TCP connection) |
| -n NNNN | --name=NNNN | specify database name (overridden by -g) |
| -p PPPP | --port=PPPP | specify port of database server (default is ) |
| -u UUUU | --user=UUUU | specify database user (default is ) |
| -w WWWW | --password=WWWW | specify database password (default is empty) |
| -t TTTT | --toplevel=TTTT | specify toplevel directory for music (default is /mnt/music) |
| -g | --giantdisc | enable full Giantdisc compatibility mode |
Mugglei
| Parameter | Beschreibung |
|---|---|
| -s <socket> | specify a socket for mySQL communication (default is TCP) |
| -n <database> | specify database name (default is 'GiantDisc') |
| -u <username> | specify user of mySql database (default is empty) |
| -p <password> | specify password of user (default is empty password) |
| -f <filename> | name of music file to import or update |
| -a | import track as if it was on an assorted album |
| -z | scan all database entries and delete entries for files not found |
Links
| [1] | http://www.mysql.org | mySQL |
| [2] | http://www.underbit.com/products/mad | (M)PEG (A)udio (D)ecoder Homepage |
| [3] | http://www.xiph.org/ogg/vorbis | Ogg Vorbis CODEC Project |
| [4] | http://developer.kde.org/~wheeler/taglib.html | Taglib - Audio Meta-Data Library |
| [5] | http://www.htpc-tech.de/htpc/muggle.htm | Homepage des Plugins |
| [6] | http://vdrportal.de/board/thread.php?postid=206688 | snd2usb für muggle zum Schreiben auf USB Stick |