diff options
| author | root <root@elwms02.(none)> | 2010-04-06 16:13:08 +0200 |
|---|---|---|
| committer | root <root@elwms02.(none)> | 2010-04-06 16:13:08 +0200 |
| commit | 0e7005fcc7483c01aa102fbea358c5ac65a48d62 (patch) | |
| tree | 11517ce0d3d2977c6732b3aa583b0008083e0bd3 /plugins/music | |
| download | x-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.gz x-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.bz2 | |
hello world
Diffstat (limited to 'plugins/music')
| -rw-r--r-- | plugins/music/getcover.pl | 113 | ||||
| -rw-r--r-- | plugins/music/oldpatches/_plugin.sh | 131 | ||||
| -rw-r--r-- | plugins/music/oldpatches/have_iconpatch.diff | 11 | ||||
| -rw-r--r-- | plugins/music/oldpatches/have_osdmod.diff | 11 | ||||
| -rw-r--r-- | plugins/music/oldpatches/music-0.2.0-mplayer_vdr150.diff | 30 | ||||
| -rw-r--r-- | plugins/music/oldpatches/music-0.2.0_scrollmode.diff | 68 | ||||
| -rw-r--r-- | plugins/music/oldpatches/music-0.2.0_types.diff | 11 | ||||
| -rw-r--r-- | plugins/music/oldpatches/music-0.2.0_vdr153.diff | 33 | ||||
| -rw-r--r-- | plugins/music/oldpatches/no_ffcard.diff | 11 | ||||
| -rw-r--r-- | plugins/music/oldpatches/with_mplayer.diff | 11 | ||||
| -rw-r--r-- | plugins/music/patches/config.c.diff | 11 | ||||
| -rw-r--r-- | plugins/music/patches/icons.c.diff | 10 | ||||
| -rw-r--r-- | plugins/music/patches/imagecache.h.diff | 36 | ||||
| -rw-r--r-- | plugins/music/plugin.sh | 100 |
14 files changed, 587 insertions, 0 deletions
diff --git a/plugins/music/getcover.pl b/plugins/music/getcover.pl new file mode 100644 index 0000000..0ee6969 --- /dev/null +++ b/plugins/music/getcover.pl @@ -0,0 +1,113 @@ +#!/usr/bin/perl -X + +# EDIT only! path2java + + +$ENV{PATH}="/bin:/sbin:/usr/bin:/usr/local/bin:/usr/lib/jvm/java-1.5.0-sun/jre/bin"; + + +$artist = "$ARGV[0]"; +$album = "\L$ARGV[1]"; +$coverdir = "$ARGV[2]"; +$tmpdir = "$ARGV[3]"; +$maxdl = "$ARGV[4]"; +$basedir = "$ARGV[5]"; +$filename = "$ARGV[6]"; +$logger = "$tmpdir/cover.log"; +$path2java = "/usr/lib/jvm/java-1.5.0-sun/jre/bin"; + + +print "\n +----------------------------------------------------------------------------------------------\n +NAME: + getcover.pl - Perl Script to download coverpictures + from amazons webservice. +\n +SYNOPSIS: + getcover.pl 'artist' 'album' 'coverdir' 'tempdir' 'maxdownloads' 'basedir' 'filename' +\n +DESCRIPTION: + This Perl script makes it a lot easier to fill your + musiccollection with coverpictures. +\n +OPTIONS: + artist = Artist of track + album = Name of album + coverdir = Path to artists cover directory + tempdir = Path to this script (getcover.pl) + maxdownloads = How much coverpicture do you want ? + basedir = Path to track + filename = Full path to track without suffix +\n +----------------------------------------------------------------------------------------------\n +\n"; + +# START....... + +system("echo 'Cover download started !\n' > $logger"); + +# DON'T CHANGE ANYTHING HERE +system("echo 'Artist : $artist +Album : $album +Coverdir : $coverdir +Tempdir : $tmpdir +MaxDL : $maxdl +Logfile : $logger +Javapath : $path2java +\n +<value> ARTIST =$artist +<value> ALBUM =$album +<value> COVERDIR =$coverdir +<value> BASEDIR =$basedir +<value> FILENAME =$filename +\n' >> $logger"); + + + + +if(!$artist) { + system("echo '\nArtist empty. Give up !' >> $logger"); + die; +} + + +if(-r "$tmpdir/cover_0.jpg") { + system("echo '\nEntferne vorhandene Bilddateien\n' >> $logger"); + system("rm -f $tmpdir/*.jpg"); +} + +system("echo 'Executing: $path2java/java -cp jdom.jar:coverdownload.jar:. cover.cover \"$artist\" \"$album\" \"cover\" $maxdl' >> $logger"); +system("cd $tmpdir; $path2java/java -cp jdom.jar:coverdownload.jar:. cover.cover \"$artist\" \"$album\" \"cover\" $maxdl >/dev/null"); + +if(-r "$tmpdir/cover_0.jpg") { + system("echo '\nDownload von Cover erfolgreich !\n' >> $logger"); + +# $artist =~ s/\//-/g; +# $artist =~ s/\'/ /g; +# $artist =~ s/\"/ /g; + +# if(-r "$coverdir/$artist.jpg") { +# system("echo 'Entferne altes Cover\n' >> $logger"); +# system("rm -f \"$coverdir/$artist.jpg\""); +# } + + +# $cmd = "cp -f \"$tmpdir/cover_1.jpg\" \"$coverdir/$artist.jpg\""; + +# system("echo 'Kopiere: $cmd\n' >> $logger"); +# system("$cmd"); + +# if(-r "$coverdir/$artist.jpg") { +# system("echo '\nCover erfolgreich kopiert !\n' >> $logger"); +# } +# else { +# system("echo '\nERROR: Cover wurde NICHT kopiert !\n' >> $logger"); +# } + + } +else { + system("echo '\nERROR: Download von Cover NICHT erfolgreich !\n' >> $logger"); +} + +system("cat '$logger'"); +
\ No newline at end of file diff --git a/plugins/music/oldpatches/_plugin.sh b/plugins/music/oldpatches/_plugin.sh new file mode 100644 index 0000000..058fbec --- /dev/null +++ b/plugins/music/oldpatches/_plugin.sh @@ -0,0 +1,131 @@ +#!/bin/sh + +# x-vdr (Installations-Skript fuer einen VDR mit Debian als Basis) +# von Marc Wernecke - www.zulu-entertainment.de +# 20.12.2007 +# +# vdr-music + +# defaults +source ./../../x-vdr.conf +source ./../../setup.conf +source ./../../functions + +[ -f ./../../vdr/patchlevel.conf ] && source ./../../vdr/patchlevel.conf + +WEB="http://www.vdr.glaserei-franz.de/files/moron-suite-0.0.2.tar.bz2" +VERSION="music-0.2.0" +LINK="music" +VAR_music="vdr-music-0.2.0.tar.gz" + +VAR=`basename $WEB` +DIR=`pwd` + +# plugin entfernen +function clean_plugin() { + cd $SOURCEDIR/VDR/PLUGINS/src + rm -rf $LINK* + rm -f $VDRLIBDIR/libvdr-$LINK* + [ "$mp3" != "on" ] && rm -f $VDRLIBDIR/libvdr-mplayer.so* + log "cleaning $LINK" +} + +# plugin installieren +function install_plugin() { + download_plugin + + if [ ! -f "$FILES/plugins/$VAR_music" ] && [ -f "$FILES/plugins/$VAR" ]; then + [ -d "$FILES/plugins/moron" ] && rm -rf $FILES/plugins/moron + tar xjf "$FILES/plugins/$VAR" -C "$FILES/plugins" + mv -f $FILES/plugins/moron/vdr-*.tar.gz $FILES/plugins + [ -d "$FILES/plugins/moron" ] && rm -rf $FILES/plugins/moron + fi + VAR="$VAR_music" + + extract_plugin + cd $SOURCEDIR/VDR/PLUGINS/src + rm -f $LINK + ln -vfs $VERSION $LINK + + patch_plugin + + ## plugin specials - start ## + # wareagle-icons +# if [ "${VDRVERSION:2:1}" = "4" ]; then + if [ "$WAREAGLEICON" = "on" ]; then + cd "$SOURCEDIR/VDR/PLUGINS/src/$LINK" + echo "apply patch have_iconpatch.diff" + patch < $DIR/have_iconpatch.diff + fi + + # mplayer + if [ "$mp3" != "on" ]; then + cd "$SOURCEDIR/VDR/PLUGINS/src/$LINK" + echo "apply patch with_mplayer.diff" + patch < $DIR/with_mplayer.diff + fi + + # music - config, scripts and themes + cp -fR $SOURCEDIR/VDR/PLUGINS/src/$LINK/music $VDRCONFDIR/plugins + rm -f $VDRCONFDIR/plugins/music/themes/*-DEEP3*.theme + rm -f $VDRCONFDIR/plugins/music/themes/osd-ENIGMANG*.theme + + cp -f $DIR/getcover.pl $VDRCONFDIR/plugins/music/downloads/music_cover + cp -f $DIR/musiccmds.dat $VDRCONFDIR/plugins/music/data + cp -f $DIR/scripts/* $VDRCONFDIR/plugins/music/scripts + cp -f $DIR/themes/* $VDRCONFDIR/plugins/music/themes + + + chmod 0744 $VDRCONFDIR/plugins/music/scripts/* + chmod 0744 $VDRCONFDIR/plugins/music/downloads/music_cover/getcover.pl + + # mp3sources.conf + if [ -f $DIR/musicsources.conf ]; then + cp -f $DIR/musicsources.conf $VDRCONFDIR/plugins/music + else + { + echo "$MUSICDIR;Locale Platte;0;*.mp3/*.ogg/*.wav" + echo "/media/cdrom0;CDROM;1" + echo "/media/cdfs;CD-Audio;1;*.wav" + echo "" + } > $VDRCONFDIR/plugins/music/musicsources.conf + fi + chown -R $VDRUSER:$VDRGROUP $VDRCONFDIR/plugins/music + + # mplayersources.conf + if [ -f $DIR/mplayersources.conf ]; then + cp -f $DIR/mplayersources.conf $VDRCONFDIR/plugins + else + { + echo "$DIVXDIR;DivX Filme;0;*.avi" + echo "$DVDISODIR;DVD Filme;0;*.iso" + echo "$VIDEODIR;Aufnahmen;0;*0*.vdr" + echo "$MEDIADIR/DVD-VCD;DVD or VCD;0" + [ "$vodcatcher" = "on" ] && echo "/tmp;Vodcatcher;0" + echo "" + } > $VDRCONFDIR/plugins/mplayersources.conf + fi + chown $VDRUSER:$VDRGROUP $VDRCONFDIR/plugins/mplayersources.conf + + # mplayer.sh + if [ -f $SOURCEDIR/x-vdr/utilities/mplayer/mplayer.sh ]; then + cp -f $SOURCEDIR/x-vdr/utilities/mplayer/mplayer.sh $VDRSCRIPTDIR + cp -f $SOURCEDIR/x-vdr/utilities/mplayer/mplayer.sh.conf $VDRSCRIPTDIR + chown $VDRUSER:$VDRGROUP $VDRSCRIPTDIR/mplayer.sh $VDRSCRIPTDIR/mplayer.sh.conf + chmod 0744 $VDRSCRIPTDIR/mplayer.sh + fi + ## plugin specials - ende ## + + +} + +# plugin commands +if [ $# \> 0 ]; then + cmd=$1 + cmd_plugin +else + install_plugin + log "install-plugin fuer $VERSION ist fertig" +fi + +exit 0 diff --git a/plugins/music/oldpatches/have_iconpatch.diff b/plugins/music/oldpatches/have_iconpatch.diff new file mode 100644 index 0000000..5e8b141 --- /dev/null +++ b/plugins/music/oldpatches/have_iconpatch.diff @@ -0,0 +1,11 @@ +--- Makefile.ORG ++++ Makefile +@@ -32,7 +32,7 @@ + #HAVE_MAGICK=1 + + # Uncomment, if you patched VDR with Wareagle-iconpatch +-#HAVE_ICONPATCH=1 ++HAVE_ICONPATCH=1 + + # Uncomment one of these lines, if you don't want one of the plugins + #WITHOUT_MP3=1 diff --git a/plugins/music/oldpatches/have_osdmod.diff b/plugins/music/oldpatches/have_osdmod.diff new file mode 100644 index 0000000..0b22a86 --- /dev/null +++ b/plugins/music/oldpatches/have_osdmod.diff @@ -0,0 +1,11 @@ +--- Makefile.ORG ++++ Makefile +@@ -26,7 +26,7 @@ + HAVE_FFCARD=1 + + # Uncomment if you own enough ram for OSD (e.g modded FF-Card to 4MB ram or softdecoder) +-#HAVE_OSDMOD=1 ++HAVE_OSDMOD=1 + + # Default: Imlib2, otherwise uncomment + #HAVE_MAGICK=1
\ No newline at end of file diff --git a/plugins/music/oldpatches/music-0.2.0-mplayer_vdr150.diff b/plugins/music/oldpatches/music-0.2.0-mplayer_vdr150.diff new file mode 100644 index 0000000..aff8b7b --- /dev/null +++ b/plugins/music/oldpatches/music-0.2.0-mplayer_vdr150.diff @@ -0,0 +1,30 @@ +diff -ruN music-0.2.0/mplayer.c~ music-0.2.0/mplayer.c +--- music-0.2.0/mplayer.c~ ++++ music-0.2.0/mplayer.c +@@ -231,7 +231,12 @@ + #else + Interface->Close(); + #endif ++#if VDRVERSNUM >= 10500 ++ visible = modeOnly = false; ++ SetNeedsFastResponse(visible); ++#else + needsFastResponse=visible=modeOnly=false; ++#endif + } + } + +@@ -302,7 +307,13 @@ + Interface->Clear(); + if(MPlayerSetup.OsdPos>0) Interface->Fill(0,3,Interface->Width(),MPlayerSetup.OsdPos,clrTransparent); + #endif ++#if VDRVERSNUM >= 10500 ++ visible = true; ++ SetNeedsFastResponse(visible); ++ modeOnly=false; ++#else + needsFastResponse=visible=true; modeOnly=false; ++#endif + lastCurrent=lastTotal=-1; + flush=true; + } diff --git a/plugins/music/oldpatches/music-0.2.0_scrollmode.diff b/plugins/music/oldpatches/music-0.2.0_scrollmode.diff new file mode 100644 index 0000000..e186884 --- /dev/null +++ b/plugins/music/oldpatches/music-0.2.0_scrollmode.diff @@ -0,0 +1,68 @@ +diff -ruN music-0.1.0/mp3control.c music/mp3control.c +--- music-0.1.0/mp3control.c ++++ music/mp3control.c +@@ -978,6 +978,8 @@ + clrListTextFG = MP3Skin.clrListTextFG; + clrListTextActiveFG = MP3Skin.clrListTextActiveFG; + clrListTextActiveBG = MP3Skin.clrListTextActiveBG; ++ clrListTextScrollFG = MP3Skin.clrListTextScrollFG; ++ clrListTextScrollBG = MP3Skin.clrListTextScrollBG; + clrListRating = MP3Skin.clrListRating; + + clrInfoBG1 = MP3Skin.clrInfoBG1; +@@ -1441,8 +1443,8 @@ + #else + font=cFont::GetFont(fontOsd); + #endif +- bg=clrListTextActiveFG; +- fg=clrListTextActiveBG; ++ bg=clrListTextScrollBG; ++ fg=clrListTextScrollFG; + hash=(hash^77) + 23; + } + else font=cFont::GetFont(fontSml); +diff -ruN music-0.1.0/mp3control.h music/mp3control.h +--- music-0.1.0/mp3control.h ++++ music/mp3control.h +@@ -62,6 +62,8 @@ + int clrListTextFG; + int clrListTextActiveFG; + int clrListTextActiveBG; ++ int clrListTextScrollFG; ++ int clrListTextScrollBG; + int clrListRating; + int clrInfoBG1; + int clrInfoBG2; +diff -ruN music-0.1.0/skin.c music/skin.c +--- music-0.1.0/skin.c ++++ music/skin.c +@@ -52,6 +52,8 @@ + clrListTextFG = 0xFFBABBC0; + clrListTextActiveFG = 0xFFF2A00C; + clrListTextActiveBG = 0xDF303F52; ++ clrListTextScrollFG = 0xFFF2A00C; ++ clrListTextScrollBG = 0xDF303F52; + clrListRating = 0xFFCC0C0C; + // INFO: 4 colors + clrInfoBG1 = 0xEF2D435A; +@@ -148,6 +150,8 @@ + else if (strstr(line.c_str(),"clrListTextFG")) clrListTextFG = strtoul(Value.c_str(), NULL,16); + else if (strstr(line.c_str(),"clrListTextActiveFG")) clrListTextActiveFG = strtoul(Value.c_str(), NULL,16); + else if (strstr(line.c_str(),"clrListTextActiveBG")) clrListTextActiveBG = strtoul(Value.c_str(), NULL,16); ++ else if (strstr(line.c_str(),"clrListTextScrollFG")) clrListTextScrollFG = strtoul(Value.c_str(), NULL,16); ++ else if (strstr(line.c_str(),"clrListTextScrollBG")) clrListTextScrollBG = strtoul(Value.c_str(), NULL,16); + else if (strstr(line.c_str(),"clrListRating")) clrListRating = strtoul(Value.c_str(), NULL,16); + + else if (strstr(line.c_str(),"clrInfoBG1")) clrInfoBG1 = strtoul(Value.c_str(), NULL,16); +diff -ruN music-0.1.0/skin.h music/skin.h +--- music-0.1.0/skin.h ++++ music/skin.h +@@ -45,6 +45,8 @@ + int clrListTextFG; + int clrListTextActiveFG; + int clrListTextActiveBG; ++ int clrListTextScrollFG; ++ int clrListTextScrollBG; + int clrListRating; + int clrInfoBG1; + int clrInfoBG2; diff --git a/plugins/music/oldpatches/music-0.2.0_types.diff b/plugins/music/oldpatches/music-0.2.0_types.diff new file mode 100644 index 0000000..fcf1d80 --- /dev/null +++ b/plugins/music/oldpatches/music-0.2.0_types.diff @@ -0,0 +1,11 @@ +diff -ruN music-0.2.0/player-mp3.c music/player-mp3.c +--- music-0.2.0/player-mp3.c ++++ music/player-mp3.c +@@ -25,6 +25,7 @@ + #include <sys/ioctl.h> + #include <math.h> + #include <glob.h> ++#include <asm-i386/types.h> + + #ifdef WITH_OSS + #include <sys/soundcard.h> diff --git a/plugins/music/oldpatches/music-0.2.0_vdr153.diff b/plugins/music/oldpatches/music-0.2.0_vdr153.diff new file mode 100644 index 0000000..3d46c2b --- /dev/null +++ b/plugins/music/oldpatches/music-0.2.0_vdr153.diff @@ -0,0 +1,33 @@ +--- music/menubrowse.c~ 2007-06-17 22:50:45.000000000 +0200 ++++ music/menubrowse.c 2007-06-17 22:52:07.000000000 +0200 +@@ -245,7 +245,11 @@ + + void cMenuPlayList::Buttons(void) + { ++#if VDRVERSNUM >= 10503 ++ SetHelp(tr("Add"), showid3?tr("Filenames"):tr("ID3 names"), tr("Remove"), tr("button$Mark")); ++#else + SetHelp(tr("Add"), showid3?tr("Filenames"):tr("ID3 names"), tr("Remove"), tr(BUTTON"Mark")); ++#endif + } + + void cMenuPlayList::Refresh(bool all) +@@ -425,10 +429,18 @@ + { + switch(num) { + case 1: ++#if VDRVERSNUM >= 10503 ++ SetHelp(tr("button$Edit"), tr("Source"), tr("Browse"), ">>"); ++#else + SetHelp(tr(BUTTON"Edit"), tr("Source"), tr("Browse"), ">>"); ++#endif + break; + case 2: ++#if VDRVERSNUM >= 10503 ++ SetHelp("<<", tr("button$New"), tr("button$Delete"), tr("Rename")); ++#else + SetHelp("<<", tr(BUTTON"New"), tr(BUTTON"Delete"), tr("Rename")); ++#endif + break; + } + buttonnum=num; Display(); diff --git a/plugins/music/oldpatches/no_ffcard.diff b/plugins/music/oldpatches/no_ffcard.diff new file mode 100644 index 0000000..4538c05 --- /dev/null +++ b/plugins/music/oldpatches/no_ffcard.diff @@ -0,0 +1,11 @@ +--- Makefile.ORG ++++ Makefile +@@ -23,7 +23,7 @@ + + # Uncomment if you own a FF-Card , otherwise scrollmode is disabled . + # If you have problems with scrolling oder hang-ups , dont use it. +-HAVE_FFCARD=1 ++#HAVE_FFCARD=1 + + # Uncomment if you own enough ram for OSD (e.g modded FF-Card to 4MB ram or softdecoder) + #HAVE_OSDMOD=1 diff --git a/plugins/music/oldpatches/with_mplayer.diff b/plugins/music/oldpatches/with_mplayer.diff new file mode 100644 index 0000000..6130426 --- /dev/null +++ b/plugins/music/oldpatches/with_mplayer.diff @@ -0,0 +1,11 @@ +--- Makefile.ORG ++++ Makefile +@@ -36,7 +36,7 @@ + + # Uncomment one of these lines, if you don't want one of the plugins + #WITHOUT_MP3=1 +-WITHOUT_MPLAYER=1 ++#WITHOUT_MPLAYER=1 + + # Uncomment the following line, if you don't have libsndfile installed + #WITHOUT_LIBSNDFILE=1 diff --git a/plugins/music/patches/config.c.diff b/plugins/music/patches/config.c.diff new file mode 100644 index 0000000..a8f94dc --- /dev/null +++ b/plugins/music/patches/config.c.diff @@ -0,0 +1,11 @@ +--- config.c.orig 2008-12-20 17:20:00.000000000 +0100 ++++ config.c 2008-12-20 17:15:20.000000000 +0100 +@@ -6,7 +6,7 @@ + + #include <vdr/font.h> + #include "config.h" +- ++#include <algorithm> + + cMusicConfig MusicConfig; + diff --git a/plugins/music/patches/icons.c.diff b/plugins/music/patches/icons.c.diff new file mode 100644 index 0000000..4f0c3f0 --- /dev/null +++ b/plugins/music/patches/icons.c.diff @@ -0,0 +1,10 @@ +--- icons.c.orig 2008-12-20 17:18:50.000000000 +0100 ++++ icons.c 2008-12-20 17:21:40.000000000 +0100 +@@ -2,6 +2,7 @@ + #include <vdr/plugin.h> + #include "icons.h" + #include "config.h" ++#include <langinfo.h> + + // --- Icons ------------------------------------------------------------------ + bool Icons::IsUTF8=false; diff --git a/plugins/music/patches/imagecache.h.diff b/plugins/music/patches/imagecache.h.diff new file mode 100644 index 0000000..26fe7ab --- /dev/null +++ b/plugins/music/patches/imagecache.h.diff @@ -0,0 +1,36 @@ +--- imagecache.h.orig 2008-12-20 18:03:31.000000000 +0100 ++++ imagecache.h 2008-12-20 17:17:10.000000000 +0100 +@@ -19,21 +19,21 @@ + + item_map mItems; + usage_list mUsage; +- uint mMaxItems; ++ unsigned int mMaxItems; + + protected: + virtual void DeleteObject(const key_type &Key, data_type &Data) = 0; + virtual void ResetObject(data_type &Data) = 0; + + public: +- cxCache(uint MaxItems); ++ cxCache(unsigned int MaxItems); + virtual ~cxCache(); + + void Reset(void); + void Flush(void); + bool Contains(const key_type &Key); + data_type &operator[](const key_type &Key); +- uint Count(void) { return mUsage.size(); } ++ unsigned int Count(void) { return mUsage.size(); } + }; + + template<class key_type, class data_type> +@@ -43,7 +43,7 @@ + } + + template<class key_type, class data_type> +-cxCache<key_type, data_type>::cxCache(uint MaxItems) ++cxCache<key_type, data_type>::cxCache(unsigned int MaxItems) + { + mMaxItems = MaxItems; + } diff --git a/plugins/music/plugin.sh b/plugins/music/plugin.sh new file mode 100644 index 0000000..5a479ee --- /dev/null +++ b/plugins/music/plugin.sh @@ -0,0 +1,100 @@ +#!/bin/sh + +# x-vdr (Installations-Skript fuer einen VDR mit Debian als Basis) +# von Marc Wernecke - www.zulu-entertainment.de +# 21.02.2009 +# +# vdr-music + +# defaults +source ./../../x-vdr.conf +source ./../../setup.conf +source ./../../functions + +[ -f ./../../vdr/patchlevel.conf ] && source ./../../vdr/patchlevel.conf + +WEB="http://www.glaserei-franz.de/VDR/Moronimo2/files/vdr-music-0.4.0-b3.tgz" +VERSION="music-0.4.0-b3" +LINK="music" + +VAR=`basename $WEB` +DIR=`pwd` + +# plugin entfernen +function clean_plugin() { + cd $SOURCEDIR/VDR/PLUGINS/src + rm -rf $LINK* + rm -f $VDRLIBDIR/libvdr-$LINK* + [ "$mp3" != "on" ] && rm -f $VDRLIBDIR/libvdr-mplayer.so* + log "cleaning $LINK" +} + +# plugin installieren +function install_plugin() { + download_plugin + extract_plugin + cd $SOURCEDIR/VDR/PLUGINS/src + rm -f $LINK + ln -vfs $VERSION $LINK + + patch_plugin + + ## plugin specials - start ## + [ "$VDRUPDATE" = "on" ] && [ -d $VDRCONFDIR/plugins/music ] && return + + if [ ! -d $VDRCONFDIR/plugins/music ] && [ -d $SOURCEDIR/VDR/PLUGINS/src/$LINK/music ]; then + cp -rf $SOURCEDIR/VDR/PLUGINS/src/$LINK/music $VDRCONFDIR/plugins + fi + + # mp3sources.conf + if [ -f $DIR/musicsources.conf ]; then + cp -f $DIR/musicsources.conf $VDRCONFDIR/plugins/music + else + { + echo "$MUSICDIR;Locale Platte;0;*.mp3/*.ogg/*.wav" + echo "/media/usb;USB-Stick;1;*.mp3/*.ogg/*.wav" + echo "/media/cdrom;CDROM;1;*.mp3/*.ogg/*.wav" + echo "/media/cdfs;CD-Audio;1;*.wav" + echo "" + } > $VDRCONFDIR/plugins/music/musicsources.conf + fi + chown -R $VDRUSER:$VDRGROUP $VDRCONFDIR/plugins/music + + # mplayersources.conf + if [ -f $DIR/mplayersources.conf ]; then + cp -f $DIR/mplayersources.conf $VDRCONFDIR/plugins + else + { + echo "$DIVXDIR;DivX Filme;0;*.avi" + echo "$DVDISODIR;DVD Filme;0;*.iso" + echo "$VIDEODIR;Aufnahmen;0;*0*.vdr" + echo "$MEDIADIR/DVD-VCD;DVD or VCD;0" + [ "$vodcatcher" = "on" ] && echo "/tmp;Vodcatcher;0" + echo "/media/usb;USB-Stick;1" + echo "" + } > $VDRCONFDIR/plugins/mplayersources.conf + fi + chown $VDRUSER:$VDRGROUP $VDRCONFDIR/plugins/mplayersources.conf + + # mplayer.sh + if [ -f $SOURCEDIR/x-vdr/utilities/mplayer/mplayer.sh ]; then + cp -f $SOURCEDIR/x-vdr/utilities/mplayer/mplayer.sh $VDRSCRIPTDIR + cp -f $SOURCEDIR/x-vdr/utilities/mplayer/mplayer.sh.conf $VDRSCRIPTDIR + chown $VDRUSER:$VDRGROUP $VDRSCRIPTDIR/mplayer.sh $VDRSCRIPTDIR/mplayer.sh.conf + chmod 0744 $VDRSCRIPTDIR/mplayer.sh + fi + ## plugin specials - ende ## + + +} + +# plugin commands +if [ $# \> 0 ]; then + cmd=$1 + cmd_plugin +else + install_plugin + log "install-plugin fuer $VERSION ist fertig" +fi + +exit 0 |
