Muggle-plugin

Aus VDR Wiki
(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
(Optionen: HAVE_SERVER=1 != HAVE_ONLY_SERVER=1)
(Mugglei: +-t <topleveldir>)
Zeile 204: Zeile 204:
 
|-
 
|-
 
| -p <password> || specify password of user (default is empty password)
 
| -p <password> || specify password of user (default is empty password)
 +
|-
 +
| -t <topleveldir> || name of music top level directory
 
|-
 
|-
 
| -z            || scan all database entries and delete entries for files not found (is not yet implemented)
 
| -z            || scan all database entries and delete entries for files not found (is not yet implemented)

Version vom 11. März 2005, 20:47 Uhr

Inhaltsverzeichnis

Beschreibung

Autoren: Andi Kellner, Lars von Wedel, Ralf Klueber, Wolfgang Rohdewald

Das Plugin bietet eine Datenbankverbindung für den VDR, so dass die Medienauswahl flexibler wird.

Bilder

Setup

Hardwareanforderungen

Softwareanforderungen

  • mySQL
  • libid3tag
  • libmad
  • taglib
  • libvorbis >= libogg (optional)
  • flac >= libogg >= nasm (optional)

Installation

cd $SOURCEDIR
tar xvzf libid3tag-<VERSION>.tar.gz
cd libid3tag-<VERSION>
./configure --prefix=/usr/local
make
make install
cd -

tar xvzf libmad-<VERSION>.tar.gz
cd libmad-<VERSION>
./configure --prefix=/usr/local
make
make install
cd -

tar xvzf libogg-<VERSION>.tar.gz
cd libogg-<VERSION>
./configure --prefix=/usr/local
make
make install
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 flac-<VERSION>.tar.gz
./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

Sofern wir den Server nicht Binär installieren konnten, installieren wir als nächstes mysql.

cd $SOURCEDIR
tar xvzf mysql-<VERSION>.tar.gz
cd mysql-<VERSION>
./configure --prefix=/usr/local \
            --libexecdir=/usr/local/bin \
            --without-extra-tools \
            --without-bench
make
make install

Nach der erfolgten Installation von mysql folgen noch ein paar weitere für muggle wichtige Installationsschritte.

cd /usr/local/lib
ln -s mysql/libmysqlclient.so* .
groupadd mysql
useradd -g mysql mysql
cd ..
chown -R mysql var
ldconfig
mysql_install_db --user=mysql &

Die Installation des Plugins erfolgt an der allbekannten Stelle $SOURCEDIR/VDR/PLUGINS/src vor:

cd $SOURCEDIR/VDR/PLUGINS/src
tar xvzf vdr-muggle-<VERSION>.tgz
ln -s muggle-<VERSION> muggle

Wurde, wie im oben genannten Installationsbeispiel die Sourcen selbst übersetzt, muss im Makefile des muggle-plugins eine kleine Anpassung vorgenommen werden.

Folgende Änderungen nehmen wir in folgender Datei $SOURCEDIR/VDR/PLUGINS/src/muggle/Makefile vor:

-       -I/usr/include/mysql/ -I/usr/include/taglib
+       $(shell mysql_config --include) $(shell taglib-config --cflags)

- MIFLAGS += -I/usr/include/taglib -lmysqlclient
+ MIFLAGS += $(shell taglib-config --cflags) -lmysqlclient

Ansonsten können wir nun das Plugin wie gewohnt übersetzen.

cd $SOURCEDIR/VDR
make plugins

Kopieren von mugglei in den PATH.

cp $SOURCEDIR/VDR/PLUGINS/src/muggle/mugglei /usr/local/bin

mysql-Datenbank befüllen

Als erstes starten wir den mysql-Server mit.

mysqld_safe --user=mysql &

Nun können wir die Datenbank füttern, vorrausgesetzt die Mp3 Sammlung befindet sich in /mp3.

Später via commands.conf, mit folgenden Eintrag:

Update DB : echo "mugglei -h localhost -c -t /mp3 ." | at now

Falls das nicht funktioniert, siehe auch runvdr (Tipps).

Übergabe für VDR.

vdr -P'muggle -t /mp3'

Für das automatische Starten des Mysql Daemons...

Unterhalb von ../support-files im Sourceverzeichnis, befinden sich Templates.

Ein Eintrag in der /etc/init.d/boot.local (falls vorhanden) sollte auch langen.

# starting mysqld daemon
/usr/local/bin/mysqld_safe --user=mysql &

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

Optionen

HAVE_VORBISFILE=1 optionally libvorbis and libvorbisfile to replay OGG Vorbis files
HAVE_FLAC=1 optionally libFLAC++ to replay FLAC files
HAVE_ONLY_SERVER=1 if you do not want to compile in code for embedded sql

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)
-d DIRN --datadir=DIRN specify directory for embedded sql data (default is $HOME/.muggle)
-g --giantdisc enable full Giantdisc compatibility mode
-v --verbose specify debug level. The higher the more (default is 1)

Mugglei

Parameter Beschreibung
-h <hostname> specify host of mySql database server (default is 'localhost')
-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)
-t <topleveldir> name of music top level directory
-z scan all database entries and delete entries for files not found (is not yet implemented)
-c delete the entire database and recreate a new empty one
-v the wanted log level, the higher the more. Default is 1

Bedienung

Links

[1] http://www.mysql.com 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://vdrportal.de/board/thread.php?postid=206688 snd2usb für muggle zum Schreiben auf USB Stick
[6] http://flac.sourceforge.net flac
[7] http://www.htpc-tech.de/htpc/muggle.htm Homepage des Plugins