Index: /ipk/source.sh4/mediacenter_mayhemIIIKS_3_9/CONTROL/control
===================================================================
--- /ipk/source.sh4/mediacenter_mayhemIIIKS_3_9/CONTROL/control	(revision 8656)
+++ /ipk/source.sh4/mediacenter_mayhemIIIKS_3_9/CONTROL/control	(revision 8656)
@@ -0,0 +1,11 @@
+Package: enigma2-plugin-mediacenter-mayhem3ks
+Version: 4.0
+Description: "MayhemIII Kingsize" skin to change the look of the AAF- MediaCenter. The skin just fits if you use a Kingsize Skin in enigma!
+Section: mediacenter
+Priority: optional
+Maintainer: AAF Forum
+Architecture: sh4
+OE: mayhemIII-KS Skin for MediaCenter
+Homepage: http://www.aaf-digital.info
+Depends:
+Source: http://www.aaf-digital.info
Index: /ipk/source.sh4/mediacenter_mayhemIIIKS_3_9/CONTROL/postinst
===================================================================
--- /ipk/source.sh4/mediacenter_mayhemIIIKS_3_9/CONTROL/postinst	(revision 8656)
+++ /ipk/source.sh4/mediacenter_mayhemIIIKS_3_9/CONTROL/postinst	(revision 8656)
@@ -0,0 +1,11 @@
+#!/bin/sh
+TMP=/tmp/.mediacenter
+echo "successfully installed"
+echo "syncing disk"
+sync
+if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
+	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
+	FREE=`expr $SPACE - 100`
+	echo new freespace size $FREE kb
+fi
+exit 0
Index: /ipk/source.sh4/mediacenter_mayhemIIIKS_3_9/CONTROL/postrm
===================================================================
--- /ipk/source.sh4/mediacenter_mayhemIIIKS_3_9/CONTROL/postrm	(revision 8656)
+++ /ipk/source.sh4/mediacenter_mayhemIIIKS_3_9/CONTROL/postrm	(revision 8656)
@@ -0,0 +1,15 @@
+#!/bin/sh
+TMP=/tmp/.mediacenter
+
+PLUGINDIR1=/usr/lib/enigma2/python/Plugins/Extensions/Mediacenter/skins/mayhemIIIKS
+rm -r $PLUGINDIR1 > /dev/null 2>&1
+
+echo "successfully removed"
+echo "syncing disk"
+sync
+if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
+	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
+	FREE=`expr $SPACE - 100`
+	echo new freespace size $FREE kb
+fi
+exit 0
Index: /ipk/source.sh4/mediacenter_mayhemIIIKS_3_9/CONTROL/preinst
===================================================================
--- /ipk/source.sh4/mediacenter_mayhemIIIKS_3_9/CONTROL/preinst	(revision 8656)
+++ /ipk/source.sh4/mediacenter_mayhemIIIKS_3_9/CONTROL/preinst	(revision 8656)
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+TMP=/tmp/.mediacenter
+echo "syncing disk"
+sync
+
+model=`cat /etc/model`
+echo""
+echo "Checking your Boxtype...."
+echo "Some Plugins will not work correctly on your $model!"
+echo ""
+if [ "$model" = "" ]; then
+	echo "Sorry! This Plugin is not available for your $model because it will not work correctly!!!"
+	echo "Aborting installation..."
+	exit 1
+else
+	echo "Boxtype: $model OK"
+fi
+
+if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
+	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
+	FREE=`expr $SPACE - 100`
+	SIZE=2800
+	echo "checking freespace"
+	echo packege size $SIZE kb
+	echo freespace size $FREE kb
+	if  [ "$FREE" -lt "$SIZE" ]; then
+		echo "sorry no freespace left on device"
+		exit 1
+	else
+		echo ok
+	fi
+fi   
+echo "installing mayhemIII KS Skin for MediaCenter ..."
+echo "checking OS"
+if  [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then                      
+	echo ---------------------------
+	echo DONT USE this IPK Package!!
+	echo ---
+	echo Only for AAF Image!!
+	echo ---------------------------
+	exit 1
+fi
+exit 0
Index: /ipk/source.sh4/mediacenter_mayhemIIIKS_3_9/CONTROL/prerm
===================================================================
--- /ipk/source.sh4/mediacenter_mayhemIIIKS_3_9/CONTROL/prerm	(revision 8656)
+++ /ipk/source.sh4/mediacenter_mayhemIIIKS_3_9/CONTROL/prerm	(revision 8656)
@@ -0,0 +1,11 @@
+#!/bin/sh
+TMP=/tmp/.mediacenter
+echo "syncing disk"
+sync
+if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
+	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
+	FREE=`expr $SPACE - 100`
+	echo freespace size $FREE kb
+fi
+echo "removing mayhemIII KS Skin for MediaCenter"
+exit 0
Index: /ipk/source.sh4/mediacenter_mayhemIIIKS_3_9/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/skin.xml
===================================================================
--- /ipk/source.sh4/mediacenter_mayhemIIIKS_3_9/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/skin.xml	(revision 8656)
+++ /ipk/source.sh4/mediacenter_mayhemIIIKS_3_9/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/skin.xml	(revision 8656)
@@ -0,0 +1,594 @@
+<skin>
+		<output id="0">
+			<resolution xres="1024" yres="576" bpp="32" />
+		</output>
+		<!-- MayhemIII-KS FLASH v4.0 XBMC Mod by Civer -->
+		<!-- MC Main Menu -->
+		<screen name="DMC_MainMenu" position="0,0" size="1024,576" title="Media Center - Home" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/homeblack.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on" />
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/innerring.png" position="126,26" zPosition="4" size="294,115" transparent="1" alphatest="on" />
+			<widget source="global.CurrentTime" render="Label" position="910,34" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+			<convert type="ClockToText">Format:%H:%M</convert>
+		</widget>
+			<widget source="menu" render="Listbox" zPosition="3" transparent="1" position="75,210" size="200,300" scrollbarMode="showOnDemand" enableWrapAround="1" foregroundColor="#FFFFFF" foregroundColorSelected="#FFFFFF" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/selection_bar.png" >
+				<convert type="StringList" />
+			</widget>
+			<widget source="menu" render="Pixmap" transparent="0" zPosition="2" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/music.png" position="282,74" size="743,455" alphatest="on" >
+				<convert type="MenuEntryCompare">menu_music</convert>
+				<convert type="ConditionalShowHide" />
+			</widget>
+			<widget source="menu" render="Pixmap" transparent="0" zPosition="2" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/video.png" position="282,74" size="743,455" alphatest="on" >
+				<convert type="MenuEntryCompare">menu_video</convert>
+				<convert type="ConditionalShowHide" />
+			</widget>
+			<widget source="menu" render="Pixmap" transparent="1" zPosition="2" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/picture.png" position="282,74" size="743,455" alphatest="on" >
+				<convert type="MenuEntryCompare">menu_pictures</convert>
+				<convert type="ConditionalShowHide" />
+			</widget>
+			<widget source="menu" render="Pixmap" transparent="1" zPosition="2" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/vlc.png" position="282,74" size="743,455" alphatest="on" >
+				<convert type="MenuEntryCompare">menu_appletrailer</convert>
+				<convert type="ConditionalShowHide" />
+			</widget>
+			<widget source="menu" render="Pixmap" transparent="1" zPosition="2" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/dvd.png" position="282,74" size="743,455" alphatest="on" >
+				<convert type="MenuEntryCompare">menu_myvideo</convert>
+				<convert type="ConditionalShowHide" />
+			</widget>
+			<widget source="menu" render="Pixmap" transparent="1" zPosition="2" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/dvd.png" position="282,74" size="743,455" alphatest="on" >
+				<convert type="MenuEntryCompare">menu_multimediathek</convert>
+				<convert type="ConditionalShowHide" />
+			</widget>
+			<widget source="menu" render="Pixmap" transparent="1" zPosition="2" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/browser.png" position="282,74" size="743,455" alphatest="on" >
+				<convert type="MenuEntryCompare">menu_qtbrowser</convert>
+				<convert type="ConditionalShowHide" />
+			</widget>
+			<widget source="menu" render="Pixmap" transparent="1" zPosition="2" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/vlc.png" position="282,74" size="743,455" alphatest="on" >
+				<convert type="MenuEntryCompare">menu_vlcplayer</convert>
+				<convert type="ConditionalShowHide" />
+			</widget>
+			<widget source="menu" render="Pixmap" transparent="1" zPosition="2" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/rss.png" position="282,74" size="743,455" alphatest="on" >
+				<convert type="MenuEntryCompare">menu_browser</convert>
+				<convert type="ConditionalShowHide" />
+			</widget>
+			<widget source="menu" render="Pixmap" transparent="1" zPosition="2" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/radio.png" position="282,74" size="743,455" alphatest="on" >
+				<convert type="MenuEntryCompare">menu_radio</convert>
+				<convert type="ConditionalShowHide" />
+			</widget>
+			<widget source="menu" render="Pixmap" transparent="1" zPosition="2" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/radio.png" position="282,74" size="743,455" alphatest="on" >
+				<convert type="MenuEntryCompare">menu_webradiofs</convert>
+				<convert type="ConditionalShowHide" />
+			</widget>
+			<widget source="menu" render="Pixmap" transparent="1" zPosition="2" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/rss.png" position="282,74" size="743,455" alphatest="on" >
+				<convert type="MenuEntryCompare">menu_rss</convert>
+				<convert type="ConditionalShowHide" />
+			</widget>
+			<widget source="menu" render="Pixmap" transparent="1" zPosition="2" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/weather.png" position="282,74" size="743,455" alphatest="on" >
+				<convert type="MenuEntryCompare">menu_weather</convert>
+				<convert type="ConditionalShowHide" />
+			</widget>
+			<widget source="menu" render="Pixmap" transparent="1" zPosition="2" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/settings.png" position="282,74" size="743,455" alphatest="on" >
+				<convert type="MenuEntryCompare">menu_settings</convert>
+				<convert type="ConditionalShowHide" />
+			</widget>
+		</screen>
+
+		<!-- MC Settings Menu -->
+		<screen name="MC_Settings" position="0,0" size="1024,576" title="Media Center - Settings" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/homeblack.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on"/>
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/settings.png" position="282,74" zPosition="2" size="743,455" transparent="1" alphatest="on"/>
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/innerring.png" position="126,26" zPosition="4" size="294,115" transparent="1" alphatest="on" />
+			<eLabel font="Regular;11" foregroundColor="white" halign="right" position="730,540" size="250,12" text="mayhem III KS v4.0 by Civer" valign="center" zPosition="5" transparent="1" />
+			<widget source="title" transparent="1" render="Label" zPosition="4" position="100,80" size="280,35" font="Regular;23" />
+			<widget source="menu" render="Listbox" zPosition="4" transparent="1" position="75,210" size="200,200" scrollbarMode="showOnDemand" enableWrapAround="1" foregroundColor="#FFFFFF" foregroundColorSelected="#FFFFFF" itemHeight="32" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/selection_bar.png" >
+				<convert type="StringList" />
+			</widget>
+			<widget source="global.CurrentTime" render="Label" position="910,34" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!-- MC Global Settings Menu -->
+		<screen name="MCS_GlobalSettings" position="0,0" size="1024,576" title="Media Center - Global Settings" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background5.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on" />
+			<eLabel backgroundColor="red" position="93,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="green" position="326,555" size="140,3" zPosition="5"/>
+			<widget name="key_red" position="93,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_green" position="326,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget source="show_title" render="Label" font="Regular;20" position="212,58" backgroundColor="#000000" size="500,22" zPosition="3" transparent="1"/>
+			<widget name="config" position="212,100" size="600,420" zPosition="4" transparent="1" itemHeight="32" enableWrapAround="1" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/fanart_list_sub_nofocus.png" />
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!-- MC Global Settings Directory Path Filelist Menu -->
+		<screen name="MCS_DirectoryPathFilelist" position="0,0" size="1024,576" title="Media Center - Directory Path Filelist" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background5.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on" />
+			<eLabel backgroundColor="blue" position="774,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="green" position="306,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="red" position="76,555" size="140,3" zPosition="5"/>
+			<widget source="key_red" render="Label" position="76,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget source="key_green" render="Label" position="306,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget source="key_blue" render="Label" position="774,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget source="show_title" render="Label" font="Regular;20" position="212,58" backgroundColor="#000000" size="500,22" zPosition="3" transparent="1"/>
+			<widget name="filelist" position="212,100" size="600,300" zPosition="4" transparent="1" scrollbarMode="showOnDemand" enableWrapAround="1" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/fanart_list_sub_nofocus.png" />
+			<widget source="currentfolder" render="Label" position="212,405" size="600,100" halign="center" valign="center" zPosition="5" transparent="1" font="Regular;20" foregroundColor="#f0f0f0"/>
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!-- MC ABOUT Screen -->
+		<screen name="MCS_AboutScreen" position="0,0" size="1024,576" title="Media Center - About MC..." flags="wfNoBorder" backgroundColor="#000000" >
+			<eLabel font="Regular;11" foregroundColor="white" halign="right" position="730,540" size="250,12" text="mayhem III KS v4.0 by Civer" valign="center" zPosition="5" transparent="1" />
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/homeblack.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on"/>
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/settings.png" position="282,74" zPosition="2" size="743,455" transparent="1" alphatest="on"/>
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/innerring.png" position="126,26" zPosition="4" size="294,115" transparent="1" alphatest="on" />
+			<widget name="info" position="75,200" size="500,400" zPosition="4" transparent="1" font="Regular;30"/>
+			<widget source="global.CurrentTime" render="Label" position="910,34" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!-- MC Skinselector -->
+		<screen name="MCS_SkinSelector" position="0,0" size="1024,576" title="Choose your Skin" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background5.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on" />
+			<widget source="show_title" render="Label" font="Regular;20" position="212,58" backgroundColor="#000000" size="500,22" zPosition="3" transparent="1"/>
+			<widget name="SkinList" position="212,120" size="600,160" itemHeight="32" zPosition="4" transparent="1" scrollbarMode="showOnDemand" enableWrapAround="1" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/fanart_list_sub_nofocus.png" />
+			<widget name="Preview" position="372,300" size="280,210" zPosition="4" alphatest="on"/>
+			<widget source="global.CurrentTime" render="Label" position="910,34" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!--MC GlobalFunctions IMDB Info Screen-->
+		<screen name="MC_VideoImdbView" position="0,0" size="1024,576" title="Imdbfile Info" backgroundColor="#42000000">
+			<ePixmap position="0,0" zPosition="-1" transparent="1" size="1024,576" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background4.png" />
+			<widget name="thumbCoverBig" position="518,20" size="471,536" zPosition="2" transparent="1" alphatest="on" />
+			<widget name="thumbPosterMid" position="518,20" size="471,536" zPosition="3" transparent="1" alphatest="on" />
+			<widget name="imdbinfo" font="Regular;18" position="35,30" size="480,500" zPosition="5" transparent="1" />
+			<eLabel backgroundColor="green" position="326,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="red" position="93,555" size="140,3" zPosition="5"/>
+			<widget name="key_red" position="93,526" zPosition="5" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_green" position="326,526" zPosition="5" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+				<applet type="onLayoutFinish">
+# here you can set the pictures sizes
+self.picX = 471
+self.picY = 536
+# start showing the screen
+self.showPic()
+				</applet>
+		</screen>
+
+		<!-- MC GlobalFunctions Audio Info Screen -->
+		<screen name="MC_AudioInfoView" position="0,0" size="1024,576" title="Media Center - Audio Info View" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background5.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on" />
+			<widget source="show_title" render="Label" font="Regular;20" position="212,58" backgroundColor="#000000" size="500,22" zPosition="3" transparent="1"/>
+			<widget name="infolist" position="212,120" size="600,400" zPosition="4" transparent="1" selectionDisabled="1" />
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!-- MC GlobalFunctions VideoPlaylist Info Screen-->
+		<screen name="MC_VideoPlaylistInfoView" position="0,0" size="1024,576" title="Media Center - Videoplaylist Info" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background5.png" position="0,0" zPosition="-1" size="1024,576" transparent="1" alphatest="on" />
+			<widget source="show_title" render="Label" font="Regular;20" position="212,58" backgroundColor="#000000" size="500,22" zPosition="3" transparent="1"/>
+			<eLabel backgroundColor="green" position="306,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="red" position="76,555" size="140,3" zPosition="5"/>
+			<widget name="key_red" position="76,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_green" position="306,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="playlist" position="212,120" size="600,400" zPosition="4" font="Regular;18" transparent="1" />
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!-- MC Audio Player -->
+		<screen name="MC_AudioPlayer" position="0,0" size="1024,576" title="Media Center - Audio Player" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on"/>
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/brmusic.png" position="0,0" zPosition="2" size="1024,88" transparent="1" alphatest="on"/>
+			<eLabel backgroundColor="blue" position="774,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="yellow" position="542,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="green" position="306,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="red" position="76,555" size="140,3" zPosition="5"/>
+			<widget name="key_red" position="76,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_green" position="306,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_yellow" position="542,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_blue" position="774,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="coverArt" position="820,170" size="171,140" zPosition="5" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/icons/aafcoverart.png" transparent="1" alphatest="blend" />
+			<widget name="filelist" transparent="1" position="65,120" zPosition="2" size="750,300" scrollbarMode="showOnDemand" enableWrapAround="1" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/filelist_focus.png"/>
+			<widget name="fileinfo" zPosition="2" transparent="1" halign="left" position="41,436" size="385,115" font="Regular;15" foregroundColor="#f0f0f0"/>
+			<widget name="currentfolder" zPosition="5" transparent="1" halign="left" valign="top" position="65,86" size="894,35" font="Regular;15" foregroundColor="#f0f0f0"/>
+			<ePixmap name="endcap_left" position="527,480" zPosition="2" size="15,40" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/icons/endcap_left.png" transparent="1" alphatest="on" />
+			<ePixmap name="skipback" position="542,480" zPosition="2" size="35,40" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/icons/skipback_disabled.png" />
+			<widget name="play" position="577,480" zPosition="2" size="35,40" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/icons/play_disabled.png" />
+			<widget name="stop" position="612,480" zPosition="2" size="35,40" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/icons/stop_disabled.png" />
+			<ePixmap name="skipforward" position="647,480" zPosition="2" size="35,40" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/icons/skipforward_disabled.png" />
+			<ePixmap name="endcap_right" position="682,480" zPosition="2" size="15,40" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/icons/endcap_right.png" transparent="1" alphatest="on" />
+			<widget source="session.CurrentService" render="Label" position="337,445" size="80,20" zPosition="3" font="Regular;18" halign="right" transparent="1">
+				<convert type="ServicePosition">Position,ShowHours</convert>
+			</widget>
+			<widget source="session.CurrentService" render="Label" position="802,445" size="80,20" zPosition="3" font="Regular;18" halign="left" transparent="1">
+				<convert type="ServicePosition">Remaining,InMinutes</convert>
+			</widget>
+			<widget source="session.CurrentService" render="Progress" position="437,450" size="350,8" zPosition="3" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/icons/progress_mp.png">
+				<convert type="ServicePosition">Position</convert>
+			</widget>
+			<widget source="session.CurrentService" render="Label" position="900,444" size="110,26" font="Regular;20" halign="left" zPosition="6" transparent="1">
+				<convert type="ServicePosition">Length</convert>
+			</widget>
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!-- MC Audioplayer Settings Menu -->
+		<screen name="AudioPlayerSettings" position="0,0" size="1024,576" title="MC-Audioplayer Settings" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/brmusic.png" position="0,0" zPosition="2" size="1024,88" transparent="1" alphatest="on" />
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background5.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on" />
+			<eLabel backgroundColor="red" position="93,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="blue" position="792,555" size="140,3" zPosition="5"/>
+			<widget name="key_red" position="93,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_blue" position="792,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget source="show_title" render="Label" font="Regular;20" position="212,58" backgroundColor="#000000" size="500,22" zPosition="3" transparent="1"/>
+			<widget name="configlist" position="212,120" size="600,400" zPosition="4" transparent="1" itemHeight="32" enableWrapAround="1" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/fanart_list_sub_nofocus.png" />
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!-- MC Video Player -->
+		<screen name="MC_VideoPlayer" position="0,0" size="1024,576" title="titel" flags="wfNoBorder" backgroundColor="#ff000000">
+			<eLabel position="0,0" zPosition="0" size="1024,576" backgroundColor="#000000" />
+			<ePixmap position="0,0" zPosition="0" size="1024,576" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background4.png" />
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/brvideo.png" position="0,0" zPosition="2" size="1024,88" transparent="1" alphatest="on" />
+			<eLabel backgroundColor="blue" position="792,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="yellow" position="559,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="green" position="326,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="red" position="93,555" size="140,3" zPosition="5"/>
+			<widget name="key_red" position="93,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_green" position="326,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_yellow" position="559,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_blue" position="792,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="filelist" transparent="1" position="65,120" zPosition="2" size="894,400" scrollbarMode="showOnDemand" enableWrapAround="1" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/filelist_focus.png"/>
+			<widget source="pageinfo" position="0,528" transparent="1" render="Label" zPosition="2" valign="center" halign="center" size="1024,30" font="Regular;14" />
+			<widget name="currentfolder" zPosition="5" transparent="1" halign="left" valign="top" position="65,86" size="894,35" font="Regular;15" foregroundColor="#f0f0f0"/>
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center" backgroundColor="#000000">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+			<widget name="frame" position="400,0" size="190,200" pixmap="pic_frame.png" zPosition="5" alphatest="on" />
+			<widget name="listview" transparent="1" zPosition="2" position="65,120" size="450,275" itemHeight="32" scrollbarMode="showNever" backgroundColor="#000000" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/fanart_list_sub_focus.png" backgroundPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/fanart_list_sub_nofocus.png" enableWrapAround="1"/>
+			<widget name="imdbtitle" transparent="1" zPosition="5" halign="center" valign="top" position="160,25" size="704,30" font="Regular;24" foregroundColor="#FFFFFF" backgroundColor="#000000" /> 
+			<widget name="moviecover" transparent="1" zPosition="5" position="40,385" size="124,171" alphatest="on" />
+			<widget name="movieplot" text="" transparent="1" zPosition="5" halign="left" position="150,380" size="840,159" font="Regular;16" foregroundColor="#FFFFFF" backgroundColor="#000000" /> 
+			<widget name="tvpreview" transparent="1" zPosition="5" position="40,385" size="200,171" alphatest="on" />
+			<widget name="tvplot" transparent="1" zPosition="5" halign="left" position="300,380" size="670,159" font="Regular;16" foregroundColor="#FFFFFF" backgroundColor="#000000" /> 
+			<!-- NOT CONFIGURED YET -->
+			<!--<widget name="tvcover" transparent="1" zPosition="5" position="800,0" size="124,171" alphatest="on" />
+			<widget name="tvbanner" transparent="0" zPosition="5" position="400,0" size="900,100" alphatest="on" />-->
+			<widget name="nostars" transparent="1" backgroundColor="#000000" zPosition="5" position="392,58" size="240,24" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/icons/NoStars.png" alphatest="on" />
+			<widget name="stars" transparent="1" backgroundColor="#000000" zPosition="6" position="392,58" size="240,24" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/icons/Stars.png" />
+			<widget source="label0" render="Label" position="65,292" size="190,18" halign="center" font="Regular;18" zPosition="4" transparent="1"  foregroundColor="#FFFFFF" />"
+			<widget name="thumb0" position="60,120" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget name="thumbreal0" position="105,120" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget source="label1" render="Label" position="300,292" size="190,18" halign="center" font="Regular;18" zPosition="4" transparent="1"  foregroundColor="#FFFFFF" />"
+			<widget name="thumb1" position="295,120" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget name="thumbreal1" position="340,120" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget source="label2" render="Label" position="535,292" size="190,18" halign="center" font="Regular;18" zPosition="4" transparent="1"  foregroundColor="#FFFFFF" />"
+			<widget name="thumb2" position="530,120" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget name="thumbreal2" position="575,120" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget source="label3" render="Label" position="770,292" size="190,18" halign="center" font="Regular;18" zPosition="4" transparent="1"  foregroundColor="#FFFFFF" />"
+			<widget name="thumb3" position="765,120" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget name="thumbreal3" position="810,120" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget source="label4" render="Label" position="65,507" size="190,18" halign="center" font="Regular;18" zPosition="4" transparent="1"  foregroundColor="#FFFFFF" />"
+			<widget name="thumb4" position="60,335" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget name="thumbreal4" position="105,335" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget source="label5" render="Label" position="300,507" size="190,18" halign="center" font="Regular;18" zPosition="4" transparent="1"  foregroundColor="#FFFFFF" />"
+			<widget name="thumb5" position="295,335" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget name="thumbreal5" position="340,335" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget source="label6" render="Label" position="535,507" size="190,18" halign="center" font="Regular;18" zPosition="4" transparent="1"  foregroundColor="#FFFFFF" />"
+			<widget name="thumb6" position="530,335" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget name="thumbreal6" position="575,335" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget source="label7" render="Label" position="770,507" size="190,18" halign="center" font="Regular;18" zPosition="4" transparent="1"  foregroundColor="#FFFFFF" />"
+			<widget name="thumb7" position="765,335" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget name="thumbreal7" position="810,335" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+		</screen>
+
+		<!-- MC Videoplayer Settings Menu -->
+		<screen name="VideoPlayerSettings" position="0,0" size="1024,576" title="MC-VideoPlayer Settings" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/brvideo.png" position="0,0" zPosition="2" size="1024,88" transparent="1" alphatest="on" />
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background5.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on" />
+			<eLabel backgroundColor="red" position="93,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="blue" position="792,555" size="140,3" zPosition="5"/>
+			<widget name="key_red" position="93,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_blue" position="792,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget source="show_title" render="Label" font="Regular;20" position="212,58" backgroundColor="#000000" size="500,22" zPosition="3" transparent="1"/>
+			<widget name="configlist" position="212,120" size="600,400" zPosition="4" transparent="1" itemHeight="32" enableWrapAround="1" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/fanart_list_sub_nofocus.png" />
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!--MC MoviePlayer Infobar-->
+		<screen name="MoviePlayerObi" flags="wfNoBorder" position="100,433" size="824,110" title="InfoBar">
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/infobar.png" position="0,0" zPosition="1" size="824,110" transparent="1" alphatest="on" />
+			<ePixmap position="712,10" zPosition="3" size="94,58" backgroundColor="transparent" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/AAF-MC.png" alphatest="on" transparent="1"/>
+			<widget source="session.CurrentService" render="Progress" position="155,60" size="339,8" zPosition="3" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/icons/progress_mp.png">
+				<convert type="ServicePosition">Position</convert>
+			</widget>
+			<ePixmap position="155,70" zPosition="2" size="339,17" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/icons/mp-scale2.png" alphatest="on"/>
+			<widget source="session.CurrentService" render="Label" position="10,6" size="550,23" valign="top" halign="left" zPosition="3" font="Regular;18" transparent="1">
+				<convert type="ServiceName">Name</convert>
+			</widget>
+			<widget source="session.CurrentService" render="Label" position="570,6" size="110,23" font="Regular;21" halign="right" backgroundColor="#251e1f20" foregroundColor="#f0f0f0" zPosition="3" transparent="1">
+				<convert type="ServicePosition">Length</convert>
+			</widget>
+			<widget source="session.CurrentService" render="Label" position="60,53" size="85,30" font="Regular;21" halign="right" backgroundColor="#251e1f20" foregroundColor="#f0f0f0" zPosition="3" transparent="1">
+				<convert type="ServicePosition">Position</convert>
+			</widget>
+			<widget source="session.CurrentService" render="Label" position="505,53" size="80,26" font="Regular;21" halign="left" backgroundColor="#251e1f20" foregroundColor="#f0f0f0" zPosition="3" transparent="1">
+				<convert type="ServicePosition">Remaining</convert>
+			</widget>
+			<widget source="global.CurrentTime" render="Label" position="702,77" zPosition="3" size="114,25" font="Regular;23" transparent="1" foregroundColor="#f0f0f0" halign="center" backgroundColor="#251e1f20">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+	
+		<!-- MC Picture Player -->
+		<screen name="MC_PictureViewer" position="0,0" size="1024,576" title="Media Center - Pic Viewer" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background3.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on" />
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/brpicture.png" position="0,0" zPosition="2" size="1024,88" transparent="1" alphatest="on" />
+			<eLabel backgroundColor="blue" position="774,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="yellow" position="542,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="green" position="306,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="red" position="76,555" size="140,3" zPosition="5"/>
+			<widget name="key_red" position="76,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_green" position="306,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_yellow" position="542,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_blue" position="774,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="filelist" transparent="1" position="65,120" zPosition="2" size="894,400" scrollbarMode="showOnDemand" enableWrapAround="1" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/filelist_focus.png"/>
+			<widget source="pageinfo" position="0,528" transparent="1" render="Label" zPosition="2" valign="center" halign="center" size="1024,30" font="Regular;14" />
+			<widget name="currentfolder" zPosition="5" transparent="1" halign="left" valign="top" position="65,86" size="894,35" font="Regular;15" foregroundColor="#f0f0f0"/>
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+			<widget name="frame" position="400,0" size="190,200" pixmap="pic_frame.png" zPosition="5" alphatest="on" />
+			<eLabel position="0,0" zPosition="0" size="1024,576" backgroundColor="#000000" />
+			<widget source="label0" render="Label" position="65,292" size="190,18" halign="center" font="Regular;18" zPosition="4" transparent="1"  foregroundColor="#FFFFFF" />"
+			<widget name="thumb0" position="60,120" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget name="thumbreal0" position="105,120" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget source="label1" render="Label" position="300,292" size="190,18" halign="center" font="Regular;18" zPosition="4" transparent="1"  foregroundColor="#FFFFFF" />"
+			<widget name="thumb1" position="295,120" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget name="thumbreal1" position="340,120" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget source="label2" render="Label" position="535,292" size="190,18" halign="center" font="Regular;18" zPosition="4" transparent="1"  foregroundColor="#FFFFFF" />"
+			<widget name="thumb2" position="530,120" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget name="thumbreal2" position="575,120" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget source="label3" render="Label" position="770,292" size="190,18" halign="center" font="Regular;18" zPosition="4" transparent="1"  foregroundColor="#FFFFFF" />"
+			<widget name="thumb3" position="765,120" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget name="thumbreal3" position="810,120" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget source="label4" render="Label" position="65,507" size="190,18" halign="center" font="Regular;18" zPosition="4" transparent="1"  foregroundColor="#FFFFFF" />"
+			<widget name="thumb4" position="60,335" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget name="thumbreal4" position="105,335" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget source="label5" render="Label" position="300,507" size="190,18" halign="center" font="Regular;18" zPosition="4" transparent="1"  foregroundColor="#FFFFFF" />"
+			<widget name="thumb5" position="295,335" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget name="thumbreal5" position="340,335" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget source="label6" render="Label" position="535,507" size="190,18" halign="center" font="Regular;18" zPosition="4" transparent="1"  foregroundColor="#FFFFFF" />"
+			<widget name="thumb6" position="530,335" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget name="thumbreal6" position="575,335" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget source="label7" render="Label" position="770,507" size="190,18" halign="center" font="Regular;18" zPosition="4" transparent="1"  foregroundColor="#FFFFFF" />"
+			<widget name="thumb7" position="765,335" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+			<widget name="thumbreal7" position="810,335" size="190,174" zPosition="4" transparent="1" alphatest="on" />"
+		</screen>
+
+		<!-- MC PictureViewer Settings Menu -->
+		<screen name="MC_PicSetup" position="0,0" size="1024,576" title="MC-PictureViewer Settings" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/brpicture.png" position="0,0" zPosition="2" size="1024,88" transparent="1" alphatest="on" />
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background5.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on" />
+			<eLabel backgroundColor="red" position="93,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="blue" position="792,555" size="140,3" zPosition="5"/>
+			<widget name="key_red" position="93,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_blue" position="792,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget source="show_title" render="Label" font="Regular;20" position="212,58" backgroundColor="#000000" size="500,22" zPosition="3" transparent="1"/>
+			<widget name="configlist" position="212,120" size="600,400" zPosition="4" transparent="1" itemHeight="32" enableWrapAround="1" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/fanart_list_sub_nofocus.png" />
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!-- MC Radio Player -->
+		<screen name="MC_RadioPlayer" position="0,0" size="1024,576" title="Media Center - Radio Player" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on" />
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/brmusic.png" position="0,0" zPosition="2" size="1024,88" transparent="1" alphatest="on" />
+			<eLabel backgroundColor="blue" position="774,555" size="140,3" zPosition="5"/>
+			<widget name="key_blue" position="774,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="filelist" transparent="1" position="30,120" zPosition="2" size="665,150" scrollbarMode="showOnDemand" enableWrapAround="1" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/filelist_focus.png"/>
+			<widget name="playlist" transparent="1" position="30,305" zPosition="2" size="665,100" selectionDisabled="1"  scrollbarMode="showOnDemand" enableWrapAround="0" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/filelist_focus.png"/>
+			<widget name="fileinfo" zPosition="2" transparent="1" halign="left" position="41,436" size="385,115" font="Regular;15" foregroundColor="#f0f0f0"/>
+			<widget name="currentfolder" zPosition="5" transparent="1" halign="left" valign="center" position="65,86" size="894,35" font="Regular;15" foregroundColor="#f0f0f0"/>
+			<widget name="Lplaylist" zPosition="5" transparent="1" halign="left" position="45,280" size="670,20" font="Regular;16" foregroundColor="#f0f0f0"/>
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!-- MC RadioPlayer Settings Menu -->
+		<screen name="RadioPlayerSettings" position="0,0" size="1024,576" title="MC-RadioPlayer Settings" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/brmusic.png" position="0,0" zPosition="2" size="1024,88" transparent="1" alphatest="on" />
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background5.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on" />
+			<eLabel backgroundColor="red" position="93,555" size="140,3" zPosition="5"/>
+			<widget name="key_red" position="93,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget source="show_title" render="Label" font="Regular;20" position="212,58" backgroundColor="#000000" size="500,22" zPosition="3" transparent="1"/>
+			<widget name="configlist" position="212,120" size="600,400" zPosition="4" transparent="1" itemHeight="32" enableWrapAround="1" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/fanart_list_sub_nofocus.png" />
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!-- MC File Browser -->
+		<screen name="MC_FileBrowser" position="0,0" size="1024,576" title="Media Center - Radio Player" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on" />
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/brrss.png" position="0,0" zPosition="2" size="1024,88" transparent="1" alphatest="on" />
+			<eLabel backgroundColor="blue" position="792,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="yellow" position="559,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="green" position="326,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="red" position="93,555" size="140,3" zPosition="5"/>
+			<widget name="key_red" position="83,526" zPosition="3" size="160,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_green" position="316,526" zPosition="3" size="160,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_yellow" position="549,526" zPosition="3" size="160,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_blue" position="782,526" zPosition="3" size="160,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="filelist" transparent="1" position="45,120" zPosition="2" size="900,293" scrollbarMode="showOnDemand" enableWrapAround="1" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/filelist_focus.png"/>
+			<widget name="selectedFile" zPosition="2" transparent="1" halign="center" position="41,436" size="942,80" font="Regular;18" foregroundColor="#f0f0f0"/>
+			<widget name="currentfolder" zPosition="5" transparent="1" halign="left" valign="top" position="65,86" size="894,35" font="Regular;15" foregroundColor="#f0f0f0"/>
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!-- MC File Browser Settings Menu -->
+		<screen name="FileBrowserSettings" position="0,0" size="1024,576" title="MC-Filebrowser Settings" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/brrss.png" position="0,0" zPosition="2" size="1024,88" transparent="1" alphatest="on" />
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background5.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on" />
+			<eLabel backgroundColor="red" position="93,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="blue" position="792,555" size="140,3" zPosition="5"/>
+			<widget name="key_red" position="93,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_blue" position="792,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget source="show_title" render="Label" font="Regular;20" position="212,58" backgroundColor="#000000" size="500,22" zPosition="3" transparent="1"/>
+			<widget name="configlist" position="212,120" size="600,400" zPosition="4" transparent="1" itemHeight="32" enableWrapAround="1" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/fanart_list_sub_nofocus.png" />
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!-- MC WebradioFS MAIN-->
+		<screen name="WebradioScreenBrowser" position="0,0" size="1024,576" title="Media Center - WebRadioFS" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background3.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on" />
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/brmusic.png" position="0,0" zPosition="2" size="1024,88" transparent="1" alphatest="on" />
+			<eLabel backgroundColor="blue" position="774,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="yellow" position="542,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="green" position="306,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="red" position="76,555" size="140,3" zPosition="5"/>
+			<ePixmap pixmap="/usr/local/share/enigma2/skin_default/buttons/key_menu.png" zPosition="5" position="475,538" size="35,25" alphatest="on" />
+			<widget name="key_red" position="76,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_green" position="306,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_yellow" position="542,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_blue" position="774,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="titeltext" position="30,88" size="964,30" font="Regular;20" transparent="1" zPosition="5"/>
+			<widget name="streamlist" position="30,118" size="964,390" scrollbarMode="showOnDemand" transparent="1" zPosition="5"/>
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!-- MC WebradioFS Settings Menu -->
+		<screen name="WebradioFSSetup" position="0,0" size="1024,576" title="Webradio - Setup" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/brmusic.png" position="0,0" zPosition="2" size="1024,88" transparent="1" alphatest="on" />
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background5.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on" />
+			<eLabel backgroundColor="green" position="306,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="red" position="76,555" size="140,3" zPosition="5"/>
+			<widget name="key_red" position="76,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_green" position="306,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget source="show_title" render="Label" font="Regular;20" position="212,58" backgroundColor="#000000" size="500,22" zPosition="3" transparent="1"/>
+			<widget name="config" position="212,120" size="600,400" zPosition="4" transparent="1" itemHeight="32" scrollbarMode="showOnDemand" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/fanart_list_sub_nofocus.png" />
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!-- MC WebradioFS HELP Menu -->
+		<screen name="WebradioScreenHelp" position="0,0" size="1024,576" title="Webradio - Setup" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/brmusic.png" position="0,0" zPosition="2" size="1024,88" transparent="1" alphatest="on" />
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background5.png" position="0,0" zPosition="-1" size="1024,576" transparent="1" alphatest="on" />
+			<widget name="help" position="212,120" size="600,400" zPosition="4" transparent="1" font="Regular;16" />
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!-- MC Weather Info -->
+		<screen name="WeatherPlugin" position="0,0" size="1024,576" title="Media Center - Weather Info" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background2.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on" />
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/brweather.png" position="0,0" zPosition="2" size="1024,88" transparent="1" alphatest="on" />
+			<eLabel backgroundColor="blue" position="774,555" size="140,3" zPosition="5"/>
+			<widget name="key_blue" position="774,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="caption" position="76,230" zPosition="3" size="300,23" font="Regular;22" transparent="1"/>
+			<widget name="currentTemp" position="76,255" zPosition="3" size="300,23" font="Regular;22" transparent="1"/>
+			<widget name="condition" position="76,290" zPosition="3" size="300,20" font="Regular;18" transparent="1"/>
+			<widget name="wind_condition" position="76,315" zPosition="3" size="300,20" font="Regular;18" transparent="1"/>
+			<widget name="humidity" position="76,340" zPosition="3" size="300,20" font="Regular;18" valign="bottom" transparent="1"/>
+			<widget name="weekday1" position="435,240" zPosition="3" size="72,20" halign="center" valign="center" font="Regular;18" transparent="1"/>
+			<widget name="weekday1_icon" position="435,260" zPosition="3" size="72,72" alphatest="blend"/>
+			<widget name="weekday1_temp" position="421,340" zPosition="3" size="100,20" halign="center" valign="bottom" font="Regular;16" transparent="1"/>
+			<widget name="weekday2" position="538,240" zPosition="3" size="72,20" halign="center" valign="center" font="Regular;18" transparent="1"/>
+			<widget name="weekday2_icon" position="538,260" zPosition="3" size="72,72" alphatest="blend"/>
+			<widget name="weekday2_temp" position="524,340" zPosition="3" size="100,20" halign="center" valign="bottom" font="Regular;16" transparent="1"/>
+			<widget name="weekday3" position="641,240" zPosition="3" size="72,20" halign="center" valign="center" font="Regular;18" transparent="1"/>
+			<widget name="weekday3_icon" position="641,260" zPosition="3" size="72,72" alphatest="blend"/>
+			<widget name="weekday3_temp" position="628,340" zPosition="3" size="100,20" halign="center" valign="bottom" font="Regular;16" transparent="1"/>
+			<widget name="weekday4" position="744,240" zPosition="3" size="72,20" halign="center" valign="center" font="Regular;18" transparent="1"/>
+			<widget name="weekday4_icon" position="744,260" zPosition="3" size="72,72" alphatest="blend"/>
+			<widget name="weekday4_temp" position="730,340" zPosition="3" size="100,20" halign="center" valign="bottom" font="Regular;16" transparent="1"/>
+			<widget name="statustext" position="140,100" zPosition="3" size="664,170" font="Regular;20" halign="center" valign="center" transparent="1"/>
+			<widget name="info" position="76,526" zPosition="3" size="480,30" font="Regular;18" valign="center" halign="left" transparent="1" />
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!-- MC WeatherPlugin Entries ListConfig Screen -->
+		<screen name="WeatherPluginEntriesListConfigScreen" position="0,0" size="1024,576" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/brweather.png" position="0,0" zPosition="2" size="1024,88" transparent="1" alphatest="on" />
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background5.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on" />
+			<eLabel backgroundColor="red" position="93,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="blue" position="774,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="yellow" position="542,555" size="140,3" zPosition="5"/>
+			<widget name="key_red" position="93,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_yellow" position="542,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_blue" position="774,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget source="show_title" render="Label" font="Regular;20" position="212,58" backgroundColor="#000000" size="500,22" zPosition="3" transparent="1"/>
+			<widget name="city" position="267,150" size="150,50" zPosition="3" transparent="1" font="Regular;20" halign="left"/>
+			<widget name="language" position="417,150" size="150,50" zPosition="3" transparent="1" font="Regular;20" halign="left"/>
+			<widget name="entrylist" position="212,200" size="600,300" zPosition="3" transparent="1" scrollbarMode="showOnDemand" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/fanart_list_sub_nofocus.png" />
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!-- MC WeatherPlugin Entriy Config Screen -->
+		<screen name="WeatherPluginEntryConfigScreen" position="0,0" size="1024,576" flags="wfNoBorder" backgroundColor="#000000" >
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/brweather.png" position="0,0" zPosition="2" size="1024,88" transparent="1" alphatest="on" />
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background5.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on" />
+			<eLabel backgroundColor="red" position="93,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="green" position="306,555" size="140,3" zPosition="5"/>
+			<eLabel backgroundColor="blue" position="774,555" size="140,3" zPosition="5"/>
+			<widget name="key_red" position="93,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_green" position="306,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget name="key_blue" position="774,526" zPosition="3" size="140,40" font="Regular;18" valign="center" halign="center" transparent="1" />
+			<widget source="show_title" render="Label" font="Regular;20" position="212,58" backgroundColor="#000000" size="500,22" zPosition="3" transparent="1"/>
+			<widget name="config" position="212,200" size="600,300" zPosition="3" transparent="1" scrollbarMode="showOnDemand" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/fanart_list_sub_nofocus.png" />
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!-- MC Choice box -->
+		<screen flags="wfNoBorder" name="MC_ChoiceBox" backgroundColor="#000000" position="0,0" size="1024,576" title="Input">
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background5.png" position="0,0" zPosition="1" size="1024,576" transparent="1" alphatest="on" />
+			<widget font="Regular;20" name="text" position="212,58" backgroundColor="#000000" size="500,22" zPosition="3" transparent="1"/>
+			<widget name="list" position="212,120" size="600,400" itemHeight="30" scrollbarMode="showOnDemand" zPosition="3" transparent="1" enableWrapAround="True" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/fanart_list_sub_nofocus.png"/>
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+		<!-- MC Messagebox -->
+		<screen flags="wfNoBorder" name="MC_MessageBox" backgroundColor="#000000" position="0,0" size="1024,576" title="Message">
+			<ePixmap position="0,0" zPosition="1" size="1024,576" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/background5.png" />
+			<eLabel text="Message" backgroundColor="#000000" position="212,58" size="500,22" transparent="1" font="Regular;20" halign="left" zPosition="3"/>
+			<widget font="Regular;20" name="text" position="212,120" backgroundColor="background" size="600,220" zPosition="3" transparent="1" />
+			<widget name="list" position="212,350" scrollbarMode="showOnDemand" size="600,200" zPosition="4" transparent="1" selectionPixmap="/usr/lib/enigma2/python/Plugins/Extensions/MediaCenter/skins/mayhemIIIKS/images/fanart_list_sub_nofocus.png"/>
+			<widget source="global.CurrentTime" render="Label" position="60,58" zPosition="3" size="85,28" font="Regular;26" transparent="1" halign="left" valign="center">
+				<convert type="ClockToText">Format:%H:%M</convert>
+			</widget>
+		</screen>
+
+</skin>
Index: /ipk/source.sh4/players_mediaplayer_1_0/CONTROL/control
===================================================================
--- /ipk/source.sh4/players_mediaplayer_1_0/CONTROL/control	(revision 8656)
+++ /ipk/source.sh4/players_mediaplayer_1_0/CONTROL/control	(revision 8656)
@@ -0,0 +1,10 @@
+Package: enigma2-plugin-players-mediaplayer
+Version: 1.0
+Architecture: sh4
+OE: MediaPlayer AAF lightmod
+Section: extra
+Priority: optional
+Maintainer: AAF
+Homepage: http://www.aaf-digital.info
+Source: http://www.aaf-digital.info
+Description: MediaPlayer AAF lightmod
Index: /ipk/source.sh4/players_mediaplayer_1_0/CONTROL/postinst
===================================================================
--- /ipk/source.sh4/players_mediaplayer_1_0/CONTROL/postinst	(revision 8656)
+++ /ipk/source.sh4/players_mediaplayer_1_0/CONTROL/postinst	(revision 8656)
@@ -0,0 +1,11 @@
+#!/bin/sh
+TMP=/tmp/.mediaplayer
+echo "successfully installed"
+echo "syncing disk"
+sync
+if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
+	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
+	FREE=`expr $SPACE - 100`
+	echo new freespace size $FREE kb
+fi
+exit 0
Index: /ipk/source.sh4/players_mediaplayer_1_0/CONTROL/postrm
===================================================================
--- /ipk/source.sh4/players_mediaplayer_1_0/CONTROL/postrm	(revision 8656)
+++ /ipk/source.sh4/players_mediaplayer_1_0/CONTROL/postrm	(revision 8656)
@@ -0,0 +1,14 @@
+#!/bin/sh
+TMP=/tmp/.mediaplayer
+PLUGINDIR=/usr/lib/enigma2/python/Plugins/Extensions/MediaPlayer
+rm -r $PLUGINDIR > /dev/null 2>&1
+
+echo "successfully removed"
+echo "syncing disk"
+sync
+if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
+	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
+	FREE=`expr $SPACE - 100`
+	echo new freespace size $FREE kb
+fi
+exit 0
Index: /ipk/source.sh4/players_mediaplayer_1_0/CONTROL/preinst
===================================================================
--- /ipk/source.sh4/players_mediaplayer_1_0/CONTROL/preinst	(revision 8656)
+++ /ipk/source.sh4/players_mediaplayer_1_0/CONTROL/preinst	(revision 8656)
@@ -0,0 +1,46 @@
+#!/bin/sh
+#
+TMP=/tmp/.mediaplayer
+PLUGINDIR=/usr/lib/enigma2/python/Plugins/Extensions/MediaPlayer
+echo "syncing disk"
+sync
+
+model=`cat /etc/model`
+echo""
+echo "Checking your Boxtype...."
+echo "Some Plugins will not work correctly on your $model!"
+echo ""
+if [ "$model" = "" ]; then
+	echo "Sorry! This Plugin is not available for your $model because it will not work correctly!!!"
+	echo "Aborting installation..."
+	exit 1
+else
+	echo "Boxtype: $model OK"
+fi
+
+if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
+	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
+	FREE=`expr $SPACE - 100`
+	SIZE=50
+	echo "checking freespace"
+	echo packege size $SIZE kb
+	echo freespace size $FREE kb
+	if  [ "$FREE" -lt "$SIZE" ]; then
+		echo "sorry no freespace left on device"
+		exit 1
+	else
+		echo ok
+	fi
+fi
+echo "installing MediaPlayer ..."
+echo "checking OS"
+if  [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then                      
+	echo ---------------------------
+	echo DONT USE this IPK Package!!
+	echo ---
+	echo Only for AAF Image!!
+	echo ---------------------------	
+	exit 1
+fi
+
+exit 0
Index: /ipk/source.sh4/players_mediaplayer_1_0/CONTROL/prerm
===================================================================
--- /ipk/source.sh4/players_mediaplayer_1_0/CONTROL/prerm	(revision 8656)
+++ /ipk/source.sh4/players_mediaplayer_1_0/CONTROL/prerm	(revision 8656)
@@ -0,0 +1,13 @@
+#!/bin/sh
+TMP=/tmp/.mediaplayer
+echo "syncing disk"
+sync
+if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
+	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
+	FREE=`expr $SPACE - 100`
+	echo freespace size $FREE kb
+fi
+echo "removing MediaPlayer"
+exit 0
+
+
Index: /ipk/source.sh4/players_mediaplayer_1_0/usr/lib/enigma2/python/Plugins/Extensions/MediaPlayer/plugin.py
===================================================================
--- /ipk/source.sh4/players_mediaplayer_1_0/usr/lib/enigma2/python/Plugins/Extensions/MediaPlayer/plugin.py	(revision 8656)
+++ /ipk/source.sh4/players_mediaplayer_1_0/usr/lib/enigma2/python/Plugins/Extensions/MediaPlayer/plugin.py	(revision 8656)
@@ -0,0 +1,1206 @@
+from os import path as os_path, remove as os_remove, listdir as os_listdir
+from time import strftime
+from enigma import iPlayableService, eTimer, eServiceCenter, iServiceInformation, ePicLoad
+from ServiceReference import ServiceReference
+from Screens.Screen import Screen
+from Screens.HelpMenu import HelpableScreen
+from Screens.MessageBox import MessageBox
+from Screens.InputBox import InputBox
+from Screens.ChoiceBox import ChoiceBox
+from Screens.InfoBarGenerics import InfoBarSeek, InfoBarAudioSelection, InfoBarCueSheetSupport, InfoBarNotifications, \
+	InfoBarShowHide, InfoBarServiceErrorPopupSupport, InfoBarSecondInfobar, \
+	InfoBarPVRState, InfoBarSimpleEventView, InfoBarServiceNotifications, InfoBarResolutionSelection, \
+	InfoBarMoviePlayerSummarySupport, InfoBarSubtitleSupport, InfoBarTeletextPlugin
+from Screens.LocationBox import LocationBox
+from Components.ActionMap import NumberActionMap, HelpableActionMap
+from Components.Label import Label
+from Components.Pixmap import Pixmap,MultiPixmap
+from Components.FileList import FileList
+from Components.MediaPlayer import PlayList
+from Components.ServicePosition import ServicePositionGauge
+from Components.ServiceEventTracker import ServiceEventTracker, InfoBarBase
+from Components.Playlist import PlaylistIOInternal, PlaylistIOM3U, PlaylistIOPLS
+from Components.AVSwitch import AVSwitch
+from Components.Harddisk import harddiskmanager
+from Components.config import config, ConfigSubsection, ConfigYesNo
+from Tools.Directories import fileExists, pathExists, resolveFilename, SCOPE_CONFIG, SCOPE_PLAYLIST, SCOPE_SKIN_IMAGE
+from settings import MediaPlayerSettings
+from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier
+import random
+
+config.plugins.mediaplayer = ConfigSubsection()
+config.plugins.mediaplayer.Enabled = ConfigYesNo(default=False)
+
+class MyPlayList(PlayList):
+	def __init__(self):
+		PlayList.__init__(self)
+
+	def PlayListShuffle(self):
+		random.shuffle(self.list)
+		self.l.setList(self.list)
+		self.currPlaying = -1
+		self.oldCurrPlaying = -1
+
+class MediaPixmap(Pixmap):
+	def __init__(self):
+		Pixmap.__init__(self)
+		self.coverArtFileName = ""
+		self.picload = ePicLoad()
+		self.picload.PictureData.get().append(self.paintCoverArtPixmapCB)
+		self.coverFileNames = ["folder.png", "folder.jpg", "cover.png", "cover.jpg"]
+
+	def applySkin(self, desktop, screen):
+		from Tools.LoadPixmap import LoadPixmap
+		noCoverFile = None
+		if self.skinAttributes is not None:
+			for (attrib, value) in self.skinAttributes:
+				if attrib == "pixmap":
+					noCoverFile = value
+					break
+		if noCoverFile is None:
+			noCoverFile = resolveFilename(SCOPE_SKIN_IMAGE, "skin_default/no_coverArt.png")
+		self.noCoverPixmap = LoadPixmap(noCoverFile)
+		return Pixmap.applySkin(self, desktop, screen)
+
+	def onShow(self):
+		Pixmap.onShow(self)
+		sc = AVSwitch().getFramebufferScale()
+		#0=Width 1=Height 2=Aspect 3=use_cache 4=resize_type 5=Background(#AARRGGBB)
+		self.picload.setPara((self.instance.size().width(), self.instance.size().height(), sc[0], sc[1], False, 1, "#00000000"))
+
+	def paintCoverArtPixmapCB(self, picInfo=None):
+		ptr = self.picload.getData()
+		if ptr != None:
+			self.instance.setPixmap(ptr.__deref__())
+
+	def updateCoverArt(self, path):
+		while not path.endswith("/"):
+			path = path[:-1]
+		new_coverArtFileName = None
+		for filename in self.coverFileNames:
+			if fileExists(path + filename):
+				new_coverArtFileName = path + filename
+		if self.coverArtFileName != new_coverArtFileName:
+			self.coverArtFileName = new_coverArtFileName
+			if new_coverArtFileName:
+				self.picload.startDecode(self.coverArtFileName)
+			else:
+				self.showDefaultCover()
+
+	def showDefaultCover(self):
+		self.instance.setPixmap(self.noCoverPixmap)
+
+	def embeddedCoverArt(self):
+		print "[embeddedCoverArt] found"
+		self.coverArtFileName = "/tmp/.id3coverart"
+		self.picload.startDecode(self.coverArtFileName)
+
+class MediaPlayer(Screen, InfoBarBase, InfoBarSeek, InfoBarAudioSelection, InfoBarNotifications, InfoBarSubtitleSupport, HelpableScreen):
+	ALLOW_SUSPEND = True
+
+	def __init__(self, session, args = None):
+		Screen.__init__(self, session)
+		InfoBarAudioSelection.__init__(self)
+		InfoBarNotifications.__init__(self)
+		InfoBarBase.__init__(self)
+		InfoBarSubtitleSupport.__init__(self)
+		HelpableScreen.__init__(self)
+		self.summary = None
+		self.oldService = self.session.nav.getCurrentlyPlayingServiceReference()
+		self.session.nav.stopService()
+		config.plugins.mediaplayer.Enabled = ConfigYesNo(default=True)
+
+		self.playlistparsers = {}
+		self.addPlaylistParser(PlaylistIOM3U, "m3u")
+		self.addPlaylistParser(PlaylistIOPLS, "pls")
+		self.addPlaylistParser(PlaylistIOInternal, "e2pls")
+
+		# 'None' is magic to start at the list of mountpoints
+		defaultDir = config.mediaplayer.defaultDir.getValue()
+		self.filelist = FileList(defaultDir, matchingPattern = "(?i)^.*\.(mp2|mp3|ogg|ts|wav|wave|m3u|pls|e2pls|mpg|vob|m2ts|avi|divx|mkv|mp4|m4a|dat|rec|flv|mts|mov)", useServiceRef = True, additionalExtensions = "4098:m3u 4098:e2pls 4098:pls")
+		self["filelist"] = self.filelist
+
+		self.playlist = MyPlayList()
+		self.is_closing = False
+		self.MoviePlayerOpen = False
+		self.delname = ""
+		self["playlist"] = self.playlist
+
+		self["PositionGauge"] = ServicePositionGauge(self.session.nav)
+
+		self["currenttext"] = Label("")
+
+		self["artisttext"] = Label(_("Artist")+':')
+		self["artist"] = Label("")
+		self["titletext"] = Label(_("Title")+':')
+		self["title"] = Label("")
+		self["albumtext"] = Label(_("Album")+':')
+		self["album"] = Label("")
+		self["yeartext"] = Label(_("Year")+':')
+		self["year"] = Label("")
+		self["genretext"] = Label(_("Genre")+':')
+		self["genre"] = Label("")
+		self["coverArt"] = MediaPixmap()
+		self["repeat"] = MultiPixmap()
+
+		self.seek_target = None
+		hotplugNotifier.append(self.hotplugCB)
+
+		class MoviePlayerActionMap(NumberActionMap):
+			def __init__(self, player, contexts = [ ], actions = { }, prio=0):
+				NumberActionMap.__init__(self, contexts, actions, prio)
+				self.player = player
+
+			def action(self, contexts, action):
+				self.player.show()
+				return NumberActionMap.action(self, contexts, action)
+
+
+		self["OkCancelActions"] = HelpableActionMap(self, "OkCancelActions", 
+			{
+				"ok": (self.ok, _("add file to playlist")),
+				"cancel": (self.exit, _("exit mediaplayer")),
+			}, -2)
+
+		self["MediaPlayerActions"] = HelpableActionMap(self, "MediaPlayerActions", 
+			{
+				"play": (self.xplayEntry, _("play entry")),
+				"pause": (self.pauseEntry, _("pause")),
+				"stop": (self.stopEntry, _("stop entry")),
+				"previous": (self.previousEntry, _("play from previous playlist entry")),
+				"next": (self.nextEntry, _("play from next playlist entry")),
+				"menu": (self.showMenu, _("menu")),
+				"skipListbegin": (self.skip_listbegin, _("jump to listbegin")),
+				"skipListend": (self.skip_listend, _("jump to listend")),
+				"prevBouquet": (self.switchToPlayList, _("switch to playlist")),
+				"nextBouquet": (self.switchToFileList, _("switch to filelist")),
+				"delete": (self.deletePlaylistEntry, _("delete playlist entry")),
+				"shift_stop": (self.clear_playlist, _("clear playlist")),
+				"shift_record": (self.playlist.PlayListShuffle, _("shuffle playlist")),
+				"subtitles": (self.subtitleSelection, _("Subtitle selection")),
+			}, -2)
+
+		self["InfobarEPGActions"] = HelpableActionMap(self, "InfobarEPGActions", 
+			{
+				"showEventInfo": (self.showEventInformation, _("show event details")),
+			})
+
+		self["actions"] = MoviePlayerActionMap(self, ["DirectionActions"], 
+		{
+			"right": self.rightDown,
+			"rightRepeated": self.doNothing,
+			"rightUp": self.rightUp,
+			"left": self.leftDown,
+			"leftRepeated": self.doNothing,
+			"leftUp": self.leftUp,
+
+			"up": self.up,
+			"upRepeated": self.up,
+			"upUp": self.doNothing,
+			"down": self.down,
+			"downRepeated": self.down,
+			"downUp": self.doNothing,
+		}, -2)
+
+		InfoBarSeek.__init__(self, actionmap = "MediaPlayerSeekActions")
+
+		self.onClose.append(self.delMPTimer)
+		self.onClose.append(self.__onClose)
+
+		self.righttimer = False
+		self.rightKeyTimer = eTimer()
+		self.rightKeyTimer.callback.append(self.rightTimerFire)
+
+		self.lefttimer = False
+		self.leftKeyTimer = eTimer()
+		self.leftKeyTimer.callback.append(self.leftTimerFire)
+
+		self.currList = "filelist"
+		self.isAudioCD = False
+		self.AudioCD_albuminfo = {}
+		self.savePlaylistOnExit = False
+		self.cdAudioTrackFiles = []
+		self.applySettings()
+		self.bookmarks = config.movielist.videodirs
+
+		self.playlistIOInternal = PlaylistIOInternal()
+		list = self.playlistIOInternal.open(resolveFilename(SCOPE_CONFIG, "playlist.e2pls"))
+		if list:
+			for x in list:
+				self.playlist.addFile(x.ref)
+			self.playlist.updateList()
+
+		self.__event_tracker = ServiceEventTracker(screen=self, eventmap=
+			{
+				iPlayableService.evUpdatedInfo: self.__evUpdatedInfo,
+				iPlayableService.evUser+10: self.__evAudioDecodeError,
+				iPlayableService.evUser+11: self.__evVideoDecodeError,
+				iPlayableService.evUser+12: self.__evPluginError,
+				iPlayableService.evUser+13: self["coverArt"].embeddedCoverArt
+			})
+
+	def doNothing(self):
+		pass
+
+	def createSummary(self):
+		return MediaPlayerLCDScreen
+
+	def exit(self):
+		if self.savePlaylistOnExit and not config.mediaplayer.savePlaylistOnExit.getValue():
+			self.savePlaylistOnExit = False
+		if config.mediaplayer.askOnExit.getValue():
+			if not self.savePlaylistOnExit:
+				self.session.openWithCallback(self.exitCB, MessageBox, _("Do you really want to exit?"), timeout=5)
+			else:
+				list = []
+				list.append((_("No"), "no"))
+				list.append((_("Yes"), "yes"))
+				self.session.openWithCallback(self.exitCBsave, ChoiceBox, title=_("save playlist before exit?"), list = list)
+		else:
+			self.exitCB(True)
+
+	def exitCB(self, answer):
+		if answer == True:
+			self.playlistIOInternal.clear()
+			if self.savePlaylistOnExit:
+				print "save playlist"
+				for x in self.playlist.list:
+					self.playlistIOInternal.addService(ServiceReference(x[0]))
+				self.playlistIOInternal.save(resolveFilename(SCOPE_CONFIG, "playlist.e2pls"))
+			if config.mediaplayer.saveDirOnExit.getValue():
+				config.mediaplayer.defaultDir.setValue(self.filelist.getCurrentDirectory())
+				config.mediaplayer.defaultDir.save()
+			hotplugNotifier.remove(self.hotplugCB)
+			del self["coverArt"].picload
+			config.plugins.mediaplayer.Enabled = ConfigYesNo(default=True)
+			self.close()
+
+	def exitCBsave(self, answer):
+		if answer is not None:
+			if answer[1] == "no":
+				self.savePlaylistOnExit = False
+			self.exitCB(True)
+
+	def checkSkipShowHideLock(self):
+		self.updatedSeekState()
+
+	def doEofInternal(self, playing):
+		print "--- eofint mediaplayer---"
+		if playing:
+			if not self.MoviePlayerOpen:
+				self.nextEntry()
+		else:
+			self.show()
+
+	def __onClose(self):
+		self.session.nav.playService(self.oldService)
+
+	def __evUpdatedInfo(self):
+		currPlay = self.session.nav.getCurrentService()
+		currenttitle = currPlay.info().getInfo(iServiceInformation.sCurrentTitle)
+		totaltitles = currPlay.info().getInfo(iServiceInformation.sTotalTitles)
+		sTagTitle = currPlay.info().getInfoString(iServiceInformation.sTagTitle)
+		print "[__evUpdatedInfo] title %d of %d (%s)" % (currenttitle, totaltitles, sTagTitle)
+		self.readTitleInformation()
+
+	def __evAudioDecodeError(self):
+		currPlay = self.session.nav.getCurrentService()
+		sAudioType = currPlay.info().getInfoString(iServiceInformation.sUser+10)
+		print "[__evAudioDecodeError] audio-codec %s can't be decoded by hardware" % (sAudioType)
+		self.session.open(MessageBox, _("This Dreambox can't decode %s streams!") % sAudioType, type = MessageBox.TYPE_INFO,timeout = 20 )
+
+	def __evVideoDecodeError(self):
+		currPlay = self.session.nav.getCurrentService()
+		sVideoType = currPlay.info().getInfoString(iServiceInformation.sVideoType)
+		print "[__evVideoDecodeError] video-codec %s can't be decoded by hardware" % (sVideoType)
+		self.session.open(MessageBox, _("This Dreambox can't decode %s streams!") % sVideoType, type = MessageBox.TYPE_INFO,timeout = 20 )
+
+	def __evPluginError(self):
+		currPlay = self.session.nav.getCurrentService()
+		message = currPlay.info().getInfoString(iServiceInformation.sUser+12)
+		print "[__evPluginError]" , message
+		self.session.open(MessageBox, message, type = MessageBox.TYPE_INFO,timeout = 20 )
+
+	def delMPTimer(self):
+		del self.rightKeyTimer
+		del self.leftKeyTimer
+
+	def readTitleInformation(self):
+		currPlay = self.session.nav.getCurrentService()
+		if currPlay is not None:
+			sTagTitle = currPlay.info().getInfoString(iServiceInformation.sTagTitle)
+			sTagAlbum = currPlay.info().getInfoString(iServiceInformation.sTagAlbum)
+			sTagGenre = currPlay.info().getInfoString(iServiceInformation.sTagGenre)
+			sTagArtist = currPlay.info().getInfoString(iServiceInformation.sTagArtist)
+			sYear = currPlay.info().getInfoString(iServiceInformation.sTimeCreate)
+
+			if sTagTitle == "":
+				if not self.isAudioCD:
+					sTagTitle = currPlay.info().getName().split('/')[-1]
+				else:
+					sTagTitle = self.playlist.getServiceRefList()[self.playlist.getCurrentIndex()].getName()
+
+			if self.AudioCD_albuminfo:
+				if sTagAlbum == "" and "title" in self.AudioCD_albuminfo:
+					sTagAlbum = self.AudioCD_albuminfo["title"]
+				if sTagGenre == "" and "genre" in self.AudioCD_albuminfo:
+					sTagGenre = self.AudioCD_albuminfo["genre"]
+				if sTagArtist == "" and "artist" in self.AudioCD_albuminfo:
+					sTagArtist = self.AudioCD_albuminfo["artist"]
+				if "year" in self.AudioCD_albuminfo:
+					sYear = self.AudioCD_albuminfo["year"]
+
+			self.updateMusicInformation( sTagArtist, sTagTitle, sTagAlbum, sYear, sTagGenre, clear = True )
+		else:
+			self.updateMusicInformation()
+
+	def updateMusicInformation(self, artist = "", title = "", album = "", year = "", genre = "", clear = False):
+		self.updateSingleMusicInformation("artist", artist, clear)
+		self.updateSingleMusicInformation("title", title, clear)
+		self.updateSingleMusicInformation("album", album, clear)
+		self.updateSingleMusicInformation("year", year, clear)
+		self.updateSingleMusicInformation("genre", genre, clear)
+
+	def updateSingleMusicInformation(self, name, info, clear):
+		if info != "" or clear:
+			if self[name].getText() != info:
+				self[name].setText(info)
+
+	def leftDown(self):
+		self.lefttimer = True
+		self.leftKeyTimer.start(10)
+
+	def rightDown(self):
+		self.righttimer = True
+		self.rightKeyTimer.start(10)
+
+	def leftUp(self):
+		if self.lefttimer:
+			self.leftKeyTimer.stop()
+			self.lefttimer = False
+			self[self.currList].pageUp()
+			self.updateCurrentInfo()
+
+	def rightUp(self):
+		if self.righttimer:
+			self.rightKeyTimer.stop()
+			self.righttimer = False
+			self[self.currList].pageDown()
+			self.updateCurrentInfo()
+
+	def leftTimerFire(self):
+		self.leftKeyTimer.stop()
+		self.lefttimer = False
+		self.switchToFileList()
+
+	def rightTimerFire(self):
+		self.rightKeyTimer.stop()
+		self.righttimer = False
+		self.switchToPlayList()
+
+	def switchToFileList(self):
+		self.currList = "filelist"
+		self.filelist.selectionEnabled(1)
+		self.playlist.selectionEnabled(0)
+		self.updateCurrentInfo()
+
+	def switchToPlayList(self):
+		if len(self.playlist) != 0:
+			self.currList = "playlist"
+			self.filelist.selectionEnabled(0)
+			self.playlist.selectionEnabled(1)
+			self.updateCurrentInfo()
+
+	def up(self):
+		self[self.currList].up()
+		self.updateCurrentInfo()
+
+	def down(self):
+		self[self.currList].down()
+		self.updateCurrentInfo()
+
+	def showAfterSeek(self):
+		self.show()
+
+	def showAfterCuesheetOperation(self):
+		self.show()
+
+	def hideAfterResume(self):
+		self.hide()
+
+	def getIdentifier(self, ref):
+		if self.isAudioCD:
+			return ref.getName()
+		else:
+			text = ref.getPath()
+			return text.split('/')[-1]
+
+	# FIXME: maybe this code can be optimized 
+	def updateCurrentInfo(self):
+		text = ""
+		if self.currList == "filelist":
+			idx = self.filelist.getSelectionIndex()
+			r = self.filelist.list[idx]
+			text = r[1][7]
+			if r[0][1] == True:
+				if len(text) < 2:
+					text += " "
+				if text[:2] != "..":
+					text = "/" + text
+			self.summaries.setText(text,1)
+
+			idx += 1
+			if idx < len(self.filelist.list):
+				r = self.filelist.list[idx]
+				text = r[1][7]
+				if r[0][1] == True:
+					text = "/" + text
+				self.summaries.setText(text,3)
+			else:
+				self.summaries.setText(" ",3)
+
+			idx += 1
+			if idx < len(self.filelist.list):
+				r = self.filelist.list[idx]
+				text = r[1][7]
+				if r[0][1] == True:
+					text = "/" + text
+				self.summaries.setText(text,4)
+			else:
+				self.summaries.setText(" ",4)
+
+			text = ""
+			if not self.filelist.canDescent():
+				r = self.filelist.getServiceRef()
+				if r is None:
+					return
+				text = r.getPath()
+				self["currenttext"].setText(os_path.basename(text))
+
+		if self.currList == "playlist":
+			t = self.playlist.getSelection()
+			if t is None:
+				return
+			#display current selected entry on LCD
+			text = self.getIdentifier(t)
+			self.summaries.setText(text,1)
+			self["currenttext"].setText(text)
+			idx = self.playlist.getSelectionIndex()
+			idx += 1
+			if idx < len(self.playlist):
+				currref = self.playlist.getServiceRefList()[idx]
+				text = self.getIdentifier(currref)
+				self.summaries.setText(text,3)
+			else:
+				self.summaries.setText(" ",3)
+
+			idx += 1
+			if idx < len(self.playlist):
+				currref = self.playlist.getServiceRefList()[idx]
+				text = self.getIdentifier(currref)
+				self.summaries.setText(text,4)
+			else:
+				self.summaries.setText(" ",4)
+
+	def ok(self):
+		if self.currList == "filelist":
+			if self.filelist.canDescent():
+				self.filelist.descent()
+				self.updateCurrentInfo()
+			else:
+				self.copyFile()
+
+		if self.currList == "playlist":
+			selection = self["playlist"].getSelection()
+			self.changeEntry(self.playlist.getSelectionIndex())
+
+	def showMenu(self):
+		menu = []
+		if len(self.cdAudioTrackFiles):
+			menu.insert(0,(_("Play Audio-CD..."), "audiocd"))
+		if self.currList == "filelist":
+			#menu.append((_("add selection after current playing"), "addAfterCurrent"))
+			if self.filelist.canDescent():
+				menu.append((_("add directory to playlist"), "copydir"))
+			else:
+				menu.append((_("add files to playlist"), "copyfiles"))
+			menu.append((_("switch to playlist"), "playlist"))
+		else:
+			menu.append((_("switch to filelist"), "filelist"))
+			menu.append((_("clear playlist"), "clear"))
+			menu.append((_("Delete entry"), "deleteentry"))
+			if config.usage.setup_level.index >= 1: # intermediate+
+				menu.append((_("shuffle playlist"), "shuffle"))
+		if pathExists("/usr/lib/enigma2/python/Plugins/Extensions/PicturePlayer/"):
+			menu.append((_("PicturePlayer"), "PicturePlayer"));
+		if config.usage.setup_level.index >= 1: # intermediate+
+			menu.append((_("delete file"), "deletefile"))
+		menu.append((_("hide player"), "hide"));
+		menu.append((_("load playlist"), "loadplaylist"));
+		if config.usage.setup_level.index >= 1: # intermediate+
+			menu.append((_("save playlist"), "saveplaylist"));
+			menu.append((_("delete saved playlist"), "deleteplaylist"));
+			menu.append((_("Edit settings"), "settings"))
+			menu.append((_("add/remove bookmarks (locationbox)"), "locationbox"))
+		if self.currList == "filelist":
+			menu.append((_("--------------------- bookmarks --------------------"), "line"))
+			for x in self.bookmarks.value:
+				menu.append((x, x))
+		self.session.openWithCallback(self.menuCallback, ChoiceBox, title="", list=menu)
+
+	def menuCallback(self, choice):
+		if choice is None:
+			return
+
+		if choice[1] == "copydir":
+			self.savePlaylistOnExit = True
+			self.copyDirectory(self.filelist.getSelection()[0])
+		elif choice[1] == "copyfiles":
+			self.stopEntry()
+			self.playlist.clear()
+			self.savePlaylistOnExit = True
+			self.isAudioCD = False
+			self.copyDirectory(os_path.dirname(self.filelist.getSelection()[0].getPath()) + "/", recursive = False)
+			self.playServiceRefEntry(self.filelist.getServiceRef())
+		elif choice[1] == "addAfterCurrent":
+			self.copyFileAfterCurrentPlaying()
+		elif choice[1] == "playlist":
+			self.switchToPlayList()
+		elif choice[1] == "filelist":
+			self.switchToFileList()
+		elif choice[1] == "deleteentry":
+			if self.playlist.getSelectionIndex() == self.playlist.getCurrentIndex():
+				self.stopEntry()
+			self.deleteEntry()
+		elif choice[1] == "clear":
+			self.clear_playlist()
+		elif choice[1] == "hide":
+			self.hide()
+		elif choice[1] == "saveplaylist":
+			self.save_playlist()
+		elif choice[1] == "loadplaylist":
+			self.load_playlist()
+		elif choice[1] == "deleteplaylist":
+			self.delete_saved_playlist()
+		elif choice[1] == "shuffle":
+			self.playlist.PlayListShuffle()
+		elif choice[1] == "PicturePlayer":
+			from Plugins.Extensions.PicturePlayer.plugin import picshow
+			self.session.open(picshow)
+		elif choice[1] == "deletefile":
+			self.deleteFile()
+		elif choice[1] == "settings":
+			self.session.openWithCallback(self.applySettings, MediaPlayerSettings, self)
+		elif choice[1] == "audiocd":
+			self.playAudioCD()
+		elif choice[1] == "locationbox":
+			self.doPathSelect()
+		elif choice[1] == "line":
+			print "--- bookmark ---"
+		else:
+			print "bookmark: ", choice[1]
+			self.filelist.changeDir(choice[1])
+
+	def doPathSelect(self):
+		self.session.openWithCallback(self.gotPath, LocationBox, _("Please select the path..."), currDir = self.filelist.getCurrentDirectory(), bookmarks = config.movielist.videodirs)
+
+	def gotPath(self, res):
+		if res is not None:
+			self.filelist.changeDir(res)
+			
+	def playAudioCD(self):
+		from enigma import eServiceReference
+		from Plugins.Extensions.CDInfo.plugin import Query
+
+		if len(self.cdAudioTrackFiles):
+			self.playlist.clear()
+			self.savePlaylistOnExit = False
+			self.isAudioCD = True
+			for file in self.cdAudioTrackFiles:
+				ref = eServiceReference(4097, 0, file)
+				self.playlist.addFile(ref)
+			cdinfo = Query(self)
+			cdinfo.scan()
+			self.changeEntry(0)
+			self.switchToPlayList()
+
+	def applySettings(self):		
+		if config.mediaplayer.repeat.getValue() == True:
+			self["repeat"].setPixmapNum(1)
+		else:
+			self["repeat"].setPixmapNum(0)
+
+	def showEventInformation(self):
+		from Screens.EventView import EventViewSimple
+		from ServiceReference import ServiceReference
+		evt = self[self.currList].getCurrentEvent()
+		if evt:
+			self.session.open(EventViewSimple, evt, ServiceReference(self.getCurrent()))
+
+	# also works on filelist (?)
+	def getCurrent(self):
+		return self["playlist"].getCurrent()
+
+	def deletePlaylistEntry(self):
+		if self.currList == "playlist":
+			if self.playlist.getSelectionIndex() == self.playlist.getCurrentIndex():
+				self.stopEntry()
+			self.deleteEntry()
+
+	def skip_listbegin(self):
+		if self.currList == "filelist":
+			self.filelist.moveToIndex(0)
+		else:
+			self.playlist.moveToIndex(0)
+		self.updateCurrentInfo()
+
+	def skip_listend(self):
+		if self.currList == "filelist":
+			idx = len(self.filelist.list)
+			self.filelist.moveToIndex(idx - 1)
+		else:
+			self.playlist.moveToIndex(len(self.playlist)-1)
+		self.updateCurrentInfo()
+
+	def save_playlist(self):
+		self.session.openWithCallback(self.save_playlist2,InputBox, title=_("Please enter filename (empty = use current date)"),windowTitle = _("Save Playlist"))
+
+	def save_playlist2(self, name):
+		if name is not None:
+			name = name.strip()
+			if name == "":
+				name = strftime("%y%m%d_%H%M%S")
+			name += ".e2pls"
+			self.playlistIOInternal.clear()
+			for x in self.playlist.list:
+				self.playlistIOInternal.addService(ServiceReference(x[0]))
+			self.playlistIOInternal.save(resolveFilename(SCOPE_PLAYLIST) + name)
+
+	def load_playlist(self):
+		listpath = []
+		playlistdir = resolveFilename(SCOPE_PLAYLIST)
+		try:
+			for i in os_listdir(playlistdir):
+				listpath.append((i,playlistdir + i))
+		except IOError,e:
+			print "Error while scanning subdirs ",e
+		self.session.openWithCallback(self.PlaylistSelected, ChoiceBox, title=_("Please select a playlist..."), list = listpath)
+
+	def PlaylistSelected(self,path):
+		if path is not None:
+			self.clear_playlist()
+			extension = path[0].rsplit('.',1)[-1]
+			if self.playlistparsers.has_key(extension):
+				playlist = self.playlistparsers[extension]()
+				list = playlist.open(path[1])
+				for x in list:
+					self.playlist.addFile(x.ref)
+			self.playlist.updateList()
+
+	def delete_saved_playlist(self):
+		listpath = []
+		playlistdir = resolveFilename(SCOPE_PLAYLIST)
+		try:
+			for i in os_listdir(playlistdir):
+				listpath.append((i,playlistdir + i))
+		except IOError,e:
+			print "Error while scanning subdirs ",e
+		self.session.openWithCallback(self.DeletePlaylistSelected, ChoiceBox, title=_("Please select a playlist to delete..."), list = listpath)
+
+	def DeletePlaylistSelected(self,path):
+		if path is not None:
+			self.delname = path[1]
+			self.session.openWithCallback(self.deleteConfirmed, MessageBox, _("Do you really want to delete %s?") % (path[1]))
+
+	def deleteConfirmed(self, confirmed):
+		if confirmed:
+			try:
+				os_remove(self.delname)
+			except OSError,e:
+				self.session.open(MessageBox, _("Delete failed!, %s") %e, MessageBox.TYPE_ERROR)
+
+	def clear_playlist(self):
+		self.isAudioCD = False
+		self.savePlaylistOnExit = True
+		self.stopEntry()
+		self.playlist.clear()
+		self.switchToFileList()
+
+	def copyDirectory(self, directory, recursive = True):
+		print "copyDirectory", directory
+		if directory == '/':
+			print "refusing to operate on /"
+			return
+		filelist = FileList(directory, useServiceRef = True, showMountpoints = False, isTop = True)
+		#filelist = FileList(directory, matchingPattern = "(?i)^.*\.(mp2|mp3|ts|wav|wave|m3u|pls|e2pls|mpg|vob|avi|mkv|mp4|m4a|dat|m2ts|wma)", useServiceRef = True, showMountpoints = False, isTop = True)
+		
+		for x in filelist.getFileList():
+			if x[0][1] == True: #isDir
+				if recursive:
+					if x[0][0] != directory:
+						self.copyDirectory(x[0][0])
+			else:
+				self.playlist.addFile(x[0][0])
+		self.playlist.updateList()
+
+	def deleteFile(self):
+		if self.currList == "filelist":
+			self.service = self.filelist.getServiceRef()
+		else:
+			self.service = self.playlist.getSelection()
+		if self.service is None:
+			return
+		if self.service.type != 4098 and self.session.nav.getCurrentlyPlayingServiceReference() is not None:
+			if self.service == self.session.nav.getCurrentlyPlayingServiceReference():
+				self.stopEntry()
+
+		serviceHandler = eServiceCenter.getInstance()
+		offline = serviceHandler.offlineOperations(self.service)
+		info = serviceHandler.info(self.service)
+		name = info and info.getName(self.service)
+		result = False
+		if offline is not None:
+			# simulate first
+			if not offline.deleteFromDisk(1):
+				result = True
+		if result == True:
+			self.session.openWithCallback(self.deleteConfirmed_offline, MessageBox, _("Do you really want to delete %s?") % (name))
+		else:
+			self.session.openWithCallback(self.close, MessageBox, _("You cannot delete this!"), MessageBox.TYPE_ERROR)      
+
+	def deleteConfirmed_offline(self, confirmed):
+		if confirmed:
+			serviceHandler = eServiceCenter.getInstance()
+			offline = serviceHandler.offlineOperations(self.service)
+			result = False
+			if offline is not None:
+				# really delete!
+				if not offline.deleteFromDisk(0):
+					result = True
+			if result == False:
+				self.session.open(MessageBox, _("Delete failed!"), MessageBox.TYPE_ERROR)
+			else:
+				self.removeListEntry()
+
+	def removeListEntry(self):
+		self.savePlaylistOnExit = True
+		currdir = self.filelist.getCurrentDirectory()
+		self.filelist.changeDir(currdir)
+		deleteend = False
+		while not deleteend:
+			index = 0
+			deleteend = True
+			if len(self.playlist) > 0:
+				for x in self.playlist.list:
+					if self.service == x[0]:
+						self.playlist.deleteFile(index)
+						deleteend = False
+						break
+					index += 1
+		self.playlist.updateList()
+		if self.currList == "playlist":
+			if len(self.playlist) == 0:
+				self.switchToFileList()
+
+	def copyFileAfterCurrentPlaying(self):
+		self.savePlaylistOnExit = True
+		
+		item = self.filelist.getServiceRef()
+		playpos = self.playlist.getCurrentIndex()
+		self.playlist.insertFile(playpos+1, item)
+		self.playlist.updateList()
+
+	def copyFile(self):
+		self.savePlaylistOnExit = True
+		if self.filelist.getServiceRef().type == 4098: # playlist
+			ServiceRef = self.filelist.getServiceRef()
+			extension = ServiceRef.getPath()[ServiceRef.getPath().rfind('.') + 1:]
+			if self.playlistparsers.has_key(extension):
+				playlist = self.playlistparsers[extension]()
+				list = playlist.open(ServiceRef.getPath())
+				for x in list:
+					self.playlist.addFile(x.ref)
+			self.playlist.updateList()
+		else:
+			self.playlist.addFile(self.filelist.getServiceRef())
+			self.playlist.updateList()
+			if len(self.playlist) == 1:
+				self.changeEntry(0)
+
+	def addPlaylistParser(self, parser, extension):
+		self.playlistparsers[extension] = parser
+
+	def nextEntry(self):
+		next = self.playlist.getCurrentIndex() + 1
+		if next < len(self.playlist):
+			self.changeEntry(next)
+		elif ( len(self.playlist) > 0 ) and ( config.mediaplayer.repeat.getValue() == True ):
+			self.stopEntry()
+			self.changeEntry(0)
+		else:
+			self.stopEntry()
+
+	def previousEntry(self):
+		next = self.playlist.getCurrentIndex() - 1
+		if next >= 0:
+			self.changeEntry(next)
+
+	def deleteEntry(self):
+		self.savePlaylistOnExit = True
+		self.playlist.deleteFile(self.playlist.getSelectionIndex())
+		self.playlist.updateList()
+		if len(self.playlist) == 0:
+			self.switchToFileList()
+
+	def changeEntry(self, index):
+		self.playlist.setCurrentPlaying(index)
+		self.playEntry()
+
+	def playServiceRefEntry(self, serviceref):
+		serviceRefList = self.playlist.getServiceRefList()
+		for count in range(len(serviceRefList)):
+			if serviceRefList[count] == serviceref:
+				self.changeEntry(count)
+				break
+			
+	def xplayEntry(self):
+		if self.currList == "playlist":
+			self.playEntry()
+		else:
+			self.stopEntry()
+			self.playlist.clear()
+			self.isAudioCD = False
+			self.savePlaylistOnExit = True
+			sel = self.filelist.getSelection()
+			if sel:
+				if sel[1]: # can descent
+					# add directory to playlist
+					self.copyDirectory(sel[0])
+				else:
+					if self.filelist.getServiceRef().type == 4098: # playlist
+						self.copyFile()
+					else:
+						# add files to playlist
+						self.copyDirectory(os_path.dirname(sel[0].getPath()) + "/", recursive = False)
+			if len(self.playlist) > 0:
+				self.changeEntry(0)
+	
+	def playEntry(self):
+		if len(self.playlist.getServiceRefList()):
+			audio_extensions = (".mp2", ".mp3", ".wav", ".ogg", "flac", ".m4a")
+			needsInfoUpdate = False
+			currref = self.playlist.getServiceRefList()[self.playlist.getCurrentIndex()]
+			if self.session.nav.getCurrentlyPlayingServiceReference() is None or currref != self.session.nav.getCurrentlyPlayingServiceReference():
+				text = self.getIdentifier(currref)
+				ext = text[-4:].lower()
+				if ext in audio_extensions or self.isAudioCD:
+					self.session.nav.playService(currref)
+				else:
+					self.MoviePlayerOpen = True
+					self.session.openWithCallback(self.leaveMoviePlayer, MoviePlayer, currref)
+				info = eServiceCenter.getInstance().info(currref)
+				description = info and info.getInfoString(currref, iServiceInformation.sDescription) or ""
+				self["title"].setText(description)
+				# display just playing musik on LCD
+				idx = self.playlist.getCurrentIndex()
+				currref = self.playlist.getServiceRefList()[idx]
+				#text = self.getIdentifier(currref)
+				text = ">"+text
+				#ext = text[-4:].lower()
+
+				# FIXME: the information if the service contains video (and we should hide our window) should com from the service instead 
+				if ext in audio_extensions or self.isAudioCD:
+					needsInfoUpdate = True
+				self.summaries.setText(text,1)
+
+				# get the next two entries
+				idx += 1
+				if idx < len(self.playlist):
+					currref = self.playlist.getServiceRefList()[idx]
+					text = self.getIdentifier(currref)
+					self.summaries.setText(text,3)
+				else:
+					self.summaries.setText(" ",3)
+
+				idx += 1
+				if idx < len(self.playlist):
+					currref = self.playlist.getServiceRefList()[idx]
+					text = self.getIdentifier(currref)
+					self.summaries.setText(text,4)
+				else:
+					self.summaries.setText(" ",4)
+			else:
+				idx = self.playlist.getCurrentIndex()
+				currref = self.playlist.getServiceRefList()[idx]
+				text = currref.getPath()
+				ext = text[-4:].lower()
+				if ext in audio_extensions or self.isAudioCD:
+					needsInfoUpdate = True
+
+			self.unPauseService()
+			if needsInfoUpdate == True:
+				path = self.playlist.getServiceRefList()[self.playlist.getCurrentIndex()].getPath()
+				self["coverArt"].updateCoverArt(path)
+			else:
+				self["coverArt"].showDefaultCover()
+			self.readTitleInformation()
+
+	def leaveMoviePlayer(self, answer):
+		print "leaveMoviePlayer: ", answer
+		self.MoviePlayerOpen = False
+		if answer == 1:
+			self.session.nav.playService(None)
+			self.nextEntry()
+		elif answer == -1:
+			self.session.nav.playService(None)
+			self.previousEntry()
+		else:
+			self.stopEntry()
+
+	def updatedSeekState(self):
+		if self.seekstate == self.SEEK_STATE_PAUSE:
+			self.playlist.pauseFile()
+		elif self.seekstate == self.SEEK_STATE_PLAY:
+			self.playlist.playFile()
+		elif self.isStateForward(self.seekstate):
+			self.playlist.forwardFile()
+		elif self.isStateBackward(self.seekstate):
+			self.playlist.rewindFile()
+
+	def pauseEntry(self):
+		self.pauseService()
+		self.show()
+
+	def stopEntry(self):
+		self.playlist.stopFile()
+		self.session.nav.playService(None)
+		self.updateMusicInformation(clear=True)
+		self.show()
+
+	def unPauseService(self):
+		self.setSeekState(self.SEEK_STATE_PLAY)
+		
+	def subtitleSelection(self):
+		from Screens.Subtitles import Subtitles
+		self.session.open(Subtitles)
+
+	def hotplugCB(self, dev, media_state):
+		if dev == harddiskmanager.getCD():
+			if media_state == "1":
+				from Components.Scanner import scanDevice
+				devpath = harddiskmanager.getAutofsMountpoint(harddiskmanager.getCD())
+				self.cdAudioTrackFiles = []
+				res = scanDevice(devpath)
+				list = [ (r.description, r, res[r], self.session) for r in res ]
+				if list:
+					(desc, scanner, files, session) = list[0]
+					for file in files:
+						if file.mimetype == "audio/x-cda":
+							self.cdAudioTrackFiles.append(file.path)
+			else:
+				self.cdAudioTrackFiles = []
+				if self.isAudioCD:
+					self.clear_playlist()
+
+
+class MoviePlayer(InfoBarShowHide, \
+		InfoBarSeek, InfoBarAudioSelection, HelpableScreen, InfoBarNotifications, InfoBarSecondInfobar,
+		InfoBarServiceNotifications, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarSimpleEventView, InfoBarResolutionSelection,
+		InfoBarMoviePlayerSummarySupport, InfoBarSubtitleSupport, Screen, InfoBarTeletextPlugin,
+		InfoBarServiceErrorPopupSupport):
+
+	ENABLE_RESUME_SUPPORT = True
+	ALLOW_SUSPEND = True
+		
+	def __init__(self, session, service):
+		Screen.__init__(self, session)
+		InfoBarSubtitleSupport.__init__(self)
+		InfoBarAudioSelection.__init__(self)
+		InfoBarSecondInfobar.__init__(self)
+		
+		self["actions"] = HelpableActionMap(self, "MoviePlayerActions",
+			{
+				"leavePlayer": (self.leavePlayer, _("leave movie player..."))
+			})
+			
+		self["MediaPlayerActions"] = HelpableActionMap(self, "MediaPlayerActions",
+			{
+				"previous": (self.previousMarkOrEntry, _("play from previous mark or playlist entry")),
+				"next": (self.nextMarkOrEntry, _("play from next mark or playlist entry")),
+				"subtitles": (self.subtitleSelection, _("Subtitle selection")), 
+			}, -2)
+
+		self["ColorActions"] = HelpableActionMap(self, "ColorActions", 
+			{
+				"blue": (self.sleepTimer, _("Sleep Timer")),
+			})
+		
+		for x in HelpableScreen, InfoBarShowHide, \
+				InfoBarSeek, \
+				InfoBarAudioSelection, InfoBarNotifications, InfoBarSimpleEventView, \
+				InfoBarServiceNotifications, InfoBarPVRState, InfoBarCueSheetSupport,\
+				InfoBarMoviePlayerSummarySupport, InfoBarSubtitleSupport, \
+				InfoBarTeletextPlugin, InfoBarServiceErrorPopupSupport:
+			x.__init__(self)
+		
+		self.session.nav.playService(service)
+		self.returning = False
+
+	def sleepTimer(self):
+		from Screens.SleepTimerEdit import SleepTimerEdit
+		self.session.open(SleepTimerEdit)
+
+	def nextMarkOrEntry(self):
+		if not self.jumpPreviousNextMark(lambda x: x):
+			self.is_closing = True
+			self.close(1)
+
+	def previousMarkOrEntry(self):
+		if not self.jumpPreviousNextMark(lambda x: -x-5*90000, start=True):
+			self.is_closing = True
+			self.close(-1)
+	def subtitleSelection(self): 
+		from Screens.Subtitles import Subtitles 
+		self.session.open(Subtitles) 
+			
+	def leavePlayer(self):
+		self.is_closing = True
+
+		if config.usage.on_movie_stop.value == "ask":
+			list = []
+			list.append((_("Yes"), "quit"))
+			list.append((_("No"), "continue"))
+			if config.usage.setup_level.index >= 2: # expert+
+				list.append((_("No, but restart from begin"), "restart"))
+			self.session.openWithCallback(self.leavePlayerConfirmed, ChoiceBox, title=_("Stop playing this movie?"), list = list)
+		else:
+			self.close(0)
+
+	def leavePlayerConfirmed(self, answer):
+		answer = answer and answer[1]
+		if answer == "quit":
+			self.close(0)
+		elif answer == "restart":
+			self.doSeek(0)
+
+	def doEofInternal(self, playing):
+		print "--- eofint movieplayer ---"
+		self.is_closing = True
+		self.close(1)
+
+class MediaPlayerLCDScreen(Screen):
+	skin = """
+	<screen position="0,0" size="132,64" title="LCD Text">
+		<widget name="text1" position="4,0" size="132,35" font="Regular;16"/>
+		<widget name="text3" position="4,36" size="132,14" font="Regular;10"/>
+		<widget name="text4" position="4,49" size="132,14" font="Regular;10"/>
+	</screen>"""
+
+	def __init__(self, session, parent):
+		Screen.__init__(self, session)
+		self["text1"] = Label("Mediaplayer")
+		self["text3"] = Label("")
+		self["text4"] = Label("")
+
+	def setText(self, text, line):
+		if len(text) > 10:
+			if text[-4:] == ".mp3":
+				text = text[:-4]
+		textleer = "    "
+		text = text + textleer*10
+		if line == 1:
+			self["text1"].setText(text)
+		elif line == 3:
+			self["text3"].setText(text)
+		elif line == 4:
+			self["text4"].setText(text)
+
+def main(session, **kwargs):
+	session.open(MediaPlayer)
+
+def menu(menuid, **kwargs):
+	if menuid == "mainmenu":
+		return [(_("Media player"), main, "media_player", 45)]
+	return []
+
+def filescan_open(list, session, **kwargs):
+	from enigma import eServiceReference
+
+	mp = session.open(MediaPlayer)
+	mp.playlist.clear()
+	mp.savePlaylistOnExit = False
+
+	for file in list:
+		if file.mimetype == "video/MP2T":
+			stype = 1
+		else:
+			stype = 4097
+		ref = eServiceReference(stype, 0, file.path)
+		mp.playlist.addFile(ref)
+
+	mp.changeEntry(0)
+	mp.switchToPlayList()
+
+def audioCD_open(list, session, **kwargs):
+	from enigma import eServiceReference
+
+	mp = session.open(MediaPlayer)
+	mp.cdAudioTrackFiles = []
+	for file in list:
+		mp.cdAudioTrackFiles.append(file.path)
+	mp.playAudioCD()
+
+def filescan(**kwargs):
+	from Components.Scanner import Scanner, ScanPath
+	mediatypes = [
+		Scanner(mimetypes = ["video/mpeg", "video/MP2T", "video/x-msvideo"],
+			paths_to_scan =
+				[
+					ScanPath(path = "", with_subdirs = False),
+				],
+			name = "Movie",
+			description = _("View Movies..."),
+			openfnc = filescan_open,
+		),
+		Scanner(mimetypes = ["video/x-vcd"],
+			paths_to_scan =
+				[
+					ScanPath(path = "mpegav", with_subdirs = False),
+					ScanPath(path = "MPEGAV", with_subdirs = False),
+				],
+			name = "Video CD",
+			description = _("View Video CD..."),
+			openfnc = filescan_open,
+		),
+		Scanner(mimetypes = ["audio/mpeg", "audio/x-wav", "application/ogg", "audio/x-flac"],
+			paths_to_scan =
+				[
+					ScanPath(path = "", with_subdirs = False),
+				],
+			name = "Music",
+			description = _("Play Music..."),
+			openfnc = filescan_open,
+		)]
+	try:
+		from Plugins.Extensions.CDInfo.plugin import Query
+		mediatypes.append(
+		Scanner(mimetypes = ["audio/x-cda"],
+			paths_to_scan =
+				[
+					ScanPath(path = "", with_subdirs = False),
+				],
+			name = "Audio-CD",
+			description = _("Play Audio-CD..."),
+			openfnc = audioCD_open,
+		))
+		return mediatypes
+	except ImportError:
+		return mediatypes
+
+from Plugins.Plugin import PluginDescriptor
+def Plugins(**kwargs):
+	return [
+		PluginDescriptor(name = "MediaPlayer", description = "Play back media files", where = PluginDescriptor.WHERE_MENU, fnc = menu),
+		PluginDescriptor(name = "MediaPlayer", description = "Play back media files", where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc = main),
+		PluginDescriptor(name = "MediaPlayer", where = PluginDescriptor.WHERE_FILESCAN, fnc = filescan)
+	]
Index: /ipk/source.sh4/players_mediaplayer_1_0/usr/lib/enigma2/python/Plugins/Extensions/MediaPlayer/settings.py
===================================================================
--- /ipk/source.sh4/players_mediaplayer_1_0/usr/lib/enigma2/python/Plugins/Extensions/MediaPlayer/settings.py	(revision 8656)
+++ /ipk/source.sh4/players_mediaplayer_1_0/usr/lib/enigma2/python/Plugins/Extensions/MediaPlayer/settings.py	(revision 8656)
@@ -0,0 +1,79 @@
+from Screens.Screen import Screen
+from Screens.HelpMenu import HelpableScreen
+from Screens.LocationBox import LocationBox
+from Components.Label import Label
+from Components.FileList import FileList
+from Components.config import config, getConfigListEntry, ConfigSubsection, configfile, ConfigText, ConfigYesNo, ConfigDirectory
+from Components.ConfigList import ConfigListScreen
+from Components.ActionMap import ActionMap
+
+config.mediaplayer = ConfigSubsection()
+config.mediaplayer.repeat = ConfigYesNo(default=False)
+config.mediaplayer.savePlaylistOnExit = ConfigYesNo(default=True)
+config.mediaplayer.askOnExit = ConfigYesNo(default=True)
+config.mediaplayer.saveDirOnExit = ConfigYesNo(default=False)
+config.mediaplayer.defaultDir = ConfigDirectory()
+
+class MediaPlayerSettings(Screen,ConfigListScreen):
+	skin = """
+		<screen name="MediaPlayerSettings" position="center,center" size="450,200" title="Edit settings">
+			<ePixmap pixmap="skin_default/buttons/red.png" position="10,0" size="140,40" alphatest="on" />
+			<ePixmap pixmap="skin_default/buttons/green.png" position="300,0" size="140,40" alphatest="on" />
+			<widget source="key_red" render="Label" position="10,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />
+			<widget source="key_green" render="Label" position="300,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
+			<widget name="config" position="10,44" size="430,146" />
+		</screen>"""
+
+	def __init__(self, session, parent):
+		from Components.Sources.StaticText import StaticText
+		Screen.__init__(self, session)
+		self["key_red"] = StaticText(_("Cancel"))
+		self["key_green"] = StaticText(_("Save"))
+
+		ConfigListScreen.__init__(self, [])
+		self.parent = parent
+		self.initConfigList()
+		config.mediaplayer.saveDirOnExit.addNotifier(self.initConfigList)
+
+		self["setupActions"] = ActionMap(["SetupActions", "ColorActions"],
+		{
+		    "green": self.save,
+		    "red": self.cancel,
+		    "cancel": self.cancel,
+		    "ok": self.ok,
+		}, -2)
+
+	def initConfigList(self, element=None):
+		print "[initConfigList]", element
+		try:
+			self.list = []
+			self.list.append(getConfigListEntry(_("repeat playlist"), config.mediaplayer.repeat))
+			self.list.append(getConfigListEntry(_("save playlist on exit"), config.mediaplayer.savePlaylistOnExit))
+			self.list.append(getConfigListEntry(_("ask on exit"), config.mediaplayer.askOnExit))
+			self.list.append(getConfigListEntry(_("save last directory on exit"), config.mediaplayer.saveDirOnExit))
+			if not config.mediaplayer.saveDirOnExit.getValue():
+				self.list.append(getConfigListEntry(_("start directory"), config.mediaplayer.defaultDir))
+			self["config"].setList(self.list)
+		except KeyError:
+			print "keyError"
+
+	def changedConfigList(self):
+		self.initConfigList()
+
+	def ok(self):
+		if self["config"].getCurrent()[1] == config.mediaplayer.defaultDir:
+			self.session.openWithCallback(self.LocationBoxClosed, LocationBox, _("Please select the path for the Startdirectory"), currDir = self.parent.filelist.getCurrentDirectory(), bookmarks = config.movielist.videodirs)
+
+	def LocationBoxClosed(self, path):
+		print "PathBrowserClosed:", path
+		if path is not None:
+			config.mediaplayer.defaultDir.setValue(path)
+
+	def save(self):
+		for x in self["config"].list:
+			x[1].save()
+		self.close()
+
+	def cancel(self):
+		self.close()
+
Index: /ipk/source.sh4/system_addonmanager_3_04/CONTROL/control
===================================================================
--- /ipk/source.sh4/system_addonmanager_3_04/CONTROL/control	(revision 8656)
+++ /ipk/source.sh4/system_addonmanager_3_04/CONTROL/control	(revision 8656)
@@ -0,0 +1,11 @@
+Package: enigma2-plugin-system-addonmanager
+Version: 3.04
+Architecture: sh4
+OE: Addonmanager for your AAF Duckbox
+Section: extra
+Priority: optional
+Maintainer: AAF
+Homepage: http://www.aaf-digital.info
+Source: http://www.aaf-digital.info
+Description: Addonmanager 3.04
+
Index: /ipk/source.sh4/system_addonmanager_3_04/CONTROL/postinst
===================================================================
--- /ipk/source.sh4/system_addonmanager_3_04/CONTROL/postinst	(revision 8656)
+++ /ipk/source.sh4/system_addonmanager_3_04/CONTROL/postinst	(revision 8656)
@@ -0,0 +1,12 @@
+#!/bin/sh
+TMP=/tmp/.system
+
+echo "successfully installed"
+echo "syncing disk"
+sync
+if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
+	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
+	FREE=`expr $SPACE - 100`
+	echo new freespace size $FREE kb
+fi
+exit 0
Index: /ipk/source.sh4/system_addonmanager_3_04/CONTROL/postrm
===================================================================
--- /ipk/source.sh4/system_addonmanager_3_04/CONTROL/postrm	(revision 8656)
+++ /ipk/source.sh4/system_addonmanager_3_04/CONTROL/postrm	(revision 8656)
@@ -0,0 +1,12 @@
+#!/bin/sh
+TMP=/tmp/.system
+
+echo "successfully removed"
+echo "syncing disk"
+sync
+if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
+	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
+	FREE=`expr $SPACE - 100`
+	echo new freespace size $FREE kb
+fi
+exit 0
Index: /ipk/source.sh4/system_addonmanager_3_04/CONTROL/preinst
===================================================================
--- /ipk/source.sh4/system_addonmanager_3_04/CONTROL/preinst	(revision 8656)
+++ /ipk/source.sh4/system_addonmanager_3_04/CONTROL/preinst	(revision 8656)
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+TMP=/tmp/.system
+echo "syncing disk"
+sync
+
+model=`cat /etc/model`
+echo""
+echo "Checking your Boxtype...."
+echo "Some Plugins will not work correctly on your $model!"
+echo ""
+if [ "$model" = "" ]; then
+	echo "Sorry! This Plugin is not available for your $model because it will not work correctly!!!"
+	echo "Aborting installation..."
+	exit 1
+else
+	echo "Boxtype: $model OK"
+fi
+
+if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
+	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
+	FREE=`expr $SPACE - 50`
+	SIZE=280
+	echo "checking freespace"
+	echo packege size $SIZE kb
+	echo freespace size $FREE kb
+	if  [ "$FREE" -lt "$SIZE" ]; then
+		echo "sorry no freespace left on device"
+		echo "you can find the same IPK for your swapstick in swapsystem"
+		exit 1
+	else
+		echo ok
+	fi
+fi   
+echo "installing Addonmanager......"
+echo "checking OS"
+if  [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then                      
+	echo ---------------------------
+	echo DONT USE this IPK Package!!
+	echo ---
+	echo Only for AAF Image!!
+	echo ---------------------------
+	exit 1
+fi
+exit 0
Index: /ipk/source.sh4/system_addonmanager_3_04/CONTROL/prerm
===================================================================
--- /ipk/source.sh4/system_addonmanager_3_04/CONTROL/prerm	(revision 8656)
+++ /ipk/source.sh4/system_addonmanager_3_04/CONTROL/prerm	(revision 8656)
@@ -0,0 +1,11 @@
+#!/bin/sh
+TMP=/tmp/.system
+echo "syncing disk"
+sync
+if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
+	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
+	FREE=`expr $SPACE - 100`
+	echo freespace size $FREE kb
+fi
+echo "removing Addonmanager"
+exit 0
Index: /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/backup.sh
===================================================================
--- /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/backup.sh	(revision 8656)
+++ /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/backup.sh	(revision 8656)
@@ -0,0 +1,251 @@
+#!/bin/sh
+# ***********************************************************
+#              Backupscript nach Methode niovs
+#              wird vom Addon-Manager aufgerufen
+#
+#           kann beliebig für jede Box weitert werden
+#
+#           angepasst fuer Fortis-Boxen by Bauernbub
+# ***********************************************************
+
+boxtyp="`cat /proc/stb/info/model`"
+
+# check for saved settings
+if [ ! -e /var/etc/restore.cfg ]; then
+  # make a default and say all yes
+  settings=n
+  binarys=n
+  camconfig=n
+  plugins=n
+  network=n
+  samba=n
+  bilder=n
+  sonstige=n
+  addonmanager=y
+  backup=y
+  cp /usr/lib/enigma2/python/Plugins/Extensions/AddonManager/restore.sh /var/etc/
+else
+  . /var/etc/restore.cfg   # read config from Addon-Manager
+fi
+
+if [ "$boxtyp" == "dm8000" ]
+  then
+    BOXDIR="backup_vu"
+    echo -e "***********************************************************"
+    echo -e "**************Sicherung VU Plus oder Dreambox**************"
+    echo -e "***********************************************************\n"
+  else
+    BOXDIR="backup_fortis"
+    echo -e "***********************************************************"
+    echo -e "**************Sicherung Fortis Box gestartet **************"
+    echo -e "***********************************************************\n"
+fi
+
+echo -e "\nLege Ordner und die Sicherungsdatei an"
+
+if [ `mount | grep "on /var/swap" | wc -l` -ge 1 ]; then DIR="/var/swap/$BOXDIR"; fi
+if [ `mount | grep "on /media/hdd" | wc -l` -eq 1 ]; then DIR="/media/hdd/$BOXDIR"; fi
+
+
+
+# make a backup copy
+if [ -e "$DIR" ]; then
+  echo -e "\nLege eine Sicherungsdatei des alten Backup an"
+  oldtime=`date +%d.%m_%H.%M`
+  echo "---> $DIR"_"$oldtime"
+  mv  "$DIR" "$DIR"_"$oldtime"
+fi
+
+mkdir -p $DIR/
+rm -f $DIR/backup.log ; touch $DIR/backup.log
+
+if [ "$boxtyp" == "dm8000" ]
+ then
+ if [ "$settings" == "y" ]
+	then
+		tar -cvf $DIR/settings.tar /etc/enigma2/* /etc/tuxbox/* >> $DIR/backup.log
+		echo -e "******** Settings gesichert ********\n"
+	else
+	echo "******** Settings NICHT gesichert ********\n"
+ fi
+
+ if [ "$camconfig" == "y" ]
+  then
+   tar -cvf $DIR/camconfig.tar /var/keys/* /usr/scce/* /etc/CC* /usr/scam/* >> $DIR/backup.log
+   echo -e "******** Camconfig gesichert ********\n"
+  else
+   echo "******** Camconfig NICHT gesichert ********\n"
+ fi
+
+ if [ "$plugins" == "y" ]
+  then
+		ipkg list_installed |grep enigma2-plugin > /tmp/ipkg.list
+		cut -f 1 -d " " /tmp/ipkg.list > $DIR/ipkg.list
+		echo -e "******** Plugins gesichert ********\n"
+  else
+    echo -e "******** Plugins NICHT gesichert ********\n"
+ fi
+
+ if [ "$network" == "y" ]
+  then
+ 		tar -cvf $DIR/network.tar /etc/hostname /etc/resolv.conf /etc/wpa_supplicant.conf /etc/network/interfaces >> $DIR/backup.log
+		echo -e "******** Netzwerkkonfiguration gesichert ********\n"
+  else
+    echo -e "******** Netzwerkkonfiguration NICHT gesichert ********\n"
+ fi
+
+ if [ "$samba" == "y" ]
+  then
+    tar -cvf $DIR/samba.tar /etc/samba/smb.conf >> $DIR/backup.log
+		echo -e "******** Sambakonfiguration gesichert ********\n"
+  else
+    echo -e "******** Sambakonfiguration NICHT gesichert ********\n"
+ fi
+
+ if [ "$bilder" == "y" ]
+  then
+    tar -cvf $DIR/bilder.tar /usr/share/enigma2/*.mvi /usr/share/*.mvi >> $DIR/backup.log
+		echo -e "******** Bootbilder und Radiobild gesichert ********\n"
+  else
+    echo -e "******** Bootbilder und Radiobild NICHT gesichert ********\n"
+ fi
+
+ if [ "$sonstige" == "y" ]
+  then
+		if [ -e /etc/inadyn.conf ]
+    	then
+       tar -cvf $DIR/sonstige.tar /etc/fstab /etc/localtime /etc/inadyn.conf /etc/videomode /etc/ntpserver /etc/passwd>> $DIR/backup.log
+		   echo -e "******** sonstige Konfigurationsdateien gesichert inkl. DynDNS-Config ********\n"
+	 	  else
+       tar -cvf $DIR/sonstige.tar /etc/fstab /etc/localtime /etc/videomode /etc/ntpserver /etc/passwd>> $DIR/backup.
+       echo -e "******** sonstige Konfigurationsdateien gesichert ********\n"
+    fi
+     else
+       echo -e "******** sonstige Konfigurationsdateien NICHT gesichert ********\n"
+ fi
+
+
+else  # Boxtyp is not dm8000 (vubox)
+ if [ "$settings" == "y" ]
+	then
+		tar -cvf $DIR/settings.tar /usr/local/share/enigma2/* /var/etc/enigma2/* /etc/tuxbox/* /var/etc/blueKey >> $DIR/backup.log
+		echo -e "******** Settings gesichert ********\n"
+	else
+	echo "******** Settings NICHT gesichert ********\n"
+ fi
+
+ if [ "$camconfig" == "y" ]
+  then
+   tar -cvf $DIR/camconfig.tar /var/emu/* /var/keys/* /var/etc/*emu /var/etc/active_cam >> $DIR/backup.log
+   echo -e "******** Camconfig gesichert ********\n"
+  else
+   echo "******** Camconfig NICHT gesichert ********\n"
+ fi
+
+ if [ "$binarys" == "y" ]
+  then
+   tar -cvf $DIR/bin.tar /var/bin/* >> $DIR/backup.log
+   echo -e "******** Binarys gesichert ********\n"
+  else
+   echo "******** Binarys NICHT gesichert ********\n"
+ fi
+
+ if [ "$plugins" == "y" ]
+  then
+		ipkg list_installed |grep enigma2-plugin > /tmp/ipkg.list
+		cut -f 1 -d " " /tmp/ipkg.list > $DIR/ipkg.list
+
+    # check ob Referenzliste existiert
+    if [ ! -e /usr/lib/enigma2/python/Plugins/Extensions/Aafpanel/dirlist ]; then
+        echo "Aafpanel
+        BoardViewer
+        DVDPlayer
+        GraphMultiEPG
+        IMDb
+        MediaCenter
+        OSDAdjustment
+        PlugLoad
+        SimpleBitrate
+        SocketMMI
+        SplitScreen
+        VFD_Brightness
+        VirtualZap
+        Volume_adjust
+        WebInterface" >/usr/lib/enigma2/python/Plugins/Extensions/Aafpanel/dirlist
+ 		    #wget -O /usr/lib/enigma2/python/Plugins/Extensions/Aafpanel/dirlist http://kati910.aaf-board.info/dbase/E2/online/dirlist
+ 		    #chmod 755 /usr/lib/enigma2/python/Plugins/Extensions/Aafpanel/dirlist
+    fi
+
+    # welche Plugins wurden zusaetzlich installiert?
+    cd /usr/lib/enigma2/python/Plugins/Extensions
+
+    # welche sind jetzt installiert?
+    ls -A1 >/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/curlist
+    cd /usr/lib/enigma2/python/Plugins/Extensions/AddonManager
+
+    # vergleiche Standartplugins mit installierten
+    diff dirlist curlist >difflist
+    grep "^+[^+_]" difflist | sed ' s/+//g' >difflist2
+
+    list="/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/difflist2"
+    dir2="/usr/lib/enigma2/python/Plugins/Extensions/"
+
+    string="$DIR/plugins.tar"
+    for i in $(cat $list); do
+      string=$string" "$dir2$i
+    done
+    tar -cvf $string >> $DIR/backup.log
+ 		tar -cvf $string /var/etc/uninst/*  >> $DIR/backup.log
+
+    rm /usr/lib/enigma2/python/Plugins/Extensions/AddonManager/difflist*
+    rm /usr/lib/enigma2/python/Plugins/Extensions/AddonManager/curlist
+		echo -e "******** Plugins gesichert ********\n"
+  else
+    echo -e "******** Plugins NICHT gesichert ********\n"
+ fi
+
+ if [ "$network" == "y" ]
+  then
+ 		tar -cvf $DIR/network.tar /var/etc/automount/* /var/etc/hostname /var/etc/hosts /var/etc/resolv.conf /var/etc/default_gw /var/etc/wpa_supplicant.conf /var/etc/network/interfaces >> $DIR/backup.log
+		echo -e "******** Netzwerkkonfiguration gesichert ********\n"
+  else
+    echo -e "******** Netzwerkkonfiguration NICHT gesichert ********\n"
+ fi
+
+ if [ "$samba" == "y" ]
+  then
+    tar -cvf $DIR/samba.tar /var/etc/smb.conf >> $DIR/backup.log
+		echo -e "******** Sambakonfiguration gesichert ********\n"
+  else
+    echo -e "******** Sambakonfiguration NICHT gesichert ********\n"
+ fi
+
+if [ "$addonmanager" == "y" ]
+	then
+     	tar -cvf $DIR/am.tar /usr/lib/enigma2/python/Plugins/Extensions/AddonManager/* >> $DIR/backup.log
+			echo -e "******** AddonManager wurde gesichert ********\n"
+  else
+	  	echo -e "******** AddonManager NICHT vorhanden! ********\n"
+fi
+
+ if [ "$sonstige" == "y" ]
+  then
+		if [ -e /var/etc/inadyn.conf ]
+    	then
+       tar -cvf $DIR/sonstige.tar /var/etc/fstab /var/etc/localtime /var/etc/inadyn.conf /var/etc/videomode /var/etc/ntpserver /var/etc/passwd>> $DIR/backup.log
+		   echo -e "******** sonstige Konfigurationsdateien gesichert inkl. DynDNS-Config ********\n"
+	 	  else
+       tar -cvf $DIR/sonstige.tar /var/etc/fstab /var/etc/localtime /var/etc/videomode /var/etc/ntpserver /var/etc/passwd>> $DIR/backup.
+       echo -e "******** sonstige Konfigurationsdateien gesichert ********\n"
+    fi
+     else
+       echo -e "******** sonstige Konfigurationsdateien NICHT gesichert ********\n"
+ fi
+fi
+
+# for automatic restore after flashing
+cp /usr/lib/enigma2/python/Plugins/Extensions/AddonManager/restore.sh /var/etc/restore.sh
+cp /var/etc/restore.cfg $DIR/restore.cfg
+cp /usr/lib/enigma2/python/Plugins/Extensions/AddonManager/restore.sh $DIR/restore.sh
+
+exit 0
Index: /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/dirlist
===================================================================
--- /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/dirlist	(revision 8656)
+++ /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/dirlist	(revision 8656)
@@ -0,0 +1,16 @@
+Aafpanel
+BoardViewer
+DVDPlayer
+GraphMultiEPG
+IMDb
+MediaCenter
+OSDAdjustment
+PlugLoad
+SimpleBitrate
+SocketMMI
+SplitScreen
+VFD_Brightness
+VirtualZap
+Volume_adjust
+WebInterface
+
Index: /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/downloader.py
===================================================================
--- /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/downloader.py	(revision 8656)
+++ /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/downloader.py	(revision 8656)
@@ -0,0 +1,1549 @@
+from Components.ActionMap import HelpableActionMap
+from Plugins.Plugin import PluginDescriptor
+from Screens.PluginBrowser import *
+from Screens.SleepTimerEdit import *
+from Screens.Ipkg import Ipkg
+from Components.Ipkg import IpkgComponent
+from Components.SelectionList import SelectionList
+from Screens.NetworkSetup import *
+from enigma import *
+from Screens.Standby import *
+from Screens.MessageBox import MessageBox
+from Screens.Console import Console
+from Components.ActionMap import ActionMap, NumberActionMap
+from Screens.Screen import Screen
+from Components.MenuList import MenuList
+from Components.Label import Label
+from Components.ScrollLabel import ScrollLabel
+from Components.Pixmap import Pixmap
+from Components.config import config, ConfigSubsection, ConfigText, ConfigSubList, getConfigListEntry, ConfigSelection,  ConfigIP, ConfigYesNo, ConfigSequence, ConfigNumber, ConfigInteger
+from Components.ConfigList import ConfigListScreen
+from Components.MenuList import MenuList
+from Screens.Screen import Screen
+from Screens.ChoiceBox import ChoiceBox
+from Components.Sources.StaticText import StaticText
+from Components.Sources.Progress import Progress
+from Components.Label import Label
+from Components.FileList import FileList
+from Components.MultiContent import MultiContentEntryText
+from Tools.Directories import fileExists
+from Tools.Directories import pathExists
+from Screens.Console import Console
+from os import system, remove, path, walk, makedirs, listdir
+from Screens.VirtualKeyBoard import VirtualKeyBoard
+
+import re
+import urllib
+import os
+import base64
+from subprocess import Popen,PIPE
+import ServiceReference
+
+from twisted.cred import checkers
+from twisted.web import client
+from twisted.internet import reactor, defer
+from twisted.python import failure
+
+global serverurl
+global activenam
+global activesource
+global version
+global checkok
+global menu
+global PreviewPath
+
+# for local compile in the box
+#
+# import py_compile
+# py_compile.compile("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/downloader.py")
+
+version = "3.04"
+serverurl = ""
+activenam = ""
+activesource = ""
+readyflag = 0
+checkok = True
+usblist = ""
+
+RestoreYesNo = [('y',_("yes")),('n',_("no"))]
+RestoreNoYes = [('n',_("no")),('y',_("yes"))]
+
+font = "Regular;16"
+os.system("mkdir -p /tmp/aaf")
+#os.system("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/url_check.sh")
+
+activesource = "http://kati910.aaf-board.info/dbase"
+#activesource = "http://97.74.32.10/dbase/ufs-e2"
+activenam = "Addons-Server"
+serverurl = activesource + "/E2/"
+PreviewPath = "http://97.74.32.10/svn/preview"
+
+# Boytyp lesen
+file = open("/proc/stb/info/model", "r")
+box = file.readline().strip()
+file.close()
+
+# dm8000 is a vu-box
+#box = "dm8000"
+if box == "dm8000":
+  serverurl = activesource + "/vuplus/"
+
+config.AddonManager = ConfigSubsection()
+config.AddonManager.which_server = ConfigInteger(2, limits=(1, 2))
+config.AddonManager.preview_timeout = ConfigInteger(default=600,limits=(50, 2000))
+config.AddonManager.preview_on = ConfigInteger(1, limits=(0, 1))
+config.AddonManager.marker_on = ConfigInteger(1, limits=(0, 1))
+config.AddonManager.marker_off = ConfigInteger(1, limits=(0, 1))
+config.AddonManager.mark_color = ConfigInteger(1, limits=(0, 2))
+config.AddonManager.ungenau = ConfigInteger(1, limits=(0, 1))
+config.AddonManager.Schriftart = ConfigInteger(16, limits=(10, 22))
+
+config.AddonManager2 = ConfigSubsection()
+config.AddonManager2.sett_on = ConfigSelection(RestoreYesNo)
+config.AddonManager2.camconfig_on = ConfigSelection(RestoreYesNo)
+config.AddonManager2.plug_on = ConfigSelection(RestoreNoYes)
+config.AddonManager2.binarys_on = ConfigSelection(RestoreNoYes)
+config.AddonManager2.network_on = ConfigSelection(RestoreYesNo)
+config.AddonManager2.samba_on = ConfigSelection(RestoreYesNo)
+config.AddonManager2.bilder_on = ConfigSelection(RestoreYesNo)
+config.AddonManager2.sonstige_on = ConfigSelection(RestoreYesNo)
+config.AddonManager2.am_on = ConfigSelection(RestoreNoYes)
+config.AddonManager2.backup_on = ConfigSelection(RestoreYesNo)
+
+
+RESTORE_CONFIG_SKIN = """<screen position="center,center" size="620,360" title="Backup Restore Setup" >
+  <widget name="config" position="20,2" size="570,253" scrollbarMode="showOnDemand" />
+	<widget name="label1" position="10,265" size="610,50" font="Regular;18" zPosition="1" backgroundColor="#251e1f20" transparent="1" />
+	<eLabel backgroundColor="white" position="10,265" size="610,1" zPosition="5"/>
+	<eLabel backgroundColor="red" position="37,330" size="150,3" zPosition="5"/>
+	<eLabel backgroundColor="green" position="224,330" size="150,3" zPosition="5"/>
+	<eLabel backgroundColor="yellow" position="411,330" size="150,3" zPosition="5"/>
+	<widget name="key_red" position="37,296" zPosition="1" size="150,40" font="Regular;20" halign="center" valign="center" transparent="1" />
+	<widget name="key_green" position="224,296" zPosition="1" size="150,40" font="Regular;20" halign="center" valign="center" transparent="1" />
+	<widget name="key_yellow" position="411,296" zPosition="1" size="150,40" font="Regular;20" halign="center" valign="center" transparent="1" />
+</screen>"""
+
+SELECTRESTORE_SKIN = """
+		<screen position="center,center" size="520,376" title="Auswahlmenue fuer Restore" >
+			<ePixmap position="445,0" size="70,53" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/picon_default.png" transparent="1" alphatest="on" />
+			<ePixmap position="90,350" size="36,20" pixmap="skin_default/buttons/key_red.png" transparent="1" alphatest="on" />
+			<ePixmap position="270,350" size="36,20" pixmap="skin_default/buttons/key_green.png" transparent="1" alphatest="on" />
+			<eLabel text="RESTORE - Auswahl" position="70,12" size="480,35" font="Regular;30" foregroundColor="#ffa323" transparent="1" />
+			<eLabel text="Delete" position="130,350" size="240,25" font="Regular;20" transparent="1" />
+			<eLabel text="Restore" position="310,350" size="240,25" font="Regular;20" transparent="1" />
+			<widget name="filelist" position="10,110" size="520,232" scrollbarMode="showOnDemand" />
+		</screen>"""
+
+
+def applySkinVars(skin,dict):
+		for key in dict.keys():
+				try:
+						skin = skin.replace('{'+key+'}',dict[key])
+				except Exception,e:
+						print e,"@key=",key
+		return skin
+
+def command(comandline):
+  print "[Addon-Manager] command=", comandline
+  comandline = comandline + " >/tmp/command.txt"
+  os.system(comandline)
+  text = ""
+  file = open("/tmp/command.txt", "r")
+  for line in file:
+  	text = text + line.strip() + '\n'
+  file.close
+  # if one or last line then remove linefeed
+  if text[-1:] == '\n': text = text[:-1]
+  comandline = text
+  os.system("rm /tmp/command.txt")
+  return comandline
+
+def restore():
+		ffile = open("/var/etc/restore.cfg", "w")
+		ffile.write('settings=' + config.AddonManager2.sett_on.value[0] + '\n' )
+		ffile.write('binarys=' + config.AddonManager2.camconfig_on.value[0] + '\n')
+		ffile.write('camconfig=' + config.AddonManager2.plug_on.value[0] + '\n')
+		ffile.write('plugins=' + config.AddonManager2.network_on.value[0] + '\n')
+		ffile.write('network=' + config.AddonManager2.samba_on.value[0] + '\n')
+		ffile.write('samba=' + config.AddonManager2.bilder_on.value[0] + '\n')
+		ffile.write('sonstige=' + config.AddonManager2.sonstige_on.value[0] + '\n')
+		ffile.write('addonmanager=' + config.AddonManager2.am_on.value[0] + '\n')
+		ffile.close()
+
+restore()
+
+#----- Class Cancel -------------------------------------------------------
+class UserRequestedCancel(Exception):
+	pass
+
+#----- Progressdownloader -------------------------------------------------
+class HTTPProgressDownloader(client.HTTPDownloader):
+	def __init__(self, url, outfile, headers=None):
+		#client.HTTPDownloader.__init__(self, url, outfile, headers={"Authorization":authHeader}, agent="AAF Download Plugin")
+		client.HTTPDownloader.__init__(self, url, outfile, agent="AAF Download Plugin")
+		self.status = None
+		self.progress_callback = None
+		self.deferred = defer.Deferred()
+
+	def noPage(self, reason):
+		if self.status == "304":
+			print reason.getErrorMessage()
+			client.HTTPDownloader.page(self, "")
+		else:
+			client.HTTPDownloader.noPage(self, reason)
+
+	def gotHeaders(self, headers):
+		if self.status == "200":
+			if headers.has_key("content-length"):
+				self.totalbytes = int(headers["content-length"][0])
+			else:
+				self.totalbytes = 0
+			self.currentbytes = 0.0
+		return client.HTTPDownloader.gotHeaders(self, headers)
+
+	def pagePart(self, packet):
+		if self.status == "200":
+			self.currentbytes += len(packet)
+		if self.totalbytes and self.progress_callback:
+			self.progress_callback(self.currentbytes, self.totalbytes)
+		return client.HTTPDownloader.pagePart(self, packet)
+
+	def pageEnd(self):
+		return client.HTTPDownloader.pageEnd(self)
+
+class downloadWithProgress:
+	def __init__(self, url, outputfile, contextFactory=None, *args, **kwargs):
+		scheme, host, port, path = client._parse(url)
+		self.factory = HTTPProgressDownloader(url, outputfile, *args, **kwargs)
+		self.connection = reactor.connectTCP(host, port, self.factory)
+
+	def start(self):
+		return self.factory.deferred
+
+	def stop(self):
+		print "[Addon-Manager] [stop]"
+		self.connection.disconnect()
+		#self.factory.deferred.errback(failure.Failure(UserRequestedCancel))
+
+	def addProgress(self, progress_callback):
+		print "[Addon-Manager] [addProgress]"
+		self.factory.progress_callback = progress_callback
+
+class Feedlist(MenuList):
+	def __init__(self, list=[], enableWrapAround = False):
+		MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent)
+
+		Schriftart = config.AddonManager.Schriftart.value
+		self.l.setFont(0, gFont("Regular", Schriftart))
+		self.l.setItemHeight(22)
+
+	def clear(self):
+		del self.list[:]
+		self.l.setList(self.list)
+
+	def getPLUGINname(self):
+		l = self.l.getCurrentSelection()
+		return l and l[0][0]
+
+	def getPLUGINurl(self):
+		l = self.l.getCurrentSelection()
+		return l and l[0][1]
+
+	def getLISTname(self):
+		l = self.l.getCurrentSelection()
+		return l and l[0][0][:-2]+"txt"
+
+	def getLISTurl(self):
+		l = self.l.getCurrentSelection()
+		return l and l[0][1][:-2]+"txt"
+
+	def isValid(self):
+		l = self.l.getCurrentSelection()
+		if l[0] == 0:
+			return False
+		else:
+			return True
+
+	def moveSelection(self,idx=0):
+		if self.instance is not None:
+			self.instance.moveSelectionTo(idx)
+
+class PLUGINDownload(Screen):
+	LIST_SOURCE = 1
+	LIST_DEST = 2
+	Skin = """
+		<screen name="PLUGINDownload" position="{screen.pos}" size="{screen.size}" title="{version.text}">
+			<ePixmap pixmap="skin_default/buttons/red.png" position="{red.pos}" zPosition="0" size="140,40" transparent="1" alphatest="on" />
+			<ePixmap pixmap="skin_default/buttons/green.png" position="{green.pos}" zPosition="0" size="140,40" transparent="1" alphatest="on" />
+			<ePixmap pixmap="skin_default/buttons/yellow.png" position="{yellow.pos}" zPosition="0" size="140,40" transparent="1" alphatest="on" />
+			<ePixmap pixmap="skin_default/buttons/blue.png" position="{blue.pos}" zPosition="0" size="140,40" transparent="1" alphatest="on" />
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/pressed.png" position="{red2.pos}" zPosition="0" size="140,40" transparent="1" alphatest="on" />
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/pressed.png" position="{green2.pos}" zPosition="0" size="140,40" transparent="1" alphatest="on" />
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/pressed.png" position="{yellow2.pos}" zPosition="0" size="140,40" transparent="1" alphatest="on" />
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/pressed.png" position="{blue2.pos}" zPosition="0" size="140,40" transparent="1" alphatest="on" />
+			<widget source="key_red" render="Label" position="{red.pos}" zPosition="1" size="140,40" font="Regular;20" valign="center" halign="center" backgroundColor="#9f1313" transparent="1" />
+			<widget source="key_green" render="Label" position="{green.pos}" zPosition="1" size="140,40" font="Regular;20" valign="center" halign="center" backgroundColor="#1f771f" transparent="1" />
+			<widget source="key_yellow" render="Label" position="{yellow.pos}" zPosition="1" size="140,40" font="Regular;20" valign="center" halign="center" backgroundColor="#a08500" transparent="1" />
+			<widget source="key_blue" render="Label" position="{blue.pos}" zPosition="1" size="140,40" font="Regular;20" valign="center" halign="center" backgroundColor="#18188b" transparent="1" />
+			<widget source="key_1" render="Label" position="{red2.pos}" zPosition="1" size="140,40" font="Regular;16" valign="center" halign="center" backgroundColor="#9f1313" transparent="1" />
+			<widget source="key_2" render="Label" position="{green2.pos}" zPosition="1" size="140,40" font="Regular;16" valign="center" halign="center" backgroundColor="#1f771f" transparent="1" />
+			<widget source="key_3" render="Label" position="{yellow2.pos}" zPosition="1" size="140,40" font="Regular;16" valign="center" halign="center" backgroundColor="#a08500" transparent="1" />
+			<widget source="key_4" render="Label" position="{blue2.pos}" zPosition="1" size="140,40" font="Regular;16" valign="center" halign="center" backgroundColor="#18188b" transparent="1" />
+			<widget source="label_top" render="Label" position="10,94" size="340,20" foregroundColor="#3366ff" font="Regular;16" />
+			<widget name="feedlist" position="10,116" size="{feed.size}" scrollbarMode="showOnDemand" />
+			<widget name="destlist" position="0,116" size="{dest.size}" scrollbarMode="showOnDemand" />
+			<widget source="label_bottom" render="Label" position="10,352" size="240,18" foregroundColor="#3366ff" font="Regular;16"/>
+			<widget source="infolabel" render="Label" position="{infolabel.pos}" size="{infolabel.size}" font="Regular;16" />
+			<widget name="Preview" position="{prev.pos}" size="{prev.size}" alphatest="on"/>
+			<widget source="job_progressbar1" render="Progress" position="10,390" size="{progr.size}" borderWidth="1" backgroundColor="#9f1313" />
+			<widget source="job_progresslabel1" render="Label" position="130,394" zPosition="2" font="Regular;18" halign="center" transparent="1" size="{proglabel.size}" foregroundColor="#000000" />
+			<widget source="job_progressbar" render="Progress" position="10,390" size="{progr.size}" borderWidth="1" backgroundColor="#254f7497" />
+			<widget source="job_progresslabel" render="Label" position="130,394" zPosition="2" font="Regular;18" halign="center" transparent="1" size="{proglabel.size}" foregroundColor="#000000" />
+			<widget source="statusbar" render="Label" position="10,420" size="{status.size}" font="Regular;16" foregroundColor="#cccccc" />
+		</screen>"""
+
+# 			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/aaf.png" position="{logo.pos}" zPosition="0" size="160,140" transparent="1" alphatest="on" />
+
+	def __init__(self, session, destdir="/tmp/aaf/"):
+		#switch automatic to current skin
+		current_w = getDesktop(0).size().width()
+		current_h = getDesktop(0).size().height()
+		print "[Addon-Manager] DESKTOPsize is",current_w,current_h
+
+		# define the start koordinates and size
+		if current_w == 1280:
+				size_w = 720
+				size_h = 442
+		else:
+				size_w = 560
+				size_h = 442
+
+		# calculate Skin koordinates
+		font = "Regular;18"
+		vers = "AAF Addon-Manager V " + version
+		pos_w = (current_w - size_w)/2
+		pos_h = (current_h - size_h)/2
+		list_w = size_w - 20
+		list_pos = (size_w - list_w)/2
+		red_pos = size_w/2 - 280
+		green_pos = size_w/2 - 140
+		yellow_pos = size_w/2
+		blue_pos = size_w/2 + 140
+		feed_size = size_w/2 - 30
+		dest_size = feed_size + 10
+		prev_size = size_w/2 - 15
+		prev_pos = size_w/2
+		proglabel_size = size_w/2 + 20
+		infolabel_pos = size_w/2 - 10
+		infolabel_size = size_w/2 - 15
+		logo_pos = size_w -100
+
+		# set Skinvariables
+		self.dict = {
+				'font': font,
+				'version.text': vers,
+				'list.size': "%i,232"%(list_w),
+				'feed.size': "%i,222"%(feed_size),
+				'dest.size': "%i,222"%(dest_size),
+				'prev.size': "%i,284"%(prev_size),
+				'progr.size': "%i,26"%(list_w),
+				'proglabel.size': "%i,22"%(proglabel_size),
+				'status.size': "%i,16"%(list_w),
+
+				'list.pos': "%i,110"%(list_pos),
+				'prev.pos': "%i,120"%(prev_pos),
+				'screen.size': "%i,%i"%(size_w,size_h),
+				'screen.pos': "%i,%i"%(pos_w,pos_h),
+				'red.pos': "%i,0"%(red_pos),
+				'green.pos': "%i,0"%(green_pos),
+				'yellow.pos': "%i,0"%(yellow_pos),
+				'blue.pos': "%i,0"%(blue_pos),
+				'red2.pos': "%i,40"%(red_pos),
+				'green2.pos': "%i,40"%(green_pos),
+				'yellow2.pos': "%i,40"%(yellow_pos),
+				'blue2.pos': "%i,40"%(blue_pos),
+
+				'infolabel.size': "%i,284"%(infolabel_size),
+				'infolabel.pos': "%i,94"%(infolabel_pos),
+				'logo.pos': "%i,336"%(logo_pos),
+				}
+		self.skin = applySkinVars(PLUGINDownload.Skin,self.dict)
+
+		Screen.__init__(self, session)
+		
+		self["job_progressbar"] = Progress()
+		self["job_progresslabel"] = StaticText()
+		self["job_progressbar1"] = Progress()
+		self["job_progresslabel1"] = StaticText()
+		self["infolabel"] = StaticText()
+		self["statusbar"] = StaticText()
+		self["label_top"] = StaticText()
+		self["label_bottom"] = StaticText()
+		self["path_bottom"] = StaticText()
+		self["key_green"] = StaticText()
+		self["key_yellow"] = StaticText()
+		self["key_blue"] = StaticText()
+		self["key_red"] = StaticText()
+		self["key_1"] = StaticText()
+		self["key_2"] = StaticText()
+		self["key_3"] = StaticText()
+		self["key_4"] = StaticText()
+
+		self["feedlist"] = Feedlist([0,(eListboxPythonMultiContent.TYPE_TEXT, 0, 0,250, 30, 0, RT_HALIGN_LEFT|RT_VALIGN_CENTER, "feed not available")])
+
+		self.currDir = "/mnt/usb"
+		self["destlist"] = FileList(self.currDir, showDirectories = True, isTop = True)
+		self["destlist"].hide()
+		self["Preview"] = Pixmap()
+		self["Preview"].hide()
+
+		self.download_container = eConsoleAppContainer()
+		self.LIST = ""
+		self.LISTfile = ""
+		self.feedhtml = ""
+		self.focus = None
+		self.download = None
+		self.plug = "all"
+		self.farbe = 1
+		self.ListTyp = "pic"
+
+		self.feed_base = serverurl + "%s/" % self.plug
+		self.plugin_filter = ""
+		#self.showpreview = "on"
+
+		self.showpreview = config.AddonManager.preview_on.value
+		self.previewtimeout = config.AddonManager.preview_timeout.value
+		self.marker_on = config.AddonManager.marker_on.value
+		self.marker_off = config.AddonManager.marker_off.value
+
+		self.ThumbTimer = eTimer()
+		self.ThumbTimer.callback.append(self.list_download)
+
+		self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "DirectionActions", "EPGSelectActions", "MenuActions", "InfobarTeletextActions", "NumberActions", "MovieSelectionActions", "InfobarActions"],
+			{
+				"cancel": self.closeCB,
+				"red": self.red_download,
+				"green": self.green_download,
+				"yellow": self.yellow_download,
+				"blue": self.blue_download,
+
+				"1": self.eins_download,
+				"2": self.FavMenu,
+				"3": self.drei_download,
+				"4": self.vier_download,
+				"5": self.fuenf_download,
+				"6": self.BackupRestore,
+				"9": self.sh_preview,
+				"0": self.update,
+
+				"prevBouquet": self.switchList,
+				"nextBouquet": self.switchList,
+				"ok": self.check_download,
+				"left": self.left,
+				"right": self.right,
+				"up": self.up,
+				"upRepeated": self.up,
+				"downRepeated": self.down,
+				"menu": self.settings_menu,
+				"startTeletext": self.switch_ListTyp,
+				"showEventInfo": self.info,
+				"showTv": self.FavMenu,
+				"down": self.down
+			}, -1)
+
+		aafpointer = 0
+		#/etc/imageinfo AAF Enigma2
+		fd=open("/etc/imageinfo","r")
+		for line in fd:
+			if line.find("AAF Enigma2") > -1:
+				aafpointer = aafpointer +1
+		fd.close
+
+		# /etc/motd wElc0me to AAF
+		fd=open("/etc/motd","r")
+		for line in fd:
+			if line.find("wElc0me to") > -1:
+				aafpointer = aafpointer +1
+		fd.close
+
+		# Url Check
+		os.system("cat /var/etc/ipkg/official-feed.conf | cut -d '/' -f4 > /tmp/onlineupdate")
+		fd=open("/tmp/onlineupdate","r")
+		url=fd.readline().strip()
+		fd.close()
+
+		if url.find("97.74.32.10") > -1:
+			aafpointer = aafpointer +1
+		if url.find("addons.aaf-board.net") > -1:
+			aafpointer = aafpointer +1
+
+		if str(aafpointer) <= "0":
+		#if str(aafpointer) <= "2":
+			print "Permission denied ", str(aafpointer)
+			self["statusbar"].text = _("Sorry, Permission denied")
+			self.close()
+		else:
+			self.focus = self.LIST_SOURCE
+			self.read_Boxtyp()
+
+			self.plug = "ipk"
+
+			if fileExists("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/startservice.cfg"):
+				file = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/startservice.cfg","r")
+				self.plugin_filter = str(file.readline().strip())
+				file.close()
+			else:
+				self.plugin_filter = "-"  # show all ipk
+
+			if box <> "dm8000":
+				evfd.getInstance().vfd_write_string("load PlugList")
+			if os.path.exists("/var/etc/ipkg/official-feed.conf") is True:
+				file = open("/var/etc/ipkg/official-feed.conf", "r")
+				self.feed_base = file.readline().strip()
+				self.feed_base = self.feed_base.replace(u"src/gz cross ","")
+				self.feed_base = str(self.feed_base) + "/"
+			elif os.path.exists("/etc/ipkg/official-feed.conf") is True:
+				file = open("/etc/ipkg/official-feed.conf", "r")
+				self.feed_base = file.readline().strip()
+				self.feed_base = self.feed_base.replace(u"src/gz cross ","")
+				self.feed_base = str(self.feed_base) + "/"
+			self.feed_download()
+
+	def FavMenu(self):
+		Filter = "-"
+		self.session.openWithCallback(self.MenuCallback, FilterPanel,Filter)
+
+	def MenuCallback(self):
+		global menu
+		print "FavMenu Callback", menu
+		if menu == "stop":
+				menu = "-"
+		self.plugin_filter = menu
+		self.feed_finished(self.feedhtml)
+
+
+	def BackupRestoreVU(self):
+		self.session.open(RestoreConfigScreenVU)
+
+	def BackupRestore(self):
+			self.session.open(RestoreConfigScreenVU)
+
+	def downloading(self, state=True):
+		if state is True:	
+			self["key_red"].text = _("Cancel")
+			self["key_green"].text = ""
+			self["key_yellow"].text = ""
+			self["key_blue"].text = ""
+		else:
+			self.download = None
+			self["key_red"].text = _("System")
+			self["key_green"].text = (_("Skins"))
+			self["key_yellow"].text = (_("Players"))
+			self["key_blue"].text = (_("Emus"))
+			self["key_1"].text = _("(1) Bootbilder")
+			self["key_2"].text = (_("(2) Select"))
+			self["key_3"].text = (_("(3) SWAP all"))
+			self["key_4"].text = (_("(4) IPK all"))
+
+	def switchList(self,to_where=None):
+		if self.download or not self["feedlist"].isValid():
+			return
+
+		self["job_progressbar"].value = 0
+		self["job_progresslabel"].text = ""
+
+		if self.focus is  self.LIST_DEST:
+			self["statusbar"].text = _("Please select a target device")
+			self["label_top"].text = _("choose destination directory")+":"
+			self["feedlist"].hide()
+			self["destlist"].show()
+
+		if self.focus is self.LIST_SOURCE:
+			self["statusbar"].text = _("Please choose file from AAF Server to download")
+			self["label_top"].text = _("...select file (FAV = Filter)")
+			self["feedlist"].show()
+			self["destlist"].hide()
+			self["label_bottom"].text = _("attached to: ")+ activenam
+
+
+#----- load Menutext or Picture -------------------------------------------------------
+	def switch_ListTyp(self):
+		if self.ListTyp == "txt":
+			self.ListTyp = "pic"
+			self["Preview"].show()
+			LISTurl = self["feedlist"].getLISTurl()
+			LISTurl = LISTurl+".png"
+			print "[Addon-Manager] downloading " + LISTurl
+			self.download = self.list_download
+			self.downloading(True)
+			#client.getPage(LISTurl, headers={"Authorization":authHeader}).addCallback(self.pic_finished).addErrback(self.pic_failed)
+			client.getPage(LISTurl).addCallback(self.pic_finished).addErrback(self.pic_failed)
+
+		if self.ListTyp == "pic":
+			self.ListTyp = "txt"
+			self["statusbar"].text = ""
+			self.LISTfilename = ""
+			self.LIST = ""
+			self["Preview"].hide()
+			LISTurl = self["feedlist"].getLISTurl()
+			#client.getPage(LISTurl, headers={"Authorization":authHeader}).addCallback(self.list_finished).addErrback(self.list_failed)
+			client.getPage(LISTurl).addCallback(self.list_finished).addErrback(self.list_failed)
+			self["statusbar"].text = _("Downloading file description...")
+			self.downloading(False)
+
+#----- Menu Keys are pressed -------------------------------------------------------
+	def up(self):
+		if self.download:
+			return
+		if self.focus is self.LIST_SOURCE:
+			self["feedlist"].up()
+			self.ThumbTimer.start(self.previewtimeout, True)
+		if self.focus is self.LIST_DEST:
+			self["destlist"].up()
+
+	def down(self):
+		if self.download:
+			return
+		if self.focus is self.LIST_SOURCE:
+			self["feedlist"].down()
+			self.ThumbTimer.start(self.previewtimeout, True)
+		if self.focus is self.LIST_DEST:
+			self["destlist"].down()
+
+	def left(self):
+		if self.download:
+			return
+		if self.focus is self.LIST_SOURCE:
+			self["feedlist"].pageUp()
+			self.ThumbTimer.start(self.previewtimeout, True)
+		if self.focus is self.LIST_DEST:
+			self["destlist"].pageUp()
+
+	def right(self):
+		if self.download:
+			return
+		if self.focus is self.LIST_SOURCE:
+			self["feedlist"].pageDown()
+			self.ThumbTimer.start(self.previewtimeout, True)
+		if self.focus is self.LIST_DEST:
+			self["destlist"].pageDown()
+
+	def ok(self):
+		if self.download:
+			return
+		if self.focus is self.LIST_DEST:
+			if self["destlist"].canDescent():
+				self["destlist"].descent()
+
+	def settings_menu(self):
+		self.session.open(AddonConfigScreen)
+
+	def info(self):
+		if box <> "dm8000":
+			evfd.getInstance().vfd_write_string("Version V " + version)
+		message = "%s %s\n\n%s" % (_("AAF Addon-Manager\n\n     Version "), version, _("       AAF-Team\n\n@Bauernbub 2009"))
+		self.session.openWithCallback(self.update_now, MessageBox, message, MessageBox.TYPE_INFO)
+
+#----- AM Update -------------------------------------------------------
+	def update(self):
+		versurl = activesource + "/version_e2.txt"
+		h = urllib.urlretrieve(versurl, "/tmp/version_e2.txt")
+		dummy = open("/tmp/version_e2.txt").read()
+		version_server = dummy[0:len(dummy) -2]
+		if version_server == version:
+			print "[Addon-Manager] gleich"
+			message = "%s %s\n%s %s\n\n%s" % (_("Version am Server:"), version_server, _("Version in der Box:"), version, _("Ein Update ist nicht erforderlich!"))
+			if box <> "dm8000":
+				evfd.getInstance().vfd_write_string("No Update")
+			self.session.open( MessageBox, message, MessageBox.TYPE_INFO)
+		else:
+			if version_server > version:
+				message = "%s %s\n%s %s\n\n%s" % (_("Version am Server:"), version_server, _("Version in der Box:"), version, _("Ein Update ist empfehlenswert!"))
+				if box <> "dm8000":
+					evfd.getInstance().vfd_write_string("UPDATE is here")
+				self.session.openWithCallback(self.update_now, MessageBox, message, MessageBox.TYPE_YESNO)
+			else:
+				message = "%s %s\n%s %s\n\n%s" % (_("\nKlingt wie ein Scherz, aber die Version am Server ist aelter als die auf ihrer Box!\n\nVersion am Server:"), version_server, _("Version in der Box:"), version, _("NICHT UPDATEN, sie besitzen vermutlich eine fortgeschrittene Betaversion!"))
+				if box <> "dm8000":
+					evfd.getInstance().vfd_write_string("Update is older")
+				self.session.openWithCallback(self.update_now, MessageBox, message, MessageBox.TYPE_YESNO)
+
+	def update_now(self, answer):
+		self.downloading(False)
+		if answer == True:
+
+			if box <> "dm8000":
+				versurl = activesource + "/addon-man_e2.tar.gz"
+			else:
+				versurl = activesource + "/addon-man_vu_e2.tar.gz"
+
+			h = urllib.urlretrieve(versurl, "/tmp/aaf/addon-man_e2.tar.gz")
+
+			os.system("cd /tmp/aaf; tar -xzf addon-man_e2.tar.gz")
+			if os.path.exists("/tmp/aaf/addon-man_e2.tar.gz") is True:
+				os.system("cp -RP /tmp/aaf/* / ; sync")
+				os.system("rm -r /tmp/aaf")
+				os.system("cd / ; rm *tar.gz")
+				os.system("mkdir /tmp/aaf")
+				if box <> "dm8000":
+					evfd.getInstance().vfd_write_string("rebooting ....")
+				message = "%s" % (_("Der Addon-Manager hat einen Neustart angefordert!\nDie Box wird nun neu gestartet!"))
+				self.session.openWithCallback(self.update_now, MessageBox, message, MessageBox.TYPE_YESNO)
+				#self.session.open( MessageBox, message, MessageBox.TYPE_INFO)
+				#TryQuitMainloop(self.session,2)
+				os.system("killall -9 enigma2")
+
+#----- Feed Download Procedures -------------------------------------------------------
+	def feed_download(self):
+		self.downloading(True)
+		self.download = self.feed_download
+		print "[feed-download]" +  self.feed_base + "index.txt"
+
+		if os.path.exists("/tmp/aaf") is False:
+				os.system("mkdir /tmp/aaf")
+
+		ipkurl = command('cat /var/etc/ipkg/official-feed.conf | cut -d "/" -f4')
+		os.system("cd /usr/lib/enigma2/python/Plugins/Extensions/AddonManager/; ./ipkdownload")
+		if os.path.exists("/tmp/aaf/index.txt") is True:
+				self.feedhtml = open("/tmp/aaf/index.txt").read()
+				self.feed_finished(self.feedhtml)
+
+
+	def feed_failed(self, failure_instance):
+		print "[Addon-Manager] [feed_failed] " + str(failure_instance)
+		self["infolabel"].text = _("Could not connect to AAF-Plugin Server:") + "\n" + failure_instance.getErrorMessage() + "\n\n" + _("Please check your network settings!")
+		self.downloading(False)
+
+	def feed_finished(self, feedhtml):
+		#print "[Addon-Manager] [feed_finished] " + str(feedhtml)
+		self.downloading(False)
+
+		fileresultmask = re.compile("(?P<name>.*?)\#\#(?P<url>.*?_sh4.ipk)", re.DOTALL)
+		if box == "dm8000":
+				fileresultmask = re.compile("(?P<name>.*?)\#\#(?P<url>.*?.ipk)", re.DOTALL)
+
+		if os.path.exists("/var/etc/uninst") is False:
+			os.system("mkdir -p /var/etc/uninst")
+
+		os.system("ls /var/etc/uninst >/tmp/uninst.txt")
+		os.system("ls /usr/lib/ipkg/info/*.postrm >>/tmp/uninst.txt")
+
+		fd=open("/tmp/uninst.txt")
+		inhalt=fd.read() # Lese die gesamte Datei
+		fd.close()
+		inhalt = inhalt.lower()
+		inhalt = inhalt.replace("\n","")
+		inhalt = inhalt.replace("\r","")
+		searchresults = fileresultmask.finditer(feedhtml)
+
+		ausblenden = 0
+		#self.ungenau = config.AddonManager.ungenau.value
+		self.farbe = config.AddonManager.mark_color.value
+
+		if self.farbe == 0:
+				farbwahl = 16711680
+		elif self.farbe == 1:
+				farbwahl = 65280
+		elif self.farbe == 2:
+				farbwahl = 49151
+		fileresultlist = []
+		if searchresults:
+			for x in searchresults:
+				url = x.group("url")
+
+				# filtering the Filename string
+				if url.find(self.plugin_filter) > -1:
+					#print "url=", url
+					ausblenden = 0
+				else:
+					ausblenden = 1
+
+				if url[0:7] != "http://":
+					url = self.feed_base + x.group("url")
+				name = x.group("name")
+				name_lo = name.lower()
+				name_lo = name_lo.replace("\n","")
+				name_lo = name_lo.replace("\r","")
+				font_s = 0
+				name_lo = name_lo.split("_")[0]
+				#print "name_lo = ", str(name_lo)
+
+				if self.marker_on == True:
+					if inhalt.find(name_lo) > -1 and ausblenden == 0:
+						font_s = 1
+						if self.marker_off != True:
+							ausblenden = 1
+						else:
+							ausblenden = 0
+
+				if ausblenden == 0:
+						if font_s == 1:
+							entry = [[name, url],(eListboxPythonMultiContent.TYPE_TEXT, 0, 0,300, 30, 0, RT_HALIGN_LEFT|RT_VALIGN_CENTER, name, farbwahl)]
+						else:
+							entry = [[name, url],(eListboxPythonMultiContent.TYPE_TEXT, 0, 0,300, 30, 0, RT_HALIGN_LEFT|RT_VALIGN_CENTER, name)]
+						fileresultlist.append(entry)
+				else:
+						ausblenden = 0
+
+			self["feedlist"].l.setList(fileresultlist)
+			self["feedlist"].moveSelection(0)
+		if len(fileresultlist) > 0:
+			self.switchList(self.LIST_SOURCE)
+			self.list_download()
+		else:
+			self["infolabel"].text = _("Cannot parse feed directory")
+
+		if box <> "dm8000":
+				evfd.getInstance().vfd_write_string("AddonManager")
+
+
+#----- List Download Procedures -------------------------------------------------------
+	def list_download(self):
+		global PreviewPath
+		global LISTurlText
+		if self.showpreview == True:
+			#print "[Addon-Manager] [check_for_LIST]"
+			if self["feedlist"].isValid():
+				#print "[Addon-Manager] PLUGINname: " + self["feedlist"].getPLUGINname()
+				self["job_progressbar"].value = 0
+				self["job_progresslabel"].text = ""
+				if self["feedlist"].getPLUGINurl() is None:
+					self["key_green"].text = ""
+					return
+				self["key_green"].text = _("Download")
+				LISTurl = self["feedlist"].getLISTurl()
+				LISTurl1 = LISTurl.split("_")[0]
+				UrlLink = LISTurl.split("enigma2-plugin-")[0]
+				LISTName = LISTurl1.split("enigma2-plugin-")[1].split("-")[1]
+				
+				if LISTName.find(".") > -1:
+					LISTName = LISTName.split(".")[0]
+
+				LISTurl = PreviewPath + "/enigma2-pluginpreview-" + LISTName+".png"
+				LISTurlText = PreviewPath + "/enigma2-pluginpreview-" + LISTName+".txt"
+
+				#print "[Addon-Manager] downloading " + LISTurl
+				self.download = self.list_download
+				self.downloading(True)
+				#client.getPage(LISTurl, headers={"Authorization":authHeader}).addCallback(self.pic_finished).addErrback(self.pic_failed)
+				client.getPage(LISTurl).addCallback(self.pic_finished).addErrback(self.pic_failed)
+
+				self["statusbar"].text = _("Downloading file description...")
+
+	def list_failed(self, failure_instance):
+		print "[Addon-Manager] [list_failed] " + str(failure_instance)
+		self["infolabel"].text = _("No details for this file") + "\n" + self["feedlist"].getPLUGINname()
+		self["statusbar"].text = ""
+		self.LISTfilename = ""
+		self.LIST = ""
+		self.downloading(False)
+
+	def list_finished(self,LISTdata=""):
+		#print "[Addon-Manager] [list_finished] " + str(LISTdata)
+		self.downloading(False)
+		self.LIST = LISTdata
+		self.ListTyp = "txt"
+
+		if self.LIST != "":
+			self.LISTfilename = self["feedlist"].getLISTname()
+			self["infolabel"].text = self.LIST
+		else:
+			self.LISTfilename = ""
+			self["infolabel"].text = _("No details for this file")
+		self["statusbar"].text = ""
+
+#----- Pic Download Procedures -------------------------------------------------------
+	def pic_failed(self, failure_instance):
+		print "[Addon-Manager] [list_failed] " + str(failure_instance)
+		self["infolabel"].text = _("No details for this file") + "\n" + self["feedlist"].getPLUGINname()
+		self["statusbar"].text = ""
+		self.LISTfilename = ""
+		self.LIST = ""
+		self["Preview"].hide()
+
+		# no pic-file, now look for txt
+		self["statusbar"].text = _("Downloading file description...")
+		#LISTurl = self["feedlist"].getLISTurl()
+		#client.getPage(LISTurl, headers={"Authorization":authHeader}).addCallback(self.list_finished).addErrback(self.list_failed)
+		global LISTurlText
+		client.getPage(LISTurlText).addCallback(self.list_finished).addErrback(self.list_failed)
+
+		self.downloading(False)
+
+	def pic_finished(self,LISTdata=""):
+		print "[Addon-Manager] [list_finished] " + str(LISTdata)
+		self.downloading(False)
+		self.LIST = LISTdata
+		self.ListTyp = "pic"
+
+		if self.LIST != "":
+			self.LISTfilename = self["feedlist"].getLISTname()
+			self["infolabel"].text = ""
+			# write skin-preview to file
+			ffile = open("/tmp/skin.png", "w")
+			ffile.write(self.LIST)
+			ffile.close()
+			pngpath = "/tmp/skin.png"
+			self.previewPath = pngpath
+			self["Preview"].show()
+			self["Preview"].instance.setPixmapFromFile(self.previewPath)
+		else:
+			self.LISTfilename = ""
+			self["infolabel"].text = _("No details for this file")
+		self["statusbar"].text = ""
+#-----------------------------------------------------------------
+
+	def sh_preview(self):
+		if self.showpreview == 1:
+			self.showpreview = 0
+			self.LISTfilename = self["feedlist"].getLISTname()
+			self["infolabel"].text = _("Preview = off: (press Key 9) ")
+			pngpath = "/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/no_preview.png"
+			self.previewPath = pngpath
+			self["Preview"].show()
+			self["Preview"].instance.setPixmapFromFile(self.previewPath)
+		else:
+			self.showpreview = 1
+			self.LISTfilename = self["feedlist"].getLISTname()
+			self["infolabel"].text = _("Preview = on: ")
+			self["Preview"].hide()
+
+	def read_Boxtyp(self):
+			file = open("/proc/stb/info/model", "r")
+			self.box = file.readline().strip()
+			file.close()
+
+	def red_download(self):
+		if box <> "dm8000":
+			evfd.getInstance().vfd_write_string("Plugins")
+		self.plugin_filter = "system-" 
+		self.feed_finished(self.feedhtml)
+
+	def green_download(self):
+		if box <> "dm8000":
+			evfd.getInstance().vfd_write_string("Settings")
+		self.plugin_filter = "skins-"
+		self.feed_finished(self.feedhtml)
+
+	def yellow_download(self):
+		if box <> "dm8000":
+			evfd.getInstance().vfd_write_string("EmusConfig")
+		self.plugin_filter = "players-"
+		self.feed_finished(self.feedhtml)
+
+	def blue_download(self):
+		if box <> "dm8000":
+			evfd.getInstance().vfd_write_string("Emus")
+		self.plugin_filter = "emus-"
+		self.feed_finished(self.feedhtml)
+
+
+# ----- Numbers --------
+	def eins_download(self):
+		if box <> "dm8000":
+			evfd.getInstance().vfd_write_string("Bootbilder")
+		self.plugin_filter = "bootlogos-"
+		self.feed_finished(self.feedhtml)
+
+	def zwei_download(self):
+		if box <> "dm8000":
+			evfd.getInstance().vfd_write_string("Radiobilder")
+		self.plugin_filter = "radiologos-"
+		self.feed_finished(self.feedhtml)
+
+	def drei_download(self):
+		if box <> "dm8000":
+			evfd.getInstance().vfd_write_string("SWAP all")
+		self.plugin_filter = "swap"
+		self.feed_finished(self.feedhtml)
+
+	def vier_download(self):
+		if box <> "dm8000":
+			evfd.getInstance().vfd_write_string("IPK all")
+		self.plugin_filter = "-"
+		self.feed_finished(self.feedhtml)
+
+	def fuenf_download(self):
+		if box <> "dm8000":
+			evfd.getInstance().vfd_write_string("IPK all")
+		self.plugin_filter = "-" 
+		self.feed_finished(self.feedhtml)
+
+
+
+#----- plugin download ------------------------------------------------------------
+	def check_download(self):
+ 			self.plugin_download()
+
+	def plugin_download(self):
+		print "[Addon-Manager] Plugin-Download"
+		if self["feedlist"].isValid():
+			url = self["feedlist"].getPLUGINurl()
+			print url
+			self.foundipk = re.search('sh4', str(url))
+			self.urlname = url
+			self.error_counter = "0"
+			if len(str(self.foundipk)) == 4:
+				self.PLUGINlocal = '/tmp/aaf/downfile.tar.gz'
+				if box <> "dm8000":
+					evfd.getInstance().vfd_write_string("load Tarfile")
+			else:
+				self.PLUGINlocal = '/tmp/aaf/downfile.sh4.ipk'
+				if box <> "dm8000":
+					evfd.getInstance().vfd_write_string("load IPK")
+
+			#self.box = "dm8000"
+			if box == "dm8000":
+				self.PLUGINlocal = '/tmp/aaf/downfile.sh4.ipk'
+				if box <> "dm8000":
+					evfd.getInstance().vfd_write_string("load IPK")
+
+			self.PluginPath = "E2/image"
+
+			if self.error_counter == "0":
+				self["job_progressbar"].value = 0
+				self["job_progresslabel"].text = ""
+				print "[Addon-Manager] downloading " + url
+				self.download = self.plugin_download
+				self.downloading(True)
+				print "[Addon-Manager] [plugin_download] downloading %s to %s" % (url, self.PLUGINlocal)
+				self.download = downloadWithProgress(url,self.PLUGINlocal)
+				self.download.addProgress(self.plugin_progress)
+				self["job_progressbar"].range = 1000
+
+				self.download.start().addCallback(self.plugin_finished)
+				self.downloading(True)
+
+	def plugin_progress(self, recvbytes, totalbytes):
+		#print "[Addon-Manager] [update_progress] recvbytes=%d, totalbytes=%d" % (recvbytes, totalbytes)
+		self["job_progressbar"].value = int(1000*recvbytes/float(totalbytes))
+		self["job_progresslabel"].text = "%d of %d kBytes (%.2f%%)" % (recvbytes/1024, totalbytes/1024, 100*recvbytes/float(totalbytes))
+
+	def plugin_failed(self, failure_instance=None, error_message=""):
+    # here is an problem, an error was produced! Help me!
+		if error_message == "" and failure_instance is not None:
+			error_message = failure_instance.getErrorMessage()
+		print "[Addon-Manager] [plugin_failed] " + error_message
+		if fileExists(self.PLUGINlocal):
+			message = "%s %s\n%s" % (_("File Download failed:"), error_message, _("Remove the incomplete file?"))
+			self.session.openWithCallback(self.plugin_remove, MessageBox, message, MessageBox.TYPE_YESNO)
+		else:
+			message = "%s %s" % (_(".PLUGIN Download failed:"),error_message)
+			self.session.open(MessageBox, message, MessageBox.TYPE_ERROR)
+			self.downloading(False)
+
+#------------ plugin finished ----------------------------------------------
+
+	def plugin_finished(self, string=""):
+		ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log", "w")
+		ffile.write("gedrueckte Kategorie:" + self.plug)
+		ffile.write("\n")
+		ffile.close()
+
+		if len(str(self.foundipk)) == 4:
+				ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log","a")
+				ffile.write("es ist ein Tarfile ")
+				ffile.write("\n")
+				ffile.close()
+
+		else:
+				ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/inst.log","a")
+				ffile.write("IPK wird entpackt!")
+				ffile.write("\n")
+				ffile.close()
+
+				self["statusbar"].text = _("Decompressing IPK-File...")
+				os.system("cd /tmp/aaf ; ipkg update")
+
+				if config.AddonManager.ungenau.value == 1:
+					self.CpString = "cd /tmp/aaf ; ipkg install /tmp/aaf/downfile.sh4.ipk"
+					self.session.open(Console, title = _("IPK Installer"), cmdlist = ["%s" % self.CpString], closeOnSuccess = False)
+				else:
+					os.system("cd /tmp/aaf ; ipkg install /tmp/aaf/downfile.sh4.ipk")
+
+				##os.system("rm -r /tmp/aaf")
+
+		os.system("mkdir /tmp/aaf")
+		self["statusbar"].text = _("Installation OK!")
+		self.downloading(False)
+		#if self.plug == "skins":
+		#	self.session.open(SkinSelector)
+
+	def restartGUI(self, answer):
+		if answer is True:
+			os.system("killall -9 enigma2")
+
+	def errorstop(self, error_message):
+		print "[Addon-Manager] An error has occurred: %s" % str(error_message)
+		message = ("%s" % error_message)
+		#self.session.open(MessageBox, message, MessageBox.TYPE_ERROR)
+		self.downloading(False)
+		self.close()
+
+	def errorHandler(self, error_message):
+		print "[Addon-Manager] An error has occurred: %s" % str(error_message)
+		message = "%s %s" % (_(".PLUGIN Download failed:"),error_message)
+		self.session.open(MessageBox, message, MessageBox.TYPE_ERROR)
+		self.downloading(False)
+    # and then we stop the entire process:
+		reactor.stop()
+
+	def plugin_remove(self, answer):
+		self.downloading(False)
+		if answer == True:
+			PLUGINfilename =  self.PLUGINlocal
+			if fileExists(self.LISTfilename):
+				remove(self.LISTfilename)
+			if fileExists(PLUGINfilename):
+				remove(PLUGINfilename)
+		self.switchList(self.LIST_SOURCE)
+
+	def closeCB(self):
+		if self.download:
+			self.downloading(False)
+		else:
+			self.close()
+
+
+#-----------------------------------------------------------------
+class AddonConfigScreen(ConfigListScreen,Screen):
+    skin = """
+        <screen position="{screen.pos}" size="650,400" title="Addon-Manager Setup" >
+        <widget name="config" position="40,10" size="570,325" scrollbarMode="showOnDemand" />
+        <widget name="buttonred" position="40,360" size="100,40" backgroundColor="red" valign="center" halign="center" zPosition="2"  foregroundColor="white" font="Regular;18"/>
+        <widget name="buttongreen" position="160,360" size="100,40" backgroundColor="green" valign="center" halign="center" zPosition="2"  foregroundColor="white" font="Regular;18"/>
+        </screen>"""
+
+    def __init__(self, session, args = 0):
+        self.session = session
+        #switch automatic to current skin
+        current_w = getDesktop(0).size().width()
+        current_h = getDesktop(0).size().height()
+        print "[Addon-Manager] DESKTOPsize is",current_w,current_h
+        size_w = 650
+        size_h = 400
+
+        # calculate Skin koordinates
+        pos_w = (current_w - size_w)/2
+        pos_h = (current_h - size_h)/2
+
+        # set Skinvariables
+        self.dict = {
+				   'screen.size': "%i,%i"%(size_w,size_h),
+				   'screen.pos': "%i,%i"%(pos_w,pos_h),
+				   }
+
+        self.skin = applySkinVars(AddonConfigScreen.skin,self.dict)
+        Screen.__init__(self, session)
+        self.list = []
+        self.list.append(getConfigListEntry(_("Fontgroesse (10-22, 14=normal)"), config.AddonManager.Schriftart))
+        self.list.append(getConfigListEntry(_("Downloadserver waehlen (1=Primary 2=Secondary)"), config.AddonManager.which_server))
+        self.list.append(getConfigListEntry(_("Vorschau Einschalten (1=Ein, 0=Aus)"), config.AddonManager.preview_on))
+        self.list.append(getConfigListEntry(_("Wartezeit in msec fuer Vorschau"), config.AddonManager.preview_timeout))
+        self.list.append(getConfigListEntry(_("Installierte Plugins in Liste anzeigen (1=Ein, 0=Aus)"), config.AddonManager.marker_off))
+        self.list.append(getConfigListEntry(_("Installierte Plugins in Liste farbig markieren"), config.AddonManager.marker_on))
+        self.list.append(getConfigListEntry(_("Markierungsfarbe (0=rot, 1=gruen, 2=blau)"), config.AddonManager.mark_color))
+        self.list.append(getConfigListEntry(_("Installations Konsole am Bildschirm (0=Aus, 1=Ein)"), config.AddonManager.ungenau))
+
+        ConfigListScreen.__init__(self, self.list)
+        self["buttonred"] = Label(_("cancel"))
+        self["buttongreen"] = Label(_("ok"))
+        self["setupActions"] = ActionMap(["SetupActions"],
+        {
+            "green": self.save,
+            "red": self.cancel,
+            "save": self.save,
+            "cancel": self.cancel,
+            "ok": self.save,
+        }, -2)
+
+    def save(self):
+        global activesource, activenam
+        for x in self["config"].list:
+			      x[1].save()
+        config.save()
+        self.showpreview = config.AddonManager.preview_on.value
+        self.previewtimeout = config.AddonManager.preview_timeout.value
+        self.farbe = config.AddonManager.mark_color.value
+
+        if config.AddonManager.which_server.value == 1:
+		        activesource = "http://kati910.aaf-board.info/dbase"
+		        activenam = "Primary-Server"
+        else:
+		        activesource = "http://kati910.aaf-board.info/dbase"
+		        activenam = "Secondary-Server"
+        #restore()
+        self.close()
+
+    def cancel(self):
+        print "[Addon-Manager] cancel"
+        for x in self["config"].list:
+            x[1].cancel()
+        self.close(False)
+
+
+#-----------------------------------------------------------------
+class RestoreConfigScreenVU(ConfigListScreen,Screen):
+
+	def __init__(self, session):
+		self.session = session
+		Screen.__init__(self, session)
+		self.skin = RESTORE_CONFIG_SKIN
+		self.onShown.append(self.setWindowTitle)
+
+		RestoreYesNo = [('y',_("yes")),('n',_("no"))]
+		RestoreNoYes = [('n',_("no")),('y',_("yes"))]
+
+		config.RestoreConfig = ConfigSubsection()
+		config.RestoreConfig.settings_on = ConfigSelection(RestoreYesNo)
+		config.RestoreConfig.binarys_on = ConfigSelection(RestoreYesNo)
+		config.RestoreConfig.camconfig_on = ConfigSelection(RestoreYesNo)
+		config.RestoreConfig.plugins_on = ConfigSelection(RestoreNoYes)
+		config.RestoreConfig.network_on = ConfigSelection(RestoreYesNo)
+		config.RestoreConfig.samba_on = ConfigSelection(RestoreYesNo)
+		config.RestoreConfig.bilder_on = ConfigSelection(RestoreYesNo)
+		config.RestoreConfig.sonstige_on = ConfigSelection(RestoreYesNo)
+		config.RestoreConfig.am_on = ConfigSelection(RestoreNoYes)
+		config.RestoreConfig.backup_on = ConfigSelection(RestoreYesNo)
+
+		self.Clist = []
+		self.Clist.append(getConfigListEntry(_("Restore Settings"), config.AddonManager2.sett_on))
+		self.Clist.append(getConfigListEntry(_("Restore CamConfig"), config.AddonManager2.camconfig_on))
+		self.Clist.append(getConfigListEntry(_("Restore Plugins"), config.AddonManager2.plug_on))
+		self.Clist.append(getConfigListEntry(_("Restore Binarys"), config.AddonManager2.binarys_on))
+		self.Clist.append(getConfigListEntry(_("Restore Netzwerk"), config.AddonManager2.network_on))
+		self.Clist.append(getConfigListEntry(_("Restore Samba"), config.AddonManager2.samba_on))
+		self.Clist.append(getConfigListEntry(_("Restore Bootbilder"), config.AddonManager2.bilder_on))
+		self.Clist.append(getConfigListEntry(_("Restore sonstiges"), config.AddonManager2.sonstige_on))
+		self.Clist.append(getConfigListEntry(_("Restore AddonManager"), config.AddonManager2.am_on))
+		self.Clist.append(getConfigListEntry(_("mehrere Backup mit Datum zulassen"), config.AddonManager2.backup_on))
+
+		ConfigListScreen.__init__(self, self.Clist)
+
+		self["key_green"] = Label(_("save Settings"))
+		self["key_yellow"] = Label(_("Backup"))
+		self["key_red"] = Label(_("Restore"))
+		infotext = _('this Settings are allways copied in the Flash/USB installation!')
+		self["label1"] =  ScrollLabel()
+		self["label1"].setText(infotext)
+
+		self["setupActions"] = ActionMap(["OkCancelActions", "DirectionActions", "ColorActions"],
+		{
+			"green": self.save,
+			"save": self.save,
+			"red": self.restore,
+			"yellow": self.backup,
+			"cancel": self.cancel,
+			"ok": self.save,
+			"left": self.left,
+			"right": self.right,
+		}, -2)
+
+	def setWindowTitle(self):
+		self.setTitle(_("Backup / Restore Config"))
+
+	def left(self):
+		ConfigListScreen.keyLeft(self)
+
+	def right(self):
+		ConfigListScreen.keyRight(self)
+
+	def save(self):
+		for x in self["config"].list:
+				x[1].save()
+		config.save()
+		#config.RestoreConfig.save()
+		self.save_settings()
+		print "[AddonManager] RestoreConfig save"
+
+	def cancel(self):
+		print "[AddonManager] RestoreConfig cancel"
+		self.close()
+
+	def backup(self):
+		self.CpString = "/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/backup.sh"
+		self.session.open(Console, title = _("Backup - Settings"), cmdlist = ["%s" % self.CpString], closeOnSuccess = False)
+
+	def restore(self):
+		self.session.open(SelectRestore)
+
+	def save_settings(self):
+		ffile = open("/var/etc/restore.cfg", "w")
+		ffile.write('settings=' + config.AddonManager2.sett_on.value[0] + '\n' )
+		ffile.write('binarys=' + config.AddonManager2.binarys_on.value[0] + '\n')
+		ffile.write('camconfig=' + config.AddonManager2.camconfig_on.value[0] + '\n')
+		ffile.write('plugins=' + config.AddonManager2.plug_on.value[0] + '\n')
+		ffile.write('network=' + config.AddonManager2.network_on.value[0] + '\n')
+		ffile.write('samba=' + config.AddonManager2.samba_on.value[0] + '\n')
+		ffile.write('bilder=' + config.AddonManager2.bilder_on.value[0] + '\n')
+		ffile.write('sonstige=' + config.AddonManager2.sonstige_on.value[0] + '\n')
+		ffile.write('addonmanager=' + config.AddonManager2.am_on.value[0] + '\n')
+		ffile.write('backup=' + config.AddonManager2.backup_on.value[0] + '\n')
+		ffile.close()
+
+#-----------------------------------------------------------------
+
+class SelectRestore(ConfigListScreen,Screen):
+	def __init__(self, session):
+		font = "Regular;18"
+		self.skin = SELECTRESTORE_SKIN
+		Screen.__init__(self, session)
+
+		self["actions"] = ActionMap(["OkCancelActions", "DirectionActions", "ColorActions", "MovieSelectionActions"],
+		{
+			"ok": self.KeyOk,
+			"cancel": self.Exit,
+			"right": self.rightDown,
+			"left": self.leftUp,
+			"up": self.up,
+			"down": self.down,
+			"red": self.delete,
+			"green": self.KeyOk
+		}, -1)
+		self.search()
+
+		if not pathExists(self.currDir):
+			self.currDir = "/"
+
+		self.filelist = FileList(self.currTmp, showDirectories = True, isTop = True , useServiceRef = False)
+		self["filelist"] = self.filelist
+
+		self["aktion"] = StaticText()
+		self["filelist"].show()
+
+	def up(self):
+		self["filelist"].up()
+
+	def down(self):
+		self["filelist"].down()
+
+	def leftUp(self):
+		self["filelist"].pageUp()
+
+	def rightDown(self):
+		self["filelist"].pageDown()
+
+	def search(self):
+		os.system("rm -r /tmp/back")
+		os.system("mkdir -p /tmp/back")
+		self.currTmp = "/tmp/back"
+
+		if pathExists("/var/swap"):
+			self.currDir = "/var/swap"
+
+		if pathExists("/media/hdd"):
+			self.currDir = "/media/hdd"
+
+		if box == "dm8000":
+			CpString = "cd " + self.currDir + "; ls -A1d backup_vu* >/tmp/back/test"
+			os.system(CpString)
+			self.currBox = "backup_vu"
+		else:
+			CpString = "cd " + self.currDir + "; ls -A1d backup_fortis* >/tmp/back/test"
+			os.system(CpString)
+			self.currBox = "backup_fortis"
+
+		text = ""
+		file = open("/tmp/back/test", "r")
+		for line in file:
+			text = line.strip()
+			CpString = "touch /tmp/back/" + text
+			os.system(CpString)
+		file.close
+		os.system("rm /tmp/back/test")
+
+	def delete(self):
+		self.filename = None
+		self.filename = self.filelist.getFilename()
+		self.filename = self.currDir + "/" + self.filename
+		print "[AddonManager] Filename=", self.filename
+		message = "%s %s" % (_("\nDieses Backup loeschen?\n"), self.filename)
+		if box <> "dm8000":
+			evfd.getInstance().vfd_write_string("Delete Backup")
+		self.session.openWithCallback(self.delete_now, MessageBox, message, MessageBox.TYPE_YESNO)
+
+	def delete_now(self, answer):
+		if answer == True:
+			CpString = "rm -r " + self.filename
+			os.system(CpString)
+			self.search()
+			self["filelist"].refresh()
+
+	def KeyOk(self):
+		self.filename = None
+		self.filename = self.filelist.getFilename()
+		self.fullname = self.currDir + "/" + self.filename
+		print "[AddonManager] Select-Filename=", self.filename
+		self["filelist"].refresh()
+		self.CpString = "/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/restore.sh " + self.filename + " boot"
+		self.session.open(Console, title = _("Restore - Settings"), cmdlist = ["%s" % self.CpString], closeOnSuccess = False)
+
+
+	def Exit(self):
+		self.close()
+
+# -------------------------------------------------------------------
+class FilterPanelList(MenuList):
+	def __init__(self, list, font0 = 28, font1 = 16, itemHeight = 60, enableWrapAround = True):
+		MenuList.__init__(self, [], False, eListboxPythonMultiContent)
+		self.l.setFont(0, gFont("Regular", font0))
+		self.l.setFont(1, gFont("Regular", font1))
+		self.l.setItemHeight(itemHeight)
+
+# -------------------------------------------------------------------
+class FilterPanel(Screen, HelpableScreen):
+	def __init__(self, session, Filter):
+		self.session = session
+		self.skin = """
+			<screen name="FilterPanel" position="center,center" size="430,440" title="Filterauswahl" backgroundColor="#252525">
+				<widget name="Mlist" position="10,5" size="400,400" zPosition="3" backgroundColor="#252525"  backgroundColorSelected="#565656" scrollbarMode="showOnDemand" />
+
+				<eLabel position="0,410" zPosition="2" size="430,1" backgroundColor="#c1cdc1" />
+				<widget source="key_blue" render="Label" position="260,417" zPosition="2" size="200,30" font="Regular;20" valign="center" halign="left" transparent="1" />
+				<ePixmap position="200,420" size="36,20" pixmap="skin_default/buttons/key_blue.png" transparent="1" alphatest="on" />
+				<widget source="key_red" render="Label" position="80,417" zPosition="2" size="150,30" font="Regular;20" valign="center" halign="left" transparent="1" />
+				<ePixmap position="20,420" size="36,20" pixmap="skin_default/buttons/key_red.png" transparent="1" alphatest="on" />
+
+			</screen>"""
+
+		Screen.__init__(self, session)
+		self.Mlist = []
+
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('bootlogos'), _("bootlogos"), 'bootlogos')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('browsers'), _("browsers"), 'browsers')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('editors'), _("editors"), 'editors')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('emus'), _("emus"), 'emus')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('epg'), _("epg"), 'epg')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('fonts'), _("fonts"), 'fonts')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('games'), _("games"), 'games')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('infos'), _("infos"), 'infos')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('keymaps'), _("keymaps"), 'keymaps')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('mediacenter'), _("mediacenter"), 'mediacenter')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('picons'), _("picons"), 'picons')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('players'), _("players"), 'players')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('radiologos'), _("radiologos"), 'radiologos')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('settings'), _("settings"), 'settings')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('skins'), _("skins"), 'skins')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('spinner'), _("spinner"), 'spinner')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapbrowsers'), _("swapbrowsers"), 'swapbrowsers')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapeditors'), _("swapeditors"), 'swapeditors')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapemus'), _("swapemus"), 'swapemus')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapepg'), _("swapepg"), 'swapepg')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapgames'), _("swapgames"), 'swapgames')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapinfos'), _("swapinfos"), 'swapinfos')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapmediacenter'), _("swapmediacenter"), 'swapmediacenter')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapnetwork'), _("swapnetwork"), 'swapnetwork')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapplayers'), _("swapplayers"), 'swapplayers')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapscreensaver'), _("swapscreensaver"), 'swapscreensaver')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapskins'), _("swapskins"), 'swapskins')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('swapsystem'), _("swapsystem"), 'swapsystem')))
+		self.Mlist.append(self.FilterEntryItem((self.FilterEntryComponent('system'), _("system"), 'system')))
+
+		self.onChangedEntry = []
+		if (getDesktop(0).size().width() == 1280):
+				self["Mlist"] = FilterPanelList([], font0=24, font1=15, itemHeight=40)
+		else:
+				self["Mlist"] = FilterPanelList([], font0=24, font1=15, itemHeight=50)
+		self["Mlist"].l.setList(self.Mlist)
+		self["Mlist"].selectionEnabled(1)
+
+		self["key_blue"] = StaticText()
+		self["key_blue"].text = _("set Start")
+		self["key_red"] = StaticText()
+		self["key_red"].text = _("search")
+
+		HelpableScreen.__init__(self)
+		self["actions"] = HelpableActionMap(self, "AAFKeyActions",
+			{
+				"cancel": (self.Exit, "Beenden"),
+				"left": (self.left, "Seite hoch"),
+				"right": (self.right, "Seite runter"),
+				"up": (self.up, "Hoch"),
+				"down": (self.down, "Runter"),
+				"ok": (self.ok, "OK"),
+				"blue": (self.blue, "Blau"),
+				"red": (self.virtualKB, "Red"),
+			}, -2)
+
+	def up(self):
+		self["Mlist"].up()
+		self["Mlist"].selectionEnabled(1)
+
+	def down(self):
+		self["Mlist"].down()
+		self["Mlist"].selectionEnabled(1)
+
+	def left(self):
+		self["Mlist"].pageUp()
+
+	def right(self):
+		self["Mlist"].pageDown()
+
+	def Exit(self):
+		global menu
+		menu = "stop"
+		self.close()
+
+	def ok(self):
+		global menu
+		menu = self['Mlist'].l.getCurrentSelection()[0][2]
+		self.close()
+
+	def blue(self):
+		menu = self['Mlist'].l.getCurrentSelection()[0][2]
+		fwrite = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/startservice.cfg", "w")
+		fwrite.write(menu)
+		fwrite.close()
+		message = "%s %s" % (_("Dieser Filter wurde als Startfilter gesetzt!\n\n                       "), menu)
+		self.session.open( MessageBox, message, MessageBox.TYPE_INFO, timeout=5)
+
+
+	def FilterEntryComponent(self,file):
+		png = LoadPixmap("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/pics/" + file + ".png")
+		if png == None:
+			png = LoadPixmap("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/pics/info.png")
+		res = (png)
+		return res
+
+	def FilterEntryItem(self,entry):
+		rot = 16711680
+		gruen = 60928
+		dgruen = 52480
+		drot = 0xf47d19
+		mblau = 8900346
+		hblau = 11592447
+		dblau = 5215437
+		weiss = 0xffffff
+		orange = 0xf47d19
+		grau = 0x565656
+
+		res = [entry]
+		#	return (eListboxPythonMultiContent.TYPE_TEXT, pos[0], pos[1], size[0], size[1], font, flags, text, color, color_sel, backcolor, backcolor_sel, border_width, border_color)
+		res.append(MultiContentEntryPixmapAlphaTest(pos=(2, 5), size=(100, 50), png=entry[0]))  # png vorn
+		res.append(MultiContentEntryText(pos=(150, 15), size=(220, 35), font=0, text=entry[1], color=mblau, color_sel=mblau, backcolor_sel=grau))
+		return res
+
+	def virtualKB(self):
+			self.search = ""
+			self.session.openWithCallback(lambda x : self.VirtualKeyBoardCallback(x, ''), VirtualKeyBoard, title = (_("Suchstring eingeben:")), text = self.search)
+
+	def VirtualKeyBoardCallback(self, callback = None, entry = None):
+		global menu
+		if callback is not None and len(callback):
+			print "[AddonManager] virtual callback",str(callback)
+			menu = callback
+			self.close()
+
+
+#-----------------------------------------------------------------
+
+def tryOpen(filename):
+	try:
+		procFile = open(filename)
+	except IOError:
+		return ""
+	return procFile
+
+
+def main(session, **kwargs):
+   session.open(PLUGINDownload,"/tmp/usb")
Index: /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/ipkdownload
===================================================================
--- /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/ipkdownload	(revision 8656)
+++ /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/ipkdownload	(revision 8656)
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+rm /tmp/aaf/*
+
+#  cat Packages | grep Filename: | sed "s/Filename: enigma2-plugin-//" | sed "s/.ipk//" | sed "s/_sh4//" | sed "s/_/ V/" >> PlugList
+
+if [ -e /var/etc/ipkg/official-feed.conf ]; then
+  url="`cat /var/etc/ipkg/official-feed.conf | sed -e 's/src\/gz cross //'`"
+  echo "Flashimage"
+fi
+
+if [ -e /etc/ipkg/official-feed.conf ]; then
+  url="`cat /etc/ipkg/official-feed.conf | sed -e 's/src\/gz cross //'`"
+  echo "BA-Image"
+fi
+
+url=$url"/PlugList"
+echo $url
+
+wget -O /tmp/aaf/test $url
+
+# remove first 2 lines and last 2 lines
+cat /tmp/aaf/test| sed '1,2d'|sed '$d'|sed '$d'| sed -e 's/ V/_/' >/tmp/aaf/first.txt
+
+for i in /tmp/aaf/first.txt; do
+  	while read Zeile
+  	do
+       lines="$Zeile"
+       echo $lines"##enigma2-plugin-"$lines"_sh4.ipk" >>/tmp/aaf/index.txt
+   done < $i
+done
+
+#cat /tmp/aaf/index.txt
+
Index: /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/keymap.xml
===================================================================
--- /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/keymap.xml	(revision 8656)
+++ /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/keymap.xml	(revision 8656)
@@ -0,0 +1,42 @@
+<keymap>
+	<map context="AAFKeyActions">
+		<key id="KEY_UP" mapto="up" flags="m" />
+		<key id="KEY_DOWN" mapto="down" flags="m" />
+		<key id="KEY_LEFT" mapto="left" flags="m" />
+		<key id="KEY_RIGHT" mapto="right" flags="m" />
+
+		<key id="KEY_UP" mapto="upRepeated" flags="r" />
+		<key id="KEY_DOWN" mapto="downRepeated" flags="r" />
+		<key id="KEY_LEFT" mapto="leftRepeated" flags="r" />
+		<key id="KEY_RIGHT" mapto="rightRepeated" flags="r" />
+
+		<key id="KEY_RED" mapto="red" flags="m" />
+		<key id="KEY_GREEN" mapto="green" flags="m" />
+		<key id="KEY_YELLOW" mapto="yellow" flags="m" />
+		<key id="KEY_BLUE" mapto="blue" flags="m" />
+
+		<key id="KEY_1" mapto="1" flags="m" />
+		<key id="KEY_2" mapto="2" flags="m" />
+		<key id="KEY_3" mapto="3" flags="m" />
+		<key id="KEY_4" mapto="4" flags="m" />
+		<key id="KEY_5" mapto="5" flags="m" />
+		<key id="KEY_6" mapto="6" flags="m" />
+		<key id="KEY_7" mapto="7" flags="m" />
+		<key id="KEY_8" mapto="8" flags="m" />
+		<key id="KEY_9" mapto="9" flags="m" />
+		<key id="KEY_0" mapto="0" flags="m" />
+
+		<key id="KEY_CHANNELUP" mapto="chup" flags="mr" />
+		<key id="KEY_CHANNELDOWN" mapto="chdown" flags="mr" />
+
+		<key id="KEY_OK" mapto="ok" flags="m" />
+		<key id="KEY_PAGEUP" mapto="nextBouquet" flags="m" />
+		<key id="KEY_PAGEDOWN" mapto="prevBouquet" flags="m" />
+		<key id="KEY_TEXT" mapto="text" flags="m" />
+		<key id="KEY_MENU" mapto="menu" flags="m" />
+		<key id="KEY_EXIT" mapto="cancel" flags="m" />
+		<key id="KEY_HOME" mapto="cancel" flags="m" />
+		<key id="KEY_HELP" mapto="cancel" flags="m" />
+		<key id="\x1b" mapto="cancel" flags="m" />
+	</map>
+</keymap>
Index: /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/plugin.py
===================================================================
--- /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/plugin.py	(revision 8656)
+++ /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/plugin.py	(revision 8656)
@@ -0,0 +1,1725 @@
+from Plugins.Plugin import PluginDescriptor
+from Screens.PluginBrowser import *
+from Screens.ServiceInfo import ServiceInfoList, ServiceInfoListEntry
+from Components.SelectionList import SelectionList
+from Tools.Directories import resolveFilename, fileExists, pathExists, createDir, SCOPE_MEDIA
+from enigma import *
+from Screens.MessageBox import MessageBox
+from Screens.ChoiceBox import ChoiceBox
+from Screens.Screen import Screen
+from Components.ActionMap import ActionMap, NumberActionMap
+from Components.MenuList import MenuList
+from Components.Label import Label
+from Components.ScrollLabel import ScrollLabel
+from Components.Pixmap import Pixmap
+from Components.config import ConfigSubsection, ConfigText, getConfigListEntry, ConfigSelection,  ConfigIP, ConfigYesNo, ConfigSequence, ConfigNumber
+from Components.ConfigList import ConfigListScreen
+
+from Components.FileList import FileList
+from Components.Sources.StaticText import StaticText
+from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmapAlphaTest
+
+#import ServiceReference
+import os
+import sys
+import subprocess
+from subprocess import Popen,PIPE
+import ServiceReference
+import time
+import urllib
+
+# import py_compile
+# py_compile.compile("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/plugin.py")
+
+from Plugins.Extensions.AddonManager.downloader import *
+#from Plugins.Extensions.AddonManager.FileListBB import FileListBB
+
+config.AddonManager = ConfigSubsection()
+config.AddonManager.which_server = ConfigInteger(1, limits=(1, 2))
+config.AddonManager.preview_timeout = ConfigInteger(default=600,limits=(50, 2000))
+config.AddonManager.preview_on = ConfigInteger(1, limits=(0, 1))
+config.AddonManager.marker_on = ConfigInteger(1, limits=(0, 1))
+config.AddonManager.marker_off = ConfigInteger(1, limits=(0, 1))
+config.AddonManager.mark_color = ConfigInteger(1, limits=(0, 2))
+config.AddonManager.ungenau = ConfigInteger(0, limits=(0, 1))
+config.AddonManager.Schriftart = ConfigInteger(14, limits=(10, 22))
+config.AddonManager.ba_settings_on = ConfigInteger(1, limits=(0, 1))
+config.AddonManager.ba_plugins_on = ConfigInteger(0, limits=(0, 1))
+config.AddonManager.ba_skins_on = ConfigInteger(0, limits=(0, 1))
+config.AddonManager.ba_remove_on = ConfigInteger(0, limits=(0, 1))
+config.AddonManager.ba_usersettings_on = ConfigInteger(0, limits=(0, 1))
+
+
+global version
+global menu
+
+AAF_Panel_Version = 'Addon Manager ' + version
+
+def main(session, **kwargs):
+		file = open("/proc/stb/info/model", "r")
+		box = file.readline().strip()
+		file.close()
+		if box <> "dm8000":
+			evfd.getInstance().vfd_write_string(AAF_Panel_Version)
+		session.open(Addonpanel)
+
+def Apanel(menuid, **kwargs):
+	if menuid == "mainmenu":
+		return [("Addon-Manager", main, "Addonpanel", None)]
+	else:
+		return []
+
+def Plugins(**kwargs):
+	return [ PluginDescriptor(name="Addon-Manager", description="Addonpanel AAF-Enigma2 07/11/2010", where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc = main) ]
+
+font = "Regular;18"
+
+def applySkinVars(skin,dict):
+    for key in dict.keys():
+        try:
+            skin = skin.replace('{'+key+'}',dict[key])
+        except Exception,e:
+            print e,"@key=",key
+    return skin
+
+
+# -------------------------------------------------------------------
+class CenterList(MenuList):
+	def __init__(self):
+			MenuList.__init__(self, [], True, eListboxPythonMultiContent)
+			self.l.setItemHeight(25)
+			self.l.setFont(0, gFont('Regular', 20))
+
+
+class PanelList(MenuList):
+	def __init__(self, list, font0 = 24, font1 = 16, itemHeight = 50, enableWrapAround = True):
+		MenuList.__init__(self, list, enableWrapAround, eListboxPythonMultiContent)
+		self.l.setFont(0, gFont("Regular", font0))
+		self.l.setFont(1, gFont("Regular", font1))
+		self.l.setItemHeight(itemHeight)
+
+def MenuEntryItem(entry):
+	res = [entry]
+	res.append(MultiContentEntryPixmapAlphaTest(pos=(2, 5), size=(100, 40), png=entry[0]))  # png vorn
+	res.append(MultiContentEntryText(pos=(110, 10), size=(440, 40), font=0, text=entry[1]))  # menupunkt
+#	res.append(MultiContentEntryText(pos=(10, 29), size=(340, 14), font=1, text=entry[2])) # menubeschreibung
+	return res
+
+
+def AafEntryComponent(file):
+	png = LoadPixmap("/usr/lib/enigma2/python/Plugins/Extensions/Aafpanel/pics/" + file + ".png")
+	if png == None:
+		png = LoadPixmap("/usr/lib/enigma2/python/Plugins/Extensions/Aafpanel/pics/default.png")
+	res = (png)
+	return res
+
+# -------------------------------------------------------------------
+class Addonpanel(Screen):
+	skin = """
+	<screen name="Addonpanel" position="center,center" size="550, 370" title="Addonpanel">
+		<widget name="Mlist" position="10,10" size="530, 350" scrollbarMode="showOnDemand" enableWrapAround="1" transparent="1" />
+		<widget name="key_red" position="120,5" zPosition="1" size="75,33" font="Regular;12" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />
+		<widget name="key_green" position="195,5" zPosition="1" size="75,33" font="Regular;12" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
+		<widget name="key_yellow" position="270,5" zPosition="1" size="75,33" font="Regular;12" halign="center" valign="center" backgroundColor="#a08500" transparent="1" />
+		<widget name="key_blue" position="345,5" zPosition="1" size="75,33" font="Regular;12" halign="center" valign="center" backgroundColor="#18188b" transparent="1" />
+		<widget name="label1" position="121,287" size="200,20" font="Regular;20" transparent="1" foregroundColor="#f2e000" halign="center" />
+	</screen>"""
+
+#-- Start HD skin detection BB
+	def __init__(self, session, services = None):
+		if os.path.exists("/var/baroot/.multipart") is True:
+			self.BAtyp = "new"
+		if os.path.exists("/UFS_Images") is True:
+			self.BAtyp = "old"
+
+		#switch automatic to current skin
+		current_w = getDesktop(0).size().width()
+		current_h = getDesktop(0).size().height()
+		print "DESKTOPsize is",current_w,current_h
+
+		# define the start koordinates and size
+		if current_w == 1280:
+				pos_w = 421
+				pos_h = 200
+		else:
+				pos_w = 141
+				pos_h = 128
+
+		# set Skinvariables
+		self.dict = {
+				'font': font,
+				'screen.pos': "%i,%i"%(pos_w,pos_h),
+				}
+		self.skin = applySkinVars(Addonpanel.skin,self.dict)
+#-- Ende HD skin detection BB
+
+		self.service = None
+		global skin
+		global servicelist
+		if services is not None:
+			servicelist = services
+		else:
+			servicelist = None
+
+		self.list = []
+
+		Screen.__init__(self, session)
+		self.Mlist = []
+
+# --  changeg by bb for the new png-menu ----------------------------------------------------------
+		self.Mlist.append(MenuEntryItem((AafEntryComponent('Download Manager'), _("Download Manager"), 'Download Manager')))
+		self.Mlist.append(MenuEntryItem((AafEntryComponent('Install from tmp'), _("Install from tmp"), 'Install from tmp')))
+		self.Mlist.append(MenuEntryItem((AafEntryComponent('Uninstall Plugins'), _("Uninstall Plugins"), 'Uninstall Plugins')))
+		self.Mlist.append(MenuEntryItem((AafEntryComponent('Update Addon-Manager'), _("Update Addon-Manager"), 'Update Addon-Manager')))
+		#self.Mlist.append(MenuEntryItem((AafEntryComponent('BA-Image Manager'), _("BA-Image Manager"), 'BA-Image Manager')))
+		if (getDesktop(0).size().width() == 1280):
+				self["Mlist"] = PanelList([], font0 = 24, font1 = 15, itemHeight = 50)
+		else:
+				self["Mlist"] = PanelList([])
+				self["Mlist"] = PanelList([], font0 = 24, font1 = 15, itemHeight = 50)
+
+		self["Mlist"].l.setList(self.Mlist)
+		menu = 0
+
+		file = open("/proc/stb/info/model", "r")
+		box = file.readline().strip()
+		file.close()
+		if box <> "dm8000":
+				evfd.getInstance().vfd_write_string( self['Mlist'].l.getCurrentSelection()[0][1] )
+
+		self["key_green"] = Label(" ")
+		self["key_red"] = Label(" ")
+		self["key_yellow"] = Label(" ")
+		self["key_blue"] = Label(" ")
+		self["label1"] = Label(" ")
+
+		global menu
+		menu = 0
+
+		#// get the remote buttons
+		self["actions"] = ActionMap(["OkCancelActions", "DirectionActions", "ColorActions"],
+		{
+			"cancel": self.Exit,
+			"left": self.left,
+			"right": self.right,
+			"up": self.up,
+			"down": self.down,
+			"ok": self.ok,
+			#"blue": self.blue,
+			"blue": self.check_update,
+			"red": self.Red,
+			"green": self.Green,
+			"yellow": self.yellow,
+		}, 1)
+
+	def up(self):
+		self["Mlist"].up()
+		file = open("/proc/stb/info/model", "r")
+		box = file.readline().strip()
+		file.close()
+		if box <> "dm8000":
+				evfd.getInstance().vfd_write_string( self['Mlist'].l.getCurrentSelection()[0][1] )
+
+
+	def down(self):
+		self["Mlist"].down()
+		file = open("/proc/stb/info/model", "r")
+		box = file.readline().strip()
+		file.close()
+		if box <> "dm8000":
+				evfd.getInstance().vfd_write_string( self['Mlist'].l.getCurrentSelection()[0][1] )
+
+	def left(self):
+		pass
+
+	def right(self):
+		pass
+		
+	def Red(self):
+		pass
+
+	def Green(self):
+		#// Not used
+		pass
+		
+	def yellow(self):
+		pass
+
+	def blue(self):
+		#// Not used
+		pass
+
+	def check_update(self):
+		versurl = activesource + "/version_e2.txt"
+		h = urllib.urlretrieve(versurl, "/tmp/version_e2.txt")
+		dummy = open("/tmp/version_e2.txt").read()
+		version_server = dummy[0:len(dummy) -2]
+		if version_server == version:
+			print "gleich"
+			message = "%s %s\n%s %s\n\n%s" % (_("Version am Server:"), version_server, _("Version in der Box:"), version, _("Ein Update ist nicht erforderlich!"))
+			self.session.open( MessageBox, message, MessageBox.TYPE_INFO)
+		else:
+			if version_server > version:
+				message = "%s %s\n%s %s\n\n%s" % (_("Version am Server:"), version_server, _("Version in der Box:"), version, _("Ein Update ist empfehlenswert!"))
+				self.session.openWithCallback(self.update_now2, MessageBox, message, MessageBox.TYPE_YESNO)
+			else:
+				message = "%s %s\n%s %s\n\n%s" % (_("\nKlingt wie ein Scherz, aber die Version am Server ist aelter als die auf ihrer Box!\n\nVersion am Server:"), version_server, _("Version in der Box:"), version, _("NICHT UPDATEN, sie besitzen vermutlich eine fortgeschrittene Betaversion!"))
+				self.session.openWithCallback(self.update_now2, MessageBox, message, MessageBox.TYPE_YESNO)
+
+	def update_now2(self, answer):
+		if answer == True:
+			versurl = activesource + "/addon-man_e2.tar.gz"
+			h = urllib.urlretrieve(versurl, "/tmp/aaf/addon-man_e2.tar.gz")
+			os.system("cd /tmp/aaf; tar -xzf addon-man_e2.tar.gz")
+			if os.path.exists("/tmp/aaf/addon-man_e2.tar.gz") is True:
+				os.system("cp -RP /tmp/aaf/* / ; sync")
+				os.system("rm -r /tmp/aaf")
+				os.system("cd / ; rm *tar.gz")
+				os.system("mkdir /tmp/aaf")
+				message = "%s" % (_("Der Addon-Manager hat einen Neustart angefordert!\nDie Box wird nun neu gestartet!"))
+				self.session.open( MessageBox, message, MessageBox.TYPE_INFO)
+				TryQuitMainloop(self.session,2)
+
+
+	def Exit(self):
+		#// Exit Aafpanel when pressing the EXIT button or go back to the MainMenu
+		self.service = self.session.nav.getCurrentlyPlayingServiceReference()
+		service = self.service.toCompareString()
+		servicename = ServiceReference.ServiceReference(service).getServiceName().replace('\xc2\x87', '').replace('\xc2\x86', '').ljust(16)
+		file = open("/proc/stb/info/model", "r")
+		box = file.readline().strip()
+		file.close()
+		if box <> "dm8000":
+			evfd.getInstance().vfd_write_string( servicename )
+		self.close()
+
+	def ok(self):
+		#// Menu Selection
+#		menu = self["Mlist"].getCurrent()
+#		global AAFCONF
+		menu = self['Mlist'].l.getCurrentSelection()[0][2]
+		if menu == "Download Manager":
+			self.session.open(PLUGINDownload,"/tmp/usb")
+		elif menu == "Uninstall Plugins":
+			self.session.open(FileBrowse)
+		elif menu == "Install from tmp":
+			self.session.open(TmpBrowse)	
+		elif menu == "Update Addon-Manager":
+			self.check_update()
+		elif menu == "BA-Image Manager":
+			self.session.open(DelImage)
+		else:
+			pass
+
+#------------------------------------------------------------------------------------------
+#------------------------------------------------------------------------------------------
+class FileBrowse(Screen):
+	LIST_FILE = 1
+	LIST_IPK = 2
+	rebootflag = False
+
+	skin = """
+		<screen position="{screen.pos}" size="{screen.size}" title="Uninstall AAF Plugins" >
+			<ePixmap position="{logo.pos}" size="70,53" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/picon_default.png" transparent="1" alphatest="on" />
+			<ePixmap position="{red_led.pos}" size="36,20" pixmap="skin_default/buttons/key_red.png" transparent="1" alphatest="on" />
+			<ePixmap position="{green_led.pos}" size="36,20" pixmap="skin_default/buttons/key_green.png" transparent="1" alphatest="on" />
+			<eLabel text="UNINSTALL" position="{label.pos}" size="240,35" font="Regular;30" foregroundColor="#ffa323" transparent="1" />
+			<eLabel text="Tar-Files" position="{red.pos}" size="240,25" font="Regular;20" transparent="1" />
+			<eLabel text="IPK-Files" position="{green.pos}" size="240,25" font="Regular;20" transparent="1" />
+			<widget name="filelist" position="{list.pos}" size="{list.size}" scrollbarMode="showOnDemand" />
+			<widget name="ipklist" position="{list.pos}" size="{list.size}" scrollbarMode="showOnDemand" />
+			<widget source="global.CurrentTime" render="Label" position="{date.pos}" size="90,23" font="Regular;18" halign="left" valign="top" foregroundColor="#3366ff" transparent="1">
+				<convert type="ClockToText">Format:%d.%m.%Y</convert>
+			</widget>
+			<widget source="global.CurrentTime" render="Label" position="{time.pos}" size="90,23" font="Regular;18" halign="left" valign="top" foregroundColor="#3366ff" transparent="1">
+				<convert type="ClockToText">Format:%H:%M:%S</convert>
+			</widget>
+		</screen>"""
+
+	def __init__(self, session):
+		#switch automatic to current skin
+		current_w = getDesktop(0).size().width()
+		current_h = getDesktop(0).size().height()
+		print "DESKTOPsize is",current_w,current_h
+
+		# define the start koordinates and size
+		if current_w == 1280:
+				size_w = 720
+				size_h = 376
+		else:
+				size_w = 520
+				size_h = 376
+
+		# calculate Skin koordinates
+		font = "Regular;18"
+		pos_w = (current_w - size_w)/2
+		pos_h = (current_h - size_h)/2
+		list_w = size_w - 20
+		list_pos = (size_w - list_w)/2
+		red_pos = size_w/2 - 130
+		green_pos = size_w/2 + 50
+		red_led_pos = red_pos - 40
+		green_led_pos = green_pos - 40
+		label_pos = size_w/2 -90
+		logo_pos = size_w -75
+		date_pos = red_led_pos
+		time_pos = green_pos
+
+		# set Skinvariables
+		self.dict = {
+				'font': font,
+				'list.size': "%i,232"%(list_w),
+				'list.pos': "%i,110"%(list_pos),
+				'screen.size': "%i,%i"%(size_w,size_h),
+				'screen.pos': "%i,%i"%(pos_w,pos_h),
+				'red.pos': "%i,57"%(red_pos),
+				'green.pos': "%i,57"%(green_pos),
+				'red_led.pos': "%i,57"%(red_led_pos),
+				'green_led.pos': "%i,57"%(green_led_pos),
+				'label.pos': "%i,12"%(label_pos),
+				'logo.pos': "%i,0"%(logo_pos),
+				'date.pos': "%i,360"%(date_pos),
+				'time.pos': "%i,360"%(time_pos),
+				}
+
+		self.skin = applySkinVars(FileBrowse.skin,self.dict)
+		Screen.__init__(self, session)
+
+		self.focus = None
+		
+		self["actions"] = ActionMap(["OkCancelActions", "DirectionActions", "ColorActions", "MovieSelectionActions"],
+		{
+			"ok": self.KeyOk,
+			"cancel": self.Exit,
+			"right": self.rightDown,
+			"left": self.leftUp,
+			"up": self.up,
+			"down": self.down,
+			"red": self.plugin_remove,
+			"green": self.ipk_remove
+		}, -1)
+
+		self.SearchPattern = "(?i)^.*\.(sh|postrm)"
+		self.currDir = "/usr/lib/ipkg/info/"
+		if not pathExists(self.currDir):
+			self.currDir = "/"
+
+		self.ipklist = []
+		self.filelist = []
+		
+		self.ipklist = FileList(self.currDir, showDirectories = False, isTop = True, matchingPattern = self.SearchPattern)
+		self["ipklist"] = self.ipklist
+
+		self.currDir = "/var/etc/uninst/"
+		if not pathExists(self.currDir):
+			self.currDir = "/"
+
+		self.filelist = FileList(self.currDir, showDirectories = False, isTop = True, matchingPattern = self.SearchPattern)
+		self["filelist"] = self.filelist
+
+		self["ipklist"].hide()
+		self["filelist"].show()
+		
+		#set the focus to the primary filelist
+		self.focus = self.LIST_FILE
+
+	def up(self):
+		if self.focus is self.LIST_FILE:
+			self["filelist"].up()
+		if self.focus is self.LIST_IPK:
+			self["ipklist"].up()
+
+	def down(self):
+		if self.focus is self.LIST_FILE:
+			self["filelist"].down()
+		if self.focus is self.LIST_IPK:
+			self["ipklist"].down()
+
+	def leftUp(self):
+		if self.focus is self.LIST_FILE:
+			self["filelist"].pageUp()
+		if self.focus is self.LIST_IPK:
+			self["ipklist"].pageUp()
+		
+	def rightDown(self):
+		if self.focus is self.LIST_FILE:
+			self["filelist"].pageDown()
+		if self.focus is self.LIST_IPK:
+			self["ipklist"].pageDown()
+
+	def plugin_remove(self):
+		self["ipklist"].hide()
+		self["filelist"].show()
+		self.focus = self.LIST_FILE
+
+	def ipk_remove(self):
+		self["filelist"].hide()
+		self["ipklist"].show()
+		self.focus = self.LIST_IPK
+
+	def KeyOk(self):
+		# call the uninstall-Script with subprocess or with os.system
+		message = "%s" % (_("Sind sie sicher das Plugin zu loeschen?"))
+		self.session.openWithCallback(self.list_remove, MessageBox, message, MessageBox.TYPE_YESNO)
+
+	def list_remove(self, answer):
+		if answer == True:
+			if self.focus is self.LIST_IPK:
+				self.currDir = "/usr/lib/ipkg/info/"
+				self.filename = self.ipklist.getFilename()
+				self.fullfile = self.currDir + self.filename
+				ipkpack = self.filename.split(".")
+
+				#Check for reboot
+				if fileExists(self.fullfile):
+					rebootcontent = open(self.fullfile, "r").read()
+					pos = rebootcontent.find("reboot")
+					if pos > 0:
+							self.rebootflag = True
+							inhalt = rebootcontent[pos:pos+9]
+							rebootcontent = rebootcontent.replace(u"reboot","#reboot")
+							g = open(self.fullfile, "w")
+							g.write(rebootcontent)
+							g.close()
+
+			 	argument="remove " + ipkpack[0] + "*"
+			 	os.system("ipkg %s" % argument)
+			 
+			if self.focus is self.LIST_FILE:
+			 self.currDir = "/var/etc/uninst/"
+			 self.filename = self.filelist.getFilename()
+			 self.fullfile = self.currDir + self.filename
+			 cmd=[self.fullfile]
+			 #subprocess.call(cmd)
+			 os.system("%s" % self.fullfile)
+
+		self["filelist"].refresh()
+		self["ipklist"].refresh()
+
+	def Exit(self):
+		if self.rebootflag:
+			#self["statusbar"].text = _("rebooting...")
+			message = "%s" % (_("Ein Plugin hat einen Neustart angefordert!\nDie Box wird nun rebootet!"))
+			self.session.open( MessageBox, message, MessageBox.TYPE_INFO)
+			TryQuitMainloop(self.session,2)
+		self.close()
+#------------------------------------------------------------------------------------------
+#------------------------------------------------------------------------------------------
+#------------------------------------------------------------------------------------------
+class TmpBrowse(Screen):
+	LIST_FILE = 1
+	LIST_IPK = 2
+
+	skin = """
+		<screen position="{screen.pos}" size="{screen.size}" title="Install AAF Plugins aus tmp" >
+			<ePixmap position="{logo.pos}" size="70,53" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/picon_default.png" transparent="1" alphatest="on" />
+			<ePixmap position="{red_led.pos}" size="36,20" pixmap="skin_default/buttons/key_red.png" transparent="1" alphatest="on" />
+			<ePixmap position="{green_led.pos}" size="36,20" pixmap="skin_default/buttons/key_green.png" transparent="1" alphatest="on" />
+			<eLabel text="INSTALL-TMP" position="{label.pos}" size="240,35" font="Regular;30" foregroundColor="#ffa323" transparent="1" />
+			<eLabel text="Tar-Files" position="{red.pos}" size="240,25" font="Regular;20" transparent="1" />
+			<eLabel text="IPK-Files" position="{green.pos}" size="240,25" font="Regular;20" transparent="1" />
+			<widget name="filelist" position="{list.pos}" size="{list.size}" scrollbarMode="showOnDemand" />
+			<widget name="ipklist" position="{list.pos}" size="{list.size}" scrollbarMode="showOnDemand" />
+			<widget source="global.CurrentTime" render="Label" position="{date.pos}" size="90,23" font="Regular;18" halign="left" valign="top" foregroundColor="#3366ff" transparent="1">
+				<convert type="ClockToText">Format:%d.%m.%Y</convert>
+			</widget>
+			<widget source="global.CurrentTime" render="Label" position="{time.pos}" size="90,23" font="Regular;18" halign="left" valign="top" foregroundColor="#3366ff" transparent="1">
+				<convert type="ClockToText">Format:%H:%M:%S</convert>
+			</widget>
+		</screen>"""
+
+	def __init__(self, session):
+		#switch automatic to current skin
+		current_w = getDesktop(0).size().width()
+		current_h = getDesktop(0).size().height()
+		print "DESKTOPsize is",current_w,current_h
+
+		# define the start koordinates and size
+		if current_w == 1280:
+				size_w = 720
+				size_h = 376
+		else:
+				size_w = 520
+				size_h = 376
+
+		# calculate Skin koordinates
+		font = "Regular;18"
+		pos_w = (current_w - size_w)/2
+		pos_h = (current_h - size_h)/2
+		list_w = size_w - 20
+		list_pos = (size_w - list_w)/2
+		red_pos = size_w/2 - 130
+		green_pos = size_w/2 + 50
+		red_led_pos = red_pos - 40
+		green_led_pos = green_pos - 40
+		label_pos = size_w/2 -90
+		logo_pos = size_w -75
+		date_pos = red_led_pos
+		time_pos = green_pos
+
+		# set Skinvariables
+		self.dict = {
+				'font': font,
+				'list.size': "%i,232"%(list_w),
+				'list.pos': "%i,110"%(list_pos),
+				'screen.size': "%i,%i"%(size_w,size_h),
+				'screen.pos': "%i,%i"%(pos_w,pos_h),
+				'red.pos': "%i,57"%(red_pos),
+				'green.pos': "%i,57"%(green_pos),
+				'red_led.pos': "%i,57"%(red_led_pos),
+				'green_led.pos': "%i,57"%(green_led_pos),
+				'label.pos': "%i,12"%(label_pos),
+				'logo.pos': "%i,0"%(logo_pos),
+				'date.pos': "%i,360"%(date_pos),
+				'time.pos': "%i,360"%(time_pos),
+				}
+
+		self.skin = applySkinVars(TmpBrowse.skin,self.dict)
+		Screen.__init__(self, session)
+
+		self.focus = None
+		
+		self["actions"] = ActionMap(["OkCancelActions", "DirectionActions", "ColorActions", "MovieSelectionActions"],
+		{
+			"ok": self.KeyOk,
+			"cancel": self.Exit,
+			"right": self.rightDown,
+			"left": self.leftUp,
+			"up": self.up,
+			"down": self.down,
+			"red": self.plugin_remove,
+			"green": self.ipk_remove,
+			"yellow": self.ipk_remove
+		}, -1)
+
+		self.SearchPattern = "(?i)^.*\.(ipk)"
+		self.currDir = "/tmp/"
+		if not pathExists(self.currDir):
+			self.currDir = "/"
+
+		self.ipklist = FileList(self.currDir, showDirectories = False, isTop = True, matchingPattern = self.SearchPattern)
+		self["ipklist"] = self.ipklist
+
+
+		self.SearchPattern = "(?i)^.*\.(gz|tgz)"
+		self.currDir = "/tmp/"
+		if not pathExists(self.currDir):
+			self.currDir = "/"
+
+		self.filelist = FileList(self.currDir, showDirectories = False, isTop = True, matchingPattern = self.SearchPattern)
+		self["filelist"] = self.filelist
+		
+		self["aktion"] = StaticText()
+#		self["ausschrift"] = Pixmap()
+		self["ipklist"].hide()
+		self["filelist"].show()
+#		self["ausschrift"].hide()
+		self["aktion"].text = "Install TAR"
+#		self["ausschrift"].text = "Install is running"
+		
+		#set the focus to the primary filelist
+		self.focus = self.LIST_FILE
+
+	def up(self):
+		if self.focus is self.LIST_FILE:
+			self["filelist"].up()
+		if self.focus is self.LIST_IPK:
+			self["ipklist"].up()
+
+	def down(self):
+		if self.focus is self.LIST_FILE:
+			self["filelist"].down()
+		if self.focus is self.LIST_IPK:
+			self["ipklist"].down()
+
+	def leftUp(self):
+		if self.focus is self.LIST_FILE:
+			self["filelist"].pageUp()
+		if self.focus is self.LIST_IPK:
+			self["ipklist"].pageUp()
+		
+	def rightDown(self):
+		if self.focus is self.LIST_FILE:
+			self["filelist"].pageDown()
+		if self.focus is self.LIST_IPK:
+			self["ipklist"].pageDown()
+
+	def plugin_remove(self):
+		self["ipklist"].hide()
+		self["aktion"].text = "Install TAR"
+		self["filelist"].show()
+		self.focus = self.LIST_FILE
+
+	def ipk_remove(self):
+		self["filelist"].hide()
+		self["aktion"].text = "Install IPK"
+		self["ipklist"].show()
+		self.focus = self.LIST_IPK
+
+	def KeyOk(self):
+		# call the uninstall-Script with subprocess or with os.system
+		self.filename = None
+		if self.focus is self.LIST_FILE:
+			self.filename = self.filelist.getFilename()
+			if self.filename is not None:
+				self["filelist"].hide()
+#				self["ausschrift"].show()
+				self.fullfile = self.currDir + self.filename
+				os.system("mkdir /tmp/AAFInst")
+				os.system("cd /tmp/AAFInst; tar -xzf  %s" % self.fullfile)
+				if os.path.exists("/tmp/AAFInst/inst.sh") is True:
+					os.system("cd /tmp/AAFInst; ./inst.sh" )
+				else:
+					os.system("cp -RP /tmp/AAFInst/* / ; sync")
+					os.system("rm -r /tmp/AAFInst")
+				self["filelist"].show()
+#				self["ausschrift"].hide()	
+		
+		if self.focus is self.LIST_IPK:
+			self.filename = self.ipklist.getFilename()
+			if self.filename is not None:
+				self["ipklist"].hide()
+#				self["ausschrift"].show()
+				self.fullfile = self.currDir + self.filename
+				cmd=["ipkg", "install", self.fullfile] 
+				subprocess.call(cmd)
+				self["ipklist"].show()
+#				self["ausschrift"].hide()	
+					
+		if self.filename is not None:
+			cmd=["rm", self.fullfile]
+			subprocess.call(cmd)
+			cmd=["sync"]
+			subprocess.call(cmd)
+			self["filelist"].refresh()
+			self["ipklist"].refresh()
+			#self.close()
+
+	def Exit(self):
+		self.close()
+
+#------------------------------------------------------------------------------------------
+#------------------------------------------------------------------------------------------
+# import py_compile
+# py_compile.compile("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/plugin.py")
+
+
+class DelImage(Screen):
+	LIST_FILE = 1
+	LIST_IPK = 2
+	LIST_DEVICE = 3
+	rebootflag = False
+
+	skin = """
+		<screen position="{screen.pos}" size="{screen.size}" title="BA-Images" >
+			<ePixmap position="{logo.pos}" size="70,53" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/picon_default.png" transparent="1" alphatest="on" />
+			<ePixmap position="{red_led.pos}" size="36,23" pixmap="skin_default/buttons/key_red.png" transparent="1" alphatest="on" />
+			<ePixmap position="{green_led.pos}" size="36,23" pixmap="skin_default/buttons/key_green.png" transparent="1" alphatest="on" />
+			<ePixmap position="{yellow_led.pos}" size="36,23" pixmap="skin_default/buttons/key_yellow.png" transparent="1" alphatest="on" />
+			<ePixmap position="{blue_led.pos}" size="36,23" pixmap="skin_default/buttons/key_blue.png" transparent="1" alphatest="on" />
+
+			<ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/satlogo.png" position="20,95" size="100,300" alphatest="on" />
+
+			<eLabel text="Select" position="{red.pos}" size="240,25" font="Regular;20" transparent="1" />
+			<eLabel text="Install" position="{green.pos}" size="240,25" font="Regular;20" transparent="1" />
+			<eLabel text="Settings-copy" position="{yellow.pos}" size="240,25" font="Regular;20" transparent="1" />
+			<eLabel text="Delete" position="{blue.pos}" size="240,25" font="Regular;20" transparent="1" />
+			<widget name="filelist" position="{list.pos}" size="{list.size}" scrollbarMode="showOnDemand" />
+			<widget name="ipklist" position="{list.pos}" size="{list.size}" scrollbarMode="showOnDemand" />
+			<widget name="devicelist" position="{list.pos}" size="{list.size}" scrollbarMode="showOnDemand" />
+			<widget source="statusbar" render="Label" position="10,310" size="490,25" font="Regular;22" foregroundColor="#ffa323" />
+			<widget source="textbar" render="Label" position="{label.pos}" size="240,35" font="Regular;30" foregroundColor="#ffa323" transparent="1" />
+
+			<widget source="global.CurrentTime" render="Label" position="{date.pos}" size="90,23" font="Regular;18" halign="left" valign="top" foregroundColor="#3366ff" transparent="1">
+				<convert type="ClockToText">Format:%d.%m.%Y</convert>
+			</widget>
+			<widget source="global.CurrentTime" render="Label" position="{time.pos}" size="90,23" font="Regular;18" halign="left" valign="top" foregroundColor="#3366ff" transparent="1">
+				<convert type="ClockToText">Format:%H:%M:%S</convert>
+			</widget>
+		</screen>"""
+
+	#<eLabel text="BA - Images" position="{label.pos}" size="240,35" font="Regular;30" foregroundColor="#ffa323" transparent="1" />
+	def __init__(self, session):
+		#switch automatic to current skin
+		current_w = getDesktop(0).size().width()
+		current_h = getDesktop(0).size().height()
+		print "DESKTOPsize is",current_w,current_h
+
+		# define the start koordinates and size
+		if current_w == 1280:
+				size_w = 720
+				size_h = 376
+		else:
+				size_w = 520
+				size_h = 376
+
+		# calculate Skin koordinates
+		font = "Regular;18"
+		pos_w = (current_w - size_w)/2
+		pos_h = (current_h - size_h)/2
+		list_w = size_w - 200
+		list_pos = 150
+		red_pos = size_w/4 - 80
+		green_pos = size_w/4 + 35
+		yellow_pos = size_w/4 + 145
+		blue_pos = size_w/4 + 320
+
+		red_led_pos = red_pos - 35
+		green_led_pos = green_pos - 35
+		yellow_led_pos = yellow_pos - 35
+		blue_led_pos = blue_pos - 35
+		label_pos = size_w/2 -90
+		logo_pos = size_w -92
+		date_pos = size_w/2 - 100
+		time_pos = size_w/2 + 50
+
+		# set Skinvariables
+		self.dict = {
+				'font': font,
+				'list.size': "%i,232"%(list_w),
+				'list.pos': "%i,90"%(list_pos),
+				'screen.size': "%i,%i"%(size_w,size_h),
+				'screen.pos': "%i,%i"%(pos_w,pos_h),
+				'red.pos': "%i,53"%(red_pos),
+				'green.pos': "%i,53"%(green_pos),
+				'blue.pos': "%i,53"%(blue_pos),
+				'yellow.pos': "%i,53"%(yellow_pos),
+				'red_led.pos': "%i,53"%(red_led_pos),
+				'green_led.pos': "%i,53"%(green_led_pos),
+				'yellow_led.pos': "%i,53"%(yellow_led_pos),
+				'blue_led.pos': "%i,53"%(blue_led_pos),
+				'label.pos': "%i,12"%(label_pos),
+				'logo.pos': "%i,295"%(logo_pos),
+				'date.pos': "%i,355"%(date_pos),
+				'time.pos': "%i,355"%(time_pos),
+				}
+
+		self.skin = applySkinVars(DelImage.skin,self.dict)
+		Screen.__init__(self, session)
+
+		self["statusbar"] = StaticText()
+		self["textbar"] = StaticText()
+		self.focus = None
+		self["textbar"].text = _("Image-Select")
+		self["actions"] = ActionMap(["OkCancelActions", "DirectionActions", "ColorActions", "MenuActions", "MovieSelectionActions"],
+		{
+			"ok": self.KeyOk,
+			"menu": self.settings_menu,
+			"cancel": self.Exit,
+			"right": self.rightDown,
+			"left": self.leftUp,
+			"up": self.up,
+			"down": self.down,
+			"red": self.plugin_select,
+			"yellow": self.settings_para,
+			"blue": self.plugin_remove,
+			"green": self.ipk_remove
+		}, -1)
+
+		self.ipklist = []
+		self.filelist = []
+		self.devicelist = []
+		self.select = "1"
+		self.BAtyp = "new"
+
+		self.BAtyp = ""
+		self.currDir = "/mnt/usb"
+		self.devicelist = FileList(self.currDir, showDirectories = True, isTop = True)
+		self["devicelist"] = self.devicelist
+
+		if os.path.exists("/var/baroot/activImage") is True:
+			self.BAtyp = "new"
+		else:
+			if os.path.exists("/var/baroot") is False:
+				os.system("mkdir /var/baroot")
+			os.system("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/mountbaroot.sh")
+			if os.path.exists("/var/baroot/UFS_images") is True:
+				self.BAtyp = "old"
+
+
+		if self.BAtyp == "new":
+			self.currDir = "/var/baroot/UFS_Images/"
+			if not pathExists(self.currDir):
+				self.currDir = "/"
+			self.ipklist = FileList(self.currDir, showDirectories = True, isTop = True)
+			self.BAtyp = "new"
+
+		else:
+			# it is an old BA < 5.4.3
+			self.SearchPattern = "(?i)^.*\.(tar.gz)"
+			self.currDir = "/var/baroot/UFS_Images/"
+			self.ipklist = FileList(self.currDir, showDirectories = True, isTop = True, matchingPattern = self.SearchPattern)
+			if not pathExists(self.currDir):
+				self.currDir = "/"
+
+
+			self.currDir = "/mnt/usb"
+			self.devicelist = FileList(self.currDir, showDirectories = True, isTop = True)
+			self["devicelist"] = self.devicelist
+
+		self["ipklist"] = self.ipklist
+
+
+		if self.BAtyp == "new":
+			self.currDir = "/var/baroot/ba/ba/"
+			#if os.path.exists("/var/baroot/ba/ba/Flash") is False:
+			#	os.system("mkdir -p /var/baroot/ba/ba/Flash")
+			if not pathExists(self.currDir):
+				self.currDir = "/"
+			self.BAtyp = "new"
+		else:
+			# it is an old BA < 5.4.3
+			self.currDir = "/mnt/usb"
+			self.devicelist = FileList(self.currDir, showDirectories = True, isTop = True)
+			self["devicelist"] = self.devicelist
+
+			self.currDir = "/var/baroot/ba/ba/"
+			if not pathExists(self.currDir):
+				self.currDir = "/"
+			self.BAtyp = "old"
+
+		self.filelist = FileList(self.currDir, showDirectories = True, isTop = True)
+		self["filelist"] = self.filelist
+
+		self["ipklist"].hide()
+		self["devicelist"].hide()
+		self["filelist"].show()
+
+		#set the focus to the primary filelist
+		self.focus = self.LIST_FILE
+
+	def up(self):
+		if self.focus is self.LIST_FILE:
+			self["filelist"].up()
+		if self.focus is self.LIST_IPK:
+			self["ipklist"].up()
+		if self.focus is self.LIST_DEVICE:
+			self["devicelist"].up()
+
+	def down(self):
+		if self.focus is self.LIST_FILE:
+			self["filelist"].down()
+		if self.focus is self.LIST_IPK:
+			self["ipklist"].down()
+		if self.focus is self.LIST_DEVICE:
+			self["devicelist"].down()
+
+
+	def leftUp(self):
+		if self.focus is self.LIST_FILE:
+			self["filelist"].pageUp()
+		if self.focus is self.LIST_IPK:
+			self["ipklist"].pageUp()
+		if self.focus is self.LIST_DEVICE:
+			self["devicelist"].pageUp()
+
+
+	def rightDown(self):
+		if self.focus is self.LIST_FILE:
+			self["filelist"].pageDown()
+		if self.focus is self.LIST_IPK:
+			self["ipklist"].pageDown()
+		if self.focus is self.LIST_DEVICE:
+			self["devicelist"].pageDown()
+
+
+	def settings_para(self):
+		if self.BAtyp == "new":
+			self["ipklist"].hide()
+			self["filelist"].show()
+			self["devicelist"].hide()
+			self.focus = self.LIST_FILE
+			self.select = "2"
+			self["textbar"].text = _("Settings-Copy")
+			#if os.path.exists("/var/baroot/ba/ba/Flash") is True:
+			#	os.system("rm -r /var/baroot/ba/ba/Flash")
+			self["filelist"].refresh()
+
+	def plugin_remove(self):
+		self["ipklist"].hide()
+		self["filelist"].show()
+		self.focus = self.LIST_FILE
+		self.select = "0"
+		self["textbar"].text = _("Image-Delete")
+		#if os.path.exists("/var/baroot/ba/ba/Flash") is True:
+		#	os.system("rm -r /var/baroot/ba/ba/Flash")
+		self["filelist"].refresh()
+
+	def plugin_select(self):
+		self["ipklist"].hide()
+		self["filelist"].show()
+		self.focus = self.LIST_FILE
+		self.select = "1"
+		self["textbar"].text = _("Image-Select")
+		#if self.BAtyp == "new":
+		#		if os.path.exists("/var/baroot/ba/ba/Flash") is False:
+		#			os.system("mkdir -p /var/baroot/ba/ba/Flash")
+		#		self["filelist"].refresh()
+
+	def ipk_remove(self):
+			self["filelist"].hide()
+			self["devicelist"].hide()
+			self["ipklist"].show()
+			self.focus = self.LIST_IPK
+			self["textbar"].text = _("Image-Install")
+
+	def KeyOk(self):
+		# call the uninstall-Script with os.system
+		if self.focus is self.LIST_DEVICE:
+			self.currDir = "/var/baroot/ba/ba/"
+			message = "%s %s" % (_("Wollen sie in diesem Device installieren?"),self.devicelist.getFilename())
+			self.session.openWithCallback(self.oldimage_install, MessageBox, message, MessageBox.TYPE_YESNO)
+
+
+		if self.focus is self.LIST_IPK:
+			if self.BAtyp == "old":
+			 	 self.focus = self.LIST_DEVICE
+			 	 self["filelist"].hide()
+			 	 self["devicelist"].show()
+			 	 self["ipklist"].hide()
+			 	 self["textbar"].text = _("Zieldevice")
+			 	 self["filelist"].refresh()
+			 	 self["ipklist"].refresh()
+			 	 self["devicelist"].refresh()
+			else:
+			 	 self.currDir = "/var/baroot/ba/ba/"
+			 	 message = "%s %s" % (_("Wollen sie dieses Image wirklich installieren?"),self.ipklist.getFilename())
+			 	 self.session.openWithCallback(self.image_install, MessageBox, message, MessageBox.TYPE_YESNO)
+
+		if self.focus is self.LIST_FILE:
+			self.urlname = self.filelist.getFilename()
+			if self.BAtyp == "new":
+			 	 self.urlname2 = self.urlname.replace("/var/baroot/ba/ba/","")
+			else:
+			 	 self.urlname2 = self.urlname.replace("/var/baroot/ba/ba/","")
+			self.urlname2 = self.urlname2.replace("/","")
+
+			if self.select == "0":
+			 	 self.currDir = "/var/baroot/UFS_Images/"
+			 	 message = "%s %s" % (_("Sind sie sicher dieses Image zu loeschen?"),self.urlname2)
+			 	 self.session.openWithCallback(self.image_install, MessageBox, message, MessageBox.TYPE_YESNO)
+
+			if self.select == "1":
+			 	 if self.BAtyp == "new":
+			 	 		self.currDir = "/var/baroot/UFS_Images/"
+			 	 else:
+			 	 		self.currDir = "/var/baroot/UFS_Images/"
+			 	 message = "%s %s" % (_("Dieses Image auswaehlen?"),self.urlname2)
+			 	 self.session.openWithCallback(self.image_install, MessageBox, message, MessageBox.TYPE_YESNO)
+
+			if self.select == "2":
+			 	 if self.BAtyp == "new":
+			 	 		self.currDir = "/var/baroot/UFS_Images/"
+			 	 		message = "%s %s" % (_("Settings in dieses Image kopieren?"),self.urlname2)
+			 	 		self.session.openWithCallback(self.settings_copy, MessageBox, message, MessageBox.TYPE_YESNO)
+
+
+	def image_install(self, answer):
+		if answer == True:
+      # install Image
+			if self.focus is self.LIST_IPK:
+				self["filelist"].refresh()
+				self["ipklist"].refresh()
+				self.currDir = "/var/baroot/UFS_Images/"
+				self.urlname = self.ipklist.getFilename()
+				self.error_counter = "0"
+
+				if os.path.exists("/bootp.conf") is False:
+						message = "%s" % (_("Das ist kein Multiboot BA!\nbootp.conf fehlt"))
+						self.session.open(MessageBox, message, MessageBox.TYPE_ERROR)
+						self.error_counter = "1"
+
+				if os.path.exists("/var/baroot/activImage") is False:
+						message = "%s" % (_("Das ist kein Multiboot BA!\nactivImage fehlt!"))
+						self.session.open(MessageBox, message, MessageBox.TYPE_ERROR)
+						self.error_counter = "1"
+
+				if os.path.exists("/var/baroot/activImage") is True:
+					# is enough freespace on stick?
+					os.system("df /var/baroot |grep rootfs|cut -c41-50 >/tmp/free.txt")
+					if os.path.exists("/tmp/free.txt") is True:
+						f = open("/tmp/free.txt", "r" )
+						for line in f:
+							freesize = line.lstrip()
+						f.close
+						freesize = freesize.replace("\n","")
+						freesize = int(freesize)
+
+					if 42000 > freesize:
+						print "nicht OK"
+						message = "%s" % (_("Zu wenig Speicher im Stick frei!\n  Speicher = " + str(freesize)))
+						self.session.open(MessageBox, message, MessageBox.TYPE_ERROR)
+						self.error_counter = "1"
+					else:
+						print "OK" + str(freesize)
+						if os.path.exists("/var/baroot/ba/ba.sh") is False:
+							if os.path.exists("/var/baroot") is False:
+								os.system("mkdir /var/baroot")
+
+				# is it an multiboot environment?
+				if self.error_counter == "0":
+				#if os.path.exists("/var/baroot/activImage") is True:
+					file = open("/proc/stb/info/model", "r")
+					box = file.readline().strip()
+					file.close()
+					if box <> "dm8000":
+							evfd.getInstance().vfd_write_string("Install Image")
+					self["statusbar"].text = _("Decompressing Image in progress...")
+					#message = "%s" % (_("Das Image wird nun entpackt und installiert!"))
+					#self.session.open(MessageBox, message, MessageBox.TYPE_INFO,10)
+
+					# this is the Imagename in /var/baroot/UFS_Images
+					self.urlnameorg = self.urlname
+					self.urlname = self.urlname.replace(".tar.gz","")
+					self.urlname_org = self.urlname
+					# chek if exist Image, then make a newer
+					TargetDir = "/var/baroot/ba/ba/" + self.urlname
+					if os.path.exists(TargetDir) is True:
+						self.urlname = self.urlname_org + "_2"
+					TargetDir = "/var/baroot/ba/ba/" + self.urlname
+					if os.path.exists(TargetDir) is True:
+						self.urlname = self.urlname_org + "_3"
+					TargetDir = "/var/baroot/ba/ba/" + self.urlname
+					if os.path.exists(TargetDir) is True:
+						self.urlname = self.urlname_org + "_4"
+					TargetDir = "/var/baroot/ba/ba/" + self.urlname
+					if os.path.exists(TargetDir) is True:
+						self.urlname = self.urlname_org + "_5"
+					if os.path.exists(TargetDir) is True:
+						self.urlname = self.urlname_org + "_6"
+					TargetDir = "/var/baroot/ba/ba/" + self.urlname
+					if os.path.exists(TargetDir) is True:
+						self.urlname = self.urlname_org + "_7"
+					if os.path.exists(TargetDir) is True:
+						self.urlname = self.urlname_org + "_8"
+					if os.path.exists(TargetDir) is True:
+						self.urlname = self.urlname_org + "_9"
+					TargetDir = "/var/baroot/ba/ba/" + self.urlname
+					if os.path.exists(TargetDir) is True:
+						self.urlname = self.urlname_org + "_10"
+
+
+					TargetDir = "mkdir -p /var/baroot/ba/ba/" + self.urlname
+					os.system(TargetDir)
+
+					# write name to userfile
+					TargetDir = "NewDir=" + self.urlname
+					ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/ba_url", "w")
+					ffile.write(TargetDir)
+					ffile.close()
+
+					TarString = "cd /var/baroot/UFS_Images; tar -xzf " + self.urlnameorg + " -C /var/baroot/ba/ba/" + self.urlname
+					os.system(TarString)
+					#self.session.open(Console, title = "decompressing is running", cmdlist = [TarString])
+
+					CpString = "cp /bootp.conf /var/baroot/ba/ba/" + self.urlname
+					os.system(CpString)
+					if os.path.exists("/bootp2.conf") is True:
+						CpString = "cp /bootp2.conf /var/baroot/ba/ba/" + self.urlname
+						os.system(CpString)
+
+					#CpString = "cp /etc/init.d/rcS /var/baroot/ba/ba/" + self.urlname + "/etc/init.d/rcS"
+					#os.system(CpString)
+
+					RCS = "/var/baroot/ba/ba/" + self.urlname + "/etc/init.d/rcS"
+					#CpString = "cat /usr/lib/enigma2/python/Plugins/Extensions/AddonManager/rcs_header > /tmp/rcs.txt"
+					#os.system(CpString)
+
+					CpString = "sed -e 's*#!/bin/sh*#*g' -i " + RCS
+					os.system(CpString)
+
+					ffile = open("/tmp/rcs.txt", "w")
+					CpString = "#!/bin/sh"
+					ffile.write(CpString)
+					ffile.write("\n")
+					CpString = ""
+					ffile.write(CpString)
+					ffile.write("\n")
+					CpString = "if [ -e /activImage ]; then"
+					ffile.write(CpString)
+					ffile.write("\n")
+					CpString = "  echo \"Starte chroot\""
+					ffile.write(CpString)
+					ffile.write("\n")
+					CpString = "  mount -o bind /baroot /activImage/var/baroot"
+					ffile.write(CpString)
+					ffile.write("\n")
+					CpString = "  exec chroot /activImage /etc/init.d/rcS"
+					ffile.write(CpString)
+					ffile.write("\n")
+					CpString = "fi"
+					ffile.write(CpString)
+					ffile.write("\n")
+					CpString = ""
+					ffile.write(CpString)
+					ffile.write("\n")
+					ffile.close()
+
+					CpString = "cat " + RCS + " >> /tmp/rcs.txt"
+					os.system(CpString)
+					CpString = "cp /tmp/rcs.txt " + RCS
+					os.system(CpString)
+					CpString = "chmode 755 " + RCS
+					os.system(CpString)
+					CpString = "sed -e 's/fsck /#fsck /g' -i /var/baroot/ba/ba/" + self.urlname + "/etc/init.d/mountvirtfs"
+					os.system(CpString)
+					CpString = "mkdir -p /var/baroot/ba/ba/" + self.urlname + "/var/baroot"
+					os.system(CpString)
+					os.system("sync")
+
+          # set automount in rcs
+					os.system("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/makercs.sh")
+
+
+          # and now we copy the settings
+					if config.AddonManager.ba_settings_on.value == 1:
+						file = open("/proc/stb/info/model", "r")
+						box = file.readline().strip()
+						file.close()
+						if box <> "dm8000":
+							evfd.getInstance().vfd_write_string("install Settings")
+						self["statusbar"].text = _("Settings werden uebernommen....")
+
+						CpString = "rm /var/baroot/ba/ba/" + self.urlname + "/var/etc/.firstboot"
+						os.system(CpString)
+						CpString = "cp -RP /var/emu /var/baroot/ba/ba/" + self.urlname + "/var/"
+						os.system(CpString)
+						CpString = "cp -RP /var/keys /var/baroot/ba/ba/" + self.urlname + "/var/"
+						os.system(CpString)
+						CpString = "cp /var/etc/active_cam /var/baroot/ba/ba/" + self.urlname + "/var/etc/active_cam"
+						os.system(CpString)
+						CpString = "cp /var/etc/*emu /var/baroot/ba/ba/" + self.urlname + "/var/etc/"
+						os.system(CpString)
+						CpString = "cp /var/etc/smbfs /var/baroot/ba/ba/" + self.urlname + "/var/etc/"
+						os.system(CpString)
+						CpString = "cp /var/etc/upnpfs /var/baroot/ba/ba/" + self.urlname + "/var/etc/"
+						os.system(CpString)
+
+
+						CpString = "cp /var/*emu /var/baroot/ba/ba/" + self.urlname + "/var/"
+						os.system(CpString)
+						CpString = "cp /usr/local/share/enigma2/lamedb /var/baroot/ba/ba/" + self.urlname + "/usr/local/share/enigma2/"
+						os.system(CpString)
+						CpString = "cp /usr/local/share/enigma2/bouquets* /var/baroot/ba/ba/" + self.urlname + "/usr/local/share/enigma2/"
+						os.system(CpString)
+						CpString = "cp /usr/local/share/enigma2/userbouquet* /var/baroot/ba/ba/" + self.urlname + "/usr/local/share/enigma2/"
+						os.system(CpString)
+						CpString = "cp /etc/tuxbox/satellites.xml /var/baroot/ba/ba/" + self.urlname + "/etc/tuxbox/satellites.xml"
+						os.system(CpString)
+						#CpString = "cp /usr/local/share/enigma2/settings /var/baroot/ba/ba/" + self.urlname + "/usr/local/share/enigma2/"
+						#os.system(CpString)
+						CpString = "cp /usr/automount/amount.ini /var/baroot/ba/ba/" + self.urlname + "/usr/automount/amount.ini"
+						os.system(CpString)
+
+						#// Check for default skin
+						defaultSkin = 0
+						PathString = "/var/baroot/ba/ba/" + self.urlname + "/var/usr/local/share/enigma2/settings"
+						if os.path.exists(PathString) is True:
+							em = open(PathString)
+							e = em.readlines()
+							em.close()
+							for line in e:
+								if line.find("config.skin.primary_skin") > -1:
+										defaultSkin = 1
+										PrimarySkin = line
+
+						CpString = "cp /usr/local/share/enigma2/settings /var/baroot/ba/ba/" + self.urlname + "/usr/local/share/enigma2/"
+						os.system(CpString)
+
+						if defaultSkin == 1:
+								em = open(PathString, "a")
+								em.write(PrimarySkin)
+								em.close()
+
+
+					if config.AddonManager.ba_skins_on.value == 1:
+							CpString = "cp -RP /usr/local/share/enigma2/ /var/baroot/ba/ba/" + self.urlname + "/usr/local/share/"
+							os.system(CpString)
+
+							CpString = "cp -RP /usr/lib/enigma2/python/Plugins/Extensions/InfoBarConfig/ /var/baroot/ba/ba/" + self.urlname + "/usr/lib/enigma2/python/Plugins/Extensions/"
+							os.system(CpString)
+
+							CpString = "cp /usr/lib/enigma2/python/Components/Converter/MaxCryptoInfo.pyc /var/baroot/ba/ba/" + self.urlname + "/usr/lib/enigma2/python/Components/Converter/"
+							os.system(CpString)
+
+							CpString = "cp /usr/lib/enigma2/python/Components/Converter/MaxServiceInfo.pyc /var/baroot/ba/ba/" + self.urlname + "/usr/lib/enigma2/python/Components/Converter/"
+							os.system(CpString)
+
+							if os.path.exists("/usr/share/enigma2/picon/") is True:
+								CpString = "cp -RP /usr/share/enigma2/picon/ /var/baroot/ba/ba/" + self.urlname + "/usr/share/enigma2/"
+								os.system(CpString)
+
+					if config.AddonManager.ba_plugins_on.value == 1:
+							# save AddonManager + Aafpanel, because in new image is newer
+							os.system("cp -RP /usr/lib/enigma2/python/Plugins/Extensions/AddonManager /tmp/")
+							os.system("cp -RP /usr/lib/enigma2/python/Plugins/Extensions/Aafpanel /tmp/")
+							CpString = "cp -RP /usr/lib/enigma2/python/Plugins/Extensions /var/baroot/ba/ba/" + self.urlname + "/usr/lib/enigma2/python/Plugins/"
+							os.system(CpString)
+							# restore AddonManager + Aafpanel
+							CpString = "cp -RP /tmp/AddonManager /var/baroot/ba/ba/" + self.urlname + "/usr/lib/enigma2/python/Plugins/"
+							os.system(CpString)
+							CpString = "cp -RP /tmp/Aafpanel /var/baroot/ba/ba/" + self.urlname + "/usr/lib/enigma2/python/Plugins/"
+							os.system(CpString)
+
+					if config.AddonManager.ba_remove_on.value == 1:
+							CpString = "rm -r /var/baroot/UFS_Images/" + self.urlnameorg
+							os.system(CpString)
+
+					if config.AddonManager.ba_usersettings_on.value == 1:
+						if os.path.exists("/var/baroot/default_settings") is True:
+							CpString = "cp /var/baroot/default_settings /var/baroot/ba/ba/" + self.urlname + "/usr/local/share/enigma2/settings"
+							os.system(CpString)
+
+					if os.path.exists("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/ba_script.sh") is True:
+						os.system("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/ba_script.sh")
+
+					file = open("/proc/stb/info/model", "r")
+					box = file.readline().strip()
+					file.close()
+					if box <> "dm8000":
+						evfd.getInstance().vfd_write_string("Image Ready!")
+					restartbox = self.session.openWithCallback(self.restart,MessageBox,_("Das Image ist nun fertig installiert!\nSoll ein Neustart durchgefuehrt werden?"), MessageBox.TYPE_YESNO)
+					restartbox.setTitle(_("UFS-Box starten?"))
+
+
+      # delete Image
+			if self.focus is self.LIST_FILE:
+				self.imagename = self.filelist.getFilename()
+				if self.imagename == "/var/baroot/ba/":
+					print "/var/baroot/ba/"
+				else:
+					#if self.BAtyp == "new":
+					fd=open("/var/baroot/ba/.baboot")
+					imgname=fd.read()
+					fd.close()
+					imgname = imgname.replace("\n","")
+					imgname = "/var/baroot/ba/ba/" + imgname + "/"
+
+					# delete Image
+					if self.select == "0":
+						if self.imagename == imgname:
+							message = "%s" % (_("WARNUNG\nDas aktive Image kann NICHT geloescht werden!"))
+							self.session.open(MessageBox, message, MessageBox.TYPE_INFO,5)
+						else:
+							message = "%s" % (_("Das Image wird jetzt geloescht!"))
+							self.session.open(MessageBox, message, MessageBox.TYPE_INFO,3)
+							if self.BAtyp == "new":
+								os.system("rm -r %s" % self.imagename)
+							else:
+								# and now we read the devicename
+								fileread = open(self.imagename + "bootp.conf", "r" )
+								for line in fileread:
+									if line.split('=')[0] == "BADEVICE":
+											self.device = line.split('=')[1]
+											self.device = self.device.replace("\n","")
+								fileread.close()
+
+								# read mountpoint
+								procfile = open("/proc/mounts")
+								for n in procfile.readlines():
+										if n.split(' ')[0] == self.device:
+											self.device = n.split(' ')[1]
+								procfile.close()
+								os.system("rm -r %s" % self.device)
+								os.system("rm -r %s" % self.imagename)
+
+					# select Image
+					if self.select == "1":
+						if self.imagename == imgname:
+							message = "%s" % (_("Dieses Image ist bereits AKTIV!"))
+							self.session.open(MessageBox, message, MessageBox.TYPE_INFO,5)
+						else:
+							self.urlname = self.imagename.replace("/var/baroot/ba/ba/","")
+							self.urlname = self.urlname.replace("/","")
+
+							restartbox = self.session.openWithCallback(self.restart,MessageBox,_("Soll nun ein Neustart durchgefuehrt werden?"), MessageBox.TYPE_YESNO)
+							restartbox.setTitle(_("UFS-Box starten?"))
+
+		self["filelist"].refresh()
+		self["ipklist"].refresh()
+		self["devicelist"].refresh()
+
+	def restart(self, answer):
+		if answer is True:
+			# make bootimage active for restart
+			if self.BAtyp == "new":
+				ffile = open("/var/baroot/ba/.baboot", "w")
+				ffile.write(self.urlname)
+				ffile.write("\n")
+				ffile.close()
+				#if os.path.exists("/var/baroot/ba/ba/Flash") is True:
+				#	os.system("rm -r /var/baroot/ba/ba/Flash")
+			else:
+
+				ffile = open("/var/baroot/ba/.baboot", "w")
+				ffile.write(self.urlname_org)
+				ffile.write("\n")
+				ffile.close()
+				# and now we write the devicename
+				fileread = open("/var/baroot/ba/ba/" + self.urlname_org + "/bootp.conf", "r" )
+				for line in fileread:
+					if line.split('=')[0] == "BADEVICE":
+							self.device = line.split('=')[1]
+							ffile = open("/var/baroot/ba/.badevice", "w")
+							ffile.write(self.device)
+							#ffile.write("\n")
+							ffile.close()
+				fileread.close()
+
+			os.system("sync")
+			os.system("reboot -f")
+
+
+	def Exit(self):
+		if self.rebootflag:
+			#self["statusbar"].text = _("rebooting...")
+			message = "%s" % (_("Ein Plugin hat einen Neustart angefordert!\nDie Box wird nun rebootet!"))
+			self.session.open( MessageBox, message, MessageBox.TYPE_INFO)
+			TryQuitMainloop(self.session,2)
+		self.close()
+
+	def settings_menu(self):
+		self.session.open(AddonConfigScreen)
+
+
+
+	def settings_copy(self, answer):
+		if answer == True:
+      # install Image
+			if self.focus is self.LIST_FILE:
+				self["filelist"].refresh()
+				self["ipklist"].refresh()
+				self.currDir = "/var/baroot/UFS_Images/"
+				self.urlname = self.urlname2
+				self.error_counter = "0"
+
+				if os.path.exists("/bootp.conf") is False:
+						message = "%s" % (_("Das ist kein Multiboot BA!\nbootp.conf fehlt"))
+						self.session.open(MessageBox, message, MessageBox.TYPE_ERROR)
+						self.error_counter = "1"
+
+				if os.path.exists("/var/baroot/activImage") is False:
+						message = "%s" % (_("Das ist kein Multiboot BA!\nactivImage fehlt!"))
+						self.session.open(MessageBox, message, MessageBox.TYPE_ERROR)
+						self.error_counter = "1"
+
+				# is it an multiboot environment?
+				if self.error_counter == "0":
+					file = open("/proc/stb/info/model", "r")
+					box = file.readline().strip()
+					file.close()
+					if box <> "dm8000":
+						evfd.getInstance().vfd_write_string("Settings copy")
+
+					# write name to userfile
+					TargetDir = "NewDir=" + self.urlname
+					ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/ba_url", "w")
+					ffile.write(TargetDir)
+					ffile.close()
+
+					CpString = "cp /bootp.conf /var/baroot/ba/ba/" + self.urlname
+					os.system(CpString)
+					if os.path.exists("/bootp2.conf") is True:
+						CpString = "cp /bootp2.conf /var/baroot/ba/ba/" + self.urlname
+						os.system(CpString)
+
+          # and now we copy the settings
+					if config.AddonManager.ba_settings_on.value == 1:
+						file = open("/proc/stb/info/model", "r")
+						box = file.readline().strip()
+						file.close()
+						if box <> "dm8000":
+							evfd.getInstance().vfd_write_string("install Settings")
+						self["statusbar"].text = _("Settings werden uebernommen....")
+
+						CpString = "rm /var/baroot/ba/ba/" + self.urlname + "/var/etc/.firstboot"
+						os.system(CpString)
+						CpString = "cp -RP /var/emu /var/baroot/ba/ba/" + self.urlname + "/var/"
+						os.system(CpString)
+						CpString = "cp -RP /var/keys /var/baroot/ba/ba/" + self.urlname + "/var/"
+						os.system(CpString)
+						CpString = "cp /var/etc/active_cam /var/baroot/ba/ba/" + self.urlname + "/var/etc/active_cam"
+						os.system(CpString)
+						CpString = "cp /var/etc/*emu /var/baroot/ba/ba/" + self.urlname + "/var/etc/"
+						os.system(CpString)
+						CpString = "cp /var/etc/smbfs /var/baroot/ba/ba/" + self.urlname + "/var/etc/"
+						os.system(CpString)
+						CpString = "cp /var/etc/upnpfs /var/baroot/ba/ba/" + self.urlname + "/var/etc/"
+						os.system(CpString)
+
+
+						CpString = "cp /var/*emu /var/baroot/ba/ba/" + self.urlname + "/var/"
+						os.system(CpString)
+						CpString = "cp /usr/local/share/enigma2/lamedb /var/baroot/ba/ba/" + self.urlname + "/usr/local/share/enigma2/"
+						os.system(CpString)
+						CpString = "cp /usr/local/share/enigma2/bouquets* /var/baroot/ba/ba/" + self.urlname + "/usr/local/share/enigma2/"
+						os.system(CpString)
+						CpString = "cp /usr/local/share/enigma2/userbouquet* /var/baroot/ba/ba/" + self.urlname + "/usr/local/share/enigma2/"
+						os.system(CpString)
+						CpString = "cp /etc/tuxbox/satellites.xml /var/baroot/ba/ba/" + self.urlname + "/etc/tuxbox/satellites.xml"
+						os.system(CpString)
+						#CpString = "cp /usr/local/share/enigma2/settings /var/baroot/ba/ba/" + self.urlname + "/usr/local/share/enigma2/"
+						#os.system(CpString)
+						CpString = "cp /usr/automount/amount.ini /var/baroot/ba/ba/" + self.urlname + "/usr/automount/amount.ini"
+						os.system(CpString)
+
+						#// Check for default skin
+						defaultSkin = 0
+						PathString = "/var/baroot/ba/ba/" + self.urlname + "/var/usr/local/share/enigma2/settings"
+						if os.path.exists(PathString) is True:
+							em = open(PathString)
+							e = em.readlines()
+							em.close()
+							for line in e:
+								if line.find("config.skin.primary_skin") > -1:
+										defaultSkin = 1
+										PrimarySkin = line
+
+						CpString = "cp /usr/local/share/enigma2/settings /var/baroot/ba/ba/" + self.urlname + "/usr/local/share/enigma2/"
+						os.system(CpString)
+
+						if defaultSkin == 1:
+								em = open(PathString, "a")
+								em.write(PrimarySkin)
+								em.close()
+
+
+					if config.AddonManager.ba_skins_on.value == 1:
+							CpString = "cp -RP /usr/local/share/enigma2/ /var/baroot/ba/ba/" + self.urlname + "/usr/local/share/"
+							os.system(CpString)
+
+							CpString = "cp -RP /usr/lib/enigma2/python/Plugins/Extensions/InfoBarConfig/ /var/baroot/ba/ba/" + self.urlname + "/usr/lib/enigma2/python/Plugins/Extensions/"
+							os.system(CpString)
+
+							CpString = "cp /usr/lib/enigma2/python/Components/Converter/MaxCryptoInfo.pyc /var/baroot/ba/ba/" + self.urlname + "/usr/lib/enigma2/python/Components/Converter/"
+							os.system(CpString)
+
+							CpString = "cp /usr/lib/enigma2/python/Components/Converter/MaxServiceInfo.pyc /var/baroot/ba/ba/" + self.urlname + "/usr/lib/enigma2/python/Components/Converter/"
+							os.system(CpString)
+
+							if os.path.exists("/usr/share/enigma2/picon/") is True:
+								CpString = "cp -RP /usr/share/enigma2/picon/ /var/baroot/ba/ba/" + self.urlname + "/usr/share/enigma2/"
+								os.system(CpString)
+
+					if config.AddonManager.ba_plugins_on.value == 1:
+							# save AddonManager + Aafpanel, because in new image is newer
+							os.system("cp -RP /usr/lib/enigma2/python/Plugins/Extensions/AddonManager /tmp/")
+							os.system("cp -RP /usr/lib/enigma2/python/Plugins/Extensions/Aafpanel /tmp/")
+							CpString = "cp -RP /usr/lib/enigma2/python/Plugins/Extensions /var/baroot/ba/ba/" + self.urlname + "/usr/lib/enigma2/python/Plugins/"
+							os.system(CpString)
+							# restore AddonManager + Aafpanel
+							CpString = "cp -RP /tmp/AddonManager /var/baroot/ba/ba/" + self.urlname + "/usr/lib/enigma2/python/Plugins/"
+							os.system(CpString)
+							CpString = "cp -RP /tmp/Aafpanel /var/baroot/ba/ba/" + self.urlname + "/usr/lib/enigma2/python/Plugins/"
+							os.system(CpString)
+
+					if config.AddonManager.ba_remove_on.value == 1:
+							CpString = "rm -r /var/baroot/UFS_Images/" + self.urlnameorg
+							os.system(CpString)
+
+					if config.AddonManager.ba_usersettings_on.value == 1:
+						if os.path.exists("/var/baroot/default_settings") is True:
+							CpString = "cp /var/baroot/default_settings /var/baroot/ba/ba/" + self.urlname + "/usr/local/share/enigma2/settings"
+							os.system(CpString)
+
+					if os.path.exists("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/ba_script.sh") is True:
+						os.system("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/ba_script.sh")
+
+					file = open("/proc/stb/info/model", "r")
+					box = file.readline().strip()
+					file.close()
+					if box <> "dm8000":
+						evfd.getInstance().vfd_write_string("Image Ready!")
+					restartbox = self.session.openWithCallback(self.restart,MessageBox,_("Die Settings wurden kopiert!\nSoll ein Neustart durchgefuehrt werden?"), MessageBox.TYPE_YESNO)
+					restartbox.setTitle(_("UFS-Box starten?"))
+
+	def oldimage_install(self, answer):
+		if answer == True:
+      # install Old-Image
+			if self.focus is self.LIST_DEVICE:
+				self.focus = self.LIST_IPK
+				self["filelist"].hide()
+				self["devicelist"].hide()
+				self["ipklist"].show()
+				self["textbar"].text = _("Install-Image")
+				self["filelist"].refresh()
+				self["ipklist"].refresh()
+				self["devicelist"].refresh()
+
+				self.target = self.devicelist.getFilename()
+				self.currDir = "/UFS_Images/"
+				self.urlname = self.ipklist.getFilename()
+				self.error_counter = "0"
+
+
+      # install Old-Image
+				if self.BAtyp == "old":
+					file = open("/proc/stb/info/model", "r")
+					box = file.readline().strip()
+					file.close()
+					if box <> "dm8000":
+						evfd.getInstance().vfd_write_string("Install Image")
+					self["statusbar"].text = _("Decompressing Image in progress...")
+
+					# this is the Imagename in /var/baroot/UFS_Images
+					self.urlnameorg = self.urlname
+					self.urlname = self.urlname.replace(".img.tar.gz","")
+					self.urlname = self.urlname.replace(".tar.gz","")
+					self.urlname_org = self.urlname
+
+					# write name to userfile
+					TargetDir = "NewDir=" + self.urlname_org
+					ffile = open("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/ba_url", "w")
+					ffile.write(TargetDir)
+					ffile.close()
+
+ 					self.fulltarget = "/mnt/usb/" + self.target
+					TarString = "cd /UFS_Images; tar -xzf " + self.urlnameorg + " -C " + self.fulltarget
+					os.system(TarString)
+
+					os.system("sync")
+ 					self.device = "/dev/sda2"
+ 					# read mountpoint
+					procfile = open("/proc/mounts")
+					for n in procfile.readlines():
+						if n.split(' ')[1] == self.fulltarget:
+							self.device = n.split(' ')[0]
+					procfile.close()
+
+					# read current imagename
+					if os.path.exists("/ba/.baboot") is True:
+						f = open("/ba/.baboot", "r" )
+						for line in f:
+							self.sourceimg = line.lstrip()
+						f.close
+						self.sourceimg = self.sourceimg.replace("\n","")
+
+					TarString = "mkdir -p /ba/ba/" + self.urlname
+					os.system(TarString)
+
+					self.devid = "0:" + self.device[8:9]
+					fileread = open("/ba/ba/" + self.sourceimg + "/bootp.conf", "r" )
+					filewrite = open("/ba/ba/" + self.urlname + "/bootp.conf", "w" )
+
+					self.urlname = self.fulltarget
+
+					for line in fileread:
+								if line.split('=')[0] == "BADEVICE":
+											line = "BADEVICE=" + self.device + "\n"
+								if line.split('=')[0] == "BADEVID":
+											line = "BADEVID=" + self.devid + "\n"
+								filewrite.write(line)
+					fileread.close()
+					filewrite.close()
+
+          # and now we copy the settings
+					if config.AddonManager.ba_settings_on.value == 1:
+						file = open("/proc/stb/info/model", "r")
+						box = file.readline().strip()
+						file.close()
+						if box <> "dm8000":
+							evfd.getInstance().vfd_write_string("install Settings")
+						self["statusbar"].text = _("Settings werden uebernommen....")
+
+						CpString = "rm  " + self.urlname + "/var/etc/.firstboot"
+						os.system(CpString)
+						CpString = "cp -RP /var/emu " + self.urlname + "/var/"
+						os.system(CpString)
+						CpString = "cp -RP /var/keys " + self.urlname + "/var/"
+						os.system(CpString)
+						CpString = "cp /var/etc/active_cam " + self.urlname + "/var/etc/active_cam"
+						os.system(CpString)
+						CpString = "cp /var/etc/*emu " + self.urlname + "/var/etc/"
+						os.system(CpString)
+						CpString = "cp /var/etc/smbfs " + self.urlname + "/var/etc/"
+						os.system(CpString)
+						CpString = "cp /var/etc/upnpfs " + self.urlname + "/var/etc/"
+						os.system(CpString)
+
+
+						CpString = "cp /var/*emu " + self.urlname + "/var/"
+						os.system(CpString)
+						CpString = "cp /usr/local/share/enigma2/lamedb " + self.urlname + "/usr/local/share/enigma2/"
+						os.system(CpString)
+						CpString = "cp /usr/local/share/enigma2/bouquets* " + self.urlname + "/usr/local/share/enigma2/"
+						os.system(CpString)
+						CpString = "cp /usr/local/share/enigma2/userbouquet* " + self.urlname + "/usr/local/share/enigma2/"
+						os.system(CpString)
+						CpString = "cp /etc/tuxbox/satellites.xml " + self.urlname + "/etc/tuxbox/satellites.xml"
+						os.system(CpString)
+						#CpString = "cp /usr/local/share/enigma2/settings " + self.urlname + "/usr/local/share/enigma2/"
+						#os.system(CpString)
+						CpString = "cp /usr/automount/amount.ini " + self.urlname + "/usr/automount/amount.ini"
+						os.system(CpString)
+
+						#// Check for default skin
+						defaultSkin = 0
+						PathString = self.urlname + "/var/usr/local/share/enigma2/settings"
+						if os.path.exists(PathString) is True:
+							em = open(PathString)
+							e = em.readlines()
+							em.close()
+							for line in e:
+								if line.find("config.skin.primary_skin") > -1:
+										defaultSkin = 1
+										PrimarySkin = line
+
+						CpString = "cp /usr/local/share/enigma2/settings " + self.urlname + "/usr/local/share/enigma2/"
+						os.system(CpString)
+
+						if defaultSkin == 1:
+								em = open(PathString, "a")
+								em.write(PrimarySkin)
+								em.close()
+
+
+					if config.AddonManager.ba_skins_on.value == 1:
+							CpString = "cp -RP /usr/local/share/enigma2/ " + self.urlname + "/usr/local/share/"
+							os.system(CpString)
+
+							CpString = "cp -RP /usr/lib/enigma2/python/Plugins/Extensions/InfoBarConfig/ " + self.urlname + "/usr/lib/enigma2/python/Plugins/Extensions/"
+							os.system(CpString)
+
+							CpString = "cp /usr/lib/enigma2/python/Components/Converter/MaxCryptoInfo.pyc " + self.urlname + "/usr/lib/enigma2/python/Components/Converter/"
+							os.system(CpString)
+
+							CpString = "cp /usr/lib/enigma2/python/Components/Converter/MaxServiceInfo.pyc " + self.urlname + "/usr/lib/enigma2/python/Components/Converter/"
+							os.system(CpString)
+
+							if os.path.exists("/usr/share/enigma2/picon/") is True:
+								CpString = "cp -RP /usr/share/enigma2/picon/ " + self.urlname + "/usr/share/enigma2/"
+								os.system(CpString)
+
+					if config.AddonManager.ba_plugins_on.value == 1:
+							# save AddonManager + Aafpanel, because in new image is newer
+							os.system("cp -RP /usr/lib/enigma2/python/Plugins/Extensions/AddonManager /tmp/")
+							os.system("cp -RP /usr/lib/enigma2/python/Plugins/Extensions/Aafpanel /tmp/")
+							CpString = "cp -RP /usr/lib/enigma2/python/Plugins/Extensions " + self.urlname + "/usr/lib/enigma2/python/Plugins/"
+							os.system(CpString)
+							# restore AddonManager + Aafpanel
+							CpString = "cp -RP /tmp/AddonManager " + self.urlname + "/usr/lib/enigma2/python/Plugins/"
+							os.system(CpString)
+							CpString = "cp -RP /tmp/Aafpanel " + self.urlname + "/usr/lib/enigma2/python/Plugins/"
+							os.system(CpString)
+
+					if config.AddonManager.ba_remove_on.value == 1:
+							CpString = "rm -r /var/baroot/ba/UFS_Images/" + self.urlname
+							os.system(CpString)
+
+					if config.AddonManager.ba_usersettings_on.value == 1:
+						if os.path.exists("/default_settings") is True:
+							CpString = "cp /default_settings " + self.urlname + "/usr/local/share/enigma2/settings"
+							os.system(CpString)
+
+					if os.path.exists("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/ba_script.sh") is True:
+						os.system("/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/ba_script.sh")
+
+					file = open("/proc/stb/info/model", "r")
+					box = file.readline().strip()
+					file.close()
+					if box <> "dm8000":
+						evfd.getInstance().vfd_write_string("Image Ready!")
+					#restartbox = self.session.openWithCallback(self.restart,MessageBox,_("Das Image ist nun fertig installiert!\nSoll ein Neustart durchgefuehrt werden?"), MessageBox.TYPE_YESNO)
+					#restartbox.setTitle(_("UFS-Box starten?"))
+		 	 		message = "%s" % (_("Das Image ist nun fertig installiert!\nSoll ein Neustart durchgefuehrt werden?"))
+		 	 		self.session.openWithCallback(self.restart, MessageBox, message, MessageBox.TYPE_YESNO)
Index: /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/restore.cfg
===================================================================
--- /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/restore.cfg	(revision 8656)
+++ /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/restore.cfg	(revision 8656)
@@ -0,0 +1,10 @@
+settings=y
+binarys=y
+camconfig=y
+plugins=y
+network=y
+samba=y
+bilder=y
+sonstige=y
+addonmanager=y
+backup=y
Index: /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/restore.sh
===================================================================
--- /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/restore.sh	(revision 8656)
+++ /ipk/source.sh4/system_addonmanager_3_04/usr/lib/enigma2/python/Plugins/Extensions/AddonManager/restore.sh	(revision 8656)
@@ -0,0 +1,195 @@
+#!/bin/sh
+# ***********************************************************
+#              Backupscript nach Methode niovs
+#              wird vom Addon-Manager aufgerufen
+#
+#           kann beliebig für jede Box weitert werden
+#
+#           angepasst fuer Fortis-Boxen by Bauernbub
+# ***********************************************************
+
+filename=$1
+rebootnow=$2
+
+# check for saved settings
+if [ ! -e /var/etc/restore.cfg ]; then
+  # make a default and say all yes
+  settings=n
+  binarys=n
+  camconfig=n
+  plugins=n
+  network=n
+  samba=n
+  bilder=n
+  sonstige=n
+  addonmanager=y
+  backup=y
+else
+. /var/etc/restore.cfg   # read config from Addon-Manager
+fi
+
+echo -e "***********************************************************"
+echo -e "**********Wiederherstellung VU Plus oder Dreambox**********"
+echo -e "***********************************************************\n"
+
+boxtyp="`cat /proc/stb/info/model`"
+
+if [ "$filename" ]; then
+  BOXDIR="$filename"
+else
+  if [ "$boxtyp" == "dm8000" ]
+    then
+      BOXDIR="backup_vu"
+    else
+      BOXDIR="backup_fortis"
+  fi
+fi
+
+if [ `mount | grep "on /var/swap" | wc -l` -ge 1 ]; then DIR="/var/swap/$BOXDIR"; fi
+if [ `mount | grep "on /media/hdd" | wc -l` -eq 1 ]; then DIR="/media/hdd/$BOXDIR"; fi
+
+rm -f $DIR/restore.log ; touch $DIR/restore.log
+
+# Neustart nach Flashinstallation, restore AM
+if [ -e /var/swap/backup/.firstrun ] || [ -e /media/hdd/backup/.firstrun ] ; then
+  if [ -e $DIR/restore.cfg ]; then
+    . $DIR/restore.cfg
+  else
+    settings=n
+    binarys=n
+    camconfig=n
+    plugins=n
+    network=n
+    samba=n
+    bilder=n
+    sonstige=n
+    addonmanager=y
+    backup=y
+  fi
+fi
+
+
+if [ "$plugins" = "y" ]
+ then
+ if [ -d $DIR/pakete ]
+  then
+   ipkg install  $DIR/pakete/*.ipk
+   ipkg update
+   for i in `cat $DIR/ipkg.list ` ; do ipkg install $i ; done
+     echo -e "******** Plugins wiederhergestellt ********\n"
+ elif [ -e $DIR/ipkg.list ]
+  then
+   ipkg update
+   for i in `cat $DIR/ipkg.list ` ; do ipkg install $i ; done
+     echo -e "******** IPK-Plugins wiederhergestellt ********\n"
+ else
+   echo -e "******** Kein Backup der IPK-Plugins vorhanden! ********\n"
+ fi
+ if [ -e $DIR/plugins.tar ]
+  then
+      tar -xvf $DIR/plugins.tar -C / >> $DIR/restore.log
+      echo -e "******** Extension/Plugins wiederhergestellt ********\n"
+  else
+      echo -e "******** Kein Backup der Plugins vorhanden! ********\n"
+ fi
+fi
+
+if [ "$network" = "y" ]
+ then
+ if [ -e $DIR/network.tar ]
+  then
+      tar -xvf $DIR/network.tar -C / >> $DIR/restore.log
+      echo -e "******** Netzwerkkonfiguration wurde wiederhergestellt ********\n"
+  else
+      echo -e "******** Kein Backup der Netzwerkkonfiguration vorhanden! ********\n"
+ fi
+fi
+
+
+if [ "$samba" = "y" ]
+ then
+ if [ -e $DIR/samba.tar ]
+  then
+      tar -xvf $DIR/samba.tar -C / >> $DIR/restore.log
+      echo -e "******** Sambakonfiguration wurde wiederhergestellt ********\n"
+  else
+      echo -e  "******** Kein Backup der Sambakonfiguration vorhanden! ********\n"
+ fi
+fi
+
+if [ "$bilder" = "y" ]
+ then
+ if [ -e $DIR/bilder.tar ]
+  then
+      tar -xvf $DIR/bilder.tar -C / >> $DIR/restore.log
+      echo -e "******** Bootbilder und das Radiobild wurde wiederhergestellt ********\n"
+  else
+      echo -e "******** Kein Backup der Bootbilder und des Radiobildes vorhanden! ********\n"
+ fi
+fi
+
+if [ "$sonstige" = "y" ]
+ then
+ if [ -e $DIR/sonstige.tar ]
+  then
+      tar -xvf $DIR/sonstige.tar -C / >> $DIR/restore.log
+      echo -e "******** sonstige Konfigurationsdateien wurden wiederhergestellt ********\n"
+  else
+      echo -e "******** Kein Backup der sonstigen Konfigurationsdateien vorhanden! ********\n"
+ fi
+fi
+
+if [ "$camconfig" = "y" ]
+ then
+ if [ -e $DIR/camconfig.tar ]
+	then
+     	tar -xvf $DIR/camconfig.tar -C / >> $DIR/restore.log
+			echo -e "******** Camconfig wurde wiederhergestellt ********\n"
+  else
+	  	echo -e "******** Kein Backup der Camconfig vorhanden! ********\n"
+ fi
+fi
+
+if [ "$binarys" = "y" ]
+ then
+ if [ -e $DIR/bin.tar ]
+	then
+     	tar -xvf $DIR/bin.tar -C / >> $DIR/restore.log
+			echo -e "******** Binarys wurde wiederhergestellt ********\n"
+  else
+	  	echo -e "******** Kein Backup der Binarys vorhanden! ********\n"
+ fi
+fi
+
+if [ "$addonmanager" = "y" ]; then
+ if [ -e $DIR/am.tar ]
+	then
+     	tar -xvf $DIR/am.tar -C / >> $DIR/restore.log
+			echo -e "******** AddonManager wurde wiederhergestellt ********\n"
+  else
+	  	echo -e "******** Kein Backup vom AddonManager vorhanden! ********\n"
+ fi
+fi
+
+if [ "$settings" = "y" ]
+ then
+ if [ -e $DIR/settings.tar ]
+  then
+      if [ $rebootnow ]; then
+        echo -e "******** Settings und Automounts wiederhergestellt ********\n"
+        echo -e "********************************************"
+        echo -e "******** Box wird nun neu gestartet ********\n"
+        echo -e "********************************************"
+        sleep 3
+        init 4 # kill enigma
+        tar -xvf $DIR/settings.tar -C / >> $DIR/restore.log
+        reboot -f  # reboot, make the settings resistant
+      else
+        tar -xvf $DIR/settings.tar -C / >> $DIR/restore.log
+      fi
+  else
+      echo -e "******** Kein Backup der Settings vorhanden! ********\n"
+  fi
+fi
+
+exit 0
Index: /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/CONTROL/control
===================================================================
--- /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/CONTROL/control	(revision 8656)
+++ /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/CONTROL/control	(revision 8656)
@@ -0,0 +1,10 @@
+Package: enigma2-plugin-system-permanenttimeshift
+Version: 1.018
+Architecture: sh4
+OE: PermanentTimeshift 1.0 RC18
+Section: extra
+Priority: optional
+Maintainer: homey@battletracker.com
+Homepage: www.i-have-a-dreambox.com
+Description: PermanentTimeshift v1.0 RC18 by homey activates permanent timeshifting of the channel you are watching.
+Source: www.i-have-a-dreambox.com
Index: /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/CONTROL/postinst
===================================================================
--- /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/CONTROL/postinst	(revision 8656)
+++ /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/CONTROL/postinst	(revision 8656)
@@ -0,0 +1,13 @@
+#!/bin/sh
+TMP=/tmp/.system
+PLUGINDIR=/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift
+
+echo "successfully installed"
+echo "syncing disk"
+sync
+if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
+	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
+	FREE=`expr $SPACE - 100`
+	echo new freespace size $FREE kb
+fi
+exit 0
Index: /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/CONTROL/postrm
===================================================================
--- /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/CONTROL/postrm	(revision 8656)
+++ /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/CONTROL/postrm	(revision 8656)
@@ -0,0 +1,14 @@
+#!/bin/sh
+TMP=/tmp/.system
+PLUGINDIR=/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift
+rm -r $PLUGINDIR > /dev/null 2>&1
+
+echo "successfully removed"
+echo "syncing disk"
+sync
+if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
+	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
+	FREE=`expr $SPACE - 100`
+	echo new freespace size $FREE kb
+fi
+exit 0
Index: /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/CONTROL/preinst
===================================================================
--- /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/CONTROL/preinst	(revision 8656)
+++ /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/CONTROL/preinst	(revision 8656)
@@ -0,0 +1,44 @@
+#!/bin/sh
+#
+TMP=/tmp/.system
+echo "syncing disk"
+sync
+
+model=`cat /etc/model`
+echo""
+echo "Checking your Boxtype...."
+echo "Some Plugins will not work correctly on your $model!"
+echo ""
+if [ "$model" = "" ]; then
+	echo "Sorry! This Plugin is not available for your $model because it will not work correctly!!!"
+	echo "Aborting installation..."
+	exit 1
+else
+	echo "Boxtype: $model OK"
+fi
+
+if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
+	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
+	FREE=`expr $SPACE - 100`
+	SIZE=115
+	echo "checking freespace"
+	echo packege size $SIZE kb
+	echo freespace size $FREE kb
+	if  [ "$FREE" -lt "$SIZE" ]; then
+		echo "sorry no freespace left on device"
+		exit 1
+	else
+		echo ok
+	fi
+fi   
+echo "installing PermanentTimeshift v1.0 RC18..."
+echo "checking OS"
+if  [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then                      
+	echo ---------------------------
+	echo DONT USE this IPK Package!!
+	echo ---
+	echo Only for AAF Image!!
+	echo ---------------------------
+	exit 1
+fi
+exit 0
Index: /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/CONTROL/prerm
===================================================================
--- /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/CONTROL/prerm	(revision 8656)
+++ /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/CONTROL/prerm	(revision 8656)
@@ -0,0 +1,11 @@
+#!/bin/sh
+TMP=/tmp/.system
+echo "syncing disk"
+sync
+if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
+	SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
+	FREE=`expr $SPACE - 100`
+	echo freespace size $FREE kb
+fi
+echo "removing PermanentTimeshift v1.0 RC18"
+exit 0
Index: /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/LICENSE
===================================================================
--- /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/LICENSE	(revision 8656)
+++ /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/LICENSE	(revision 8656)
@@ -0,0 +1,8 @@
+This plugin is licensed under the Creative Commons 
+Attribution-NonCommercial-ShareAlike 3.0 Unported 
+License. To view a copy of this license, visit
+http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative
+Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
+
+In addition, this plugin may only be distributed and executed on
+hardware which is licensed by Dream Multimedia GmbH.
Index: /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/keymap.xml
===================================================================
--- /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/keymap.xml	(revision 8656)
+++ /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/keymap.xml	(revision 8656)
@@ -0,0 +1,14 @@
+<keymap>
+	<map context="PTS_InstantRecordActions">
+		<key id="KEY_RECORD" mapto="instantRecord" flags="m" />
+	</map>
+	
+	<map context="PTS_SeekPointerActions">
+		<key id="KEY_OK" mapto="SeekPointerOK" flags="m" />
+<!-- HDF PATCH ADDED FOR AAF VERSION-->
+		<key id="KEY_STOP" mapto="SeekPointerStop" flags="m" />
+<!-- ###############################-->
+		<key id="KEY_LEFT" mapto="SeekPointerLeft" flags="mr" />
+		<key id="KEY_RIGHT" mapto="SeekPointerRight" flags="mr" />
+	</map>
+</keymap>
Index: /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/locale/de/LC_MESSAGES/PTSPlugin.po
===================================================================
--- /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/locale/de/LC_MESSAGES/PTSPlugin.po	(revision 8656)
+++ /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/locale/de/LC_MESSAGES/PTSPlugin.po	(revision 8656)
@@ -0,0 +1,144 @@
+# German translations for PTS Plugin package.
+# This file is distributed under the same license as the tuxbox-enigma package.
+# Automatically generated, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pts-enigma 0.0.1\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-01-28 23:54+0000\n"
+"PO-Revision-Date: 2010-06-26 13:22+0100\n"
+"Last-Translator: Homey <homey@battletracker.com>\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Poedit-Language: German\n"
+"X-Poedit-SourceCharset: iso-8859-15\n"
+"X-Poedit-Country: GERMANY\n"
+
+msgid "Save and stop"
+msgstr "Save and stop"
+
+msgid "Save and record"
+msgstr "Save and record"
+
+msgid "Don't save"
+msgstr "Nicht speichern"
+
+msgid "Saving Timeshift files"
+msgstr "Speichere Timeshift Dateien"
+
+msgid "Merging Timeshift files"
+msgstr "Füge Timeshift Dateien zusammen"
+
+msgid "Saving timeshift as movie now. This might take a while!"
+msgstr "Speichere nun Timeshift als Film. Das kann eine Weile dauern!"
+
+msgid "Records successfully merged!"
+msgstr "Aufnahmen erfolgreich zusammengefügt!"
+
+msgid "Record started! Stopping timeshift now ..."
+msgstr "Aufnahme gestartet! Stoppe timeshift aufnahme ..."
+
+msgid "Record"
+msgstr "Aufnahme"
+
+msgid "Timeshift"
+msgstr "Timeshift"
+
+msgid ""
+"Could not activate Permanent-Timeshift!\n"
+"Timeshift-Path does not exist"
+msgstr ""
+"Permanent-Timeshift konnte nicht aktiviert werden!\n"
+"Aufnahmeverzeichnis existiert nicht!"
+
+msgid ""
+"OH NO!\n"
+"The timeshift that was marked to save at end of event, was lost because you zapped away!"
+msgstr ""
+"OH NEIN!\n"
+"Die Timeshiftaufnahme wurde noch nicht gespeichert weil du zu früh weggezapped hast!"
+
+msgid "Timeshift saved to your harddisk!"
+msgstr "Timeshiftaufnahme auf Festplatte gespeichert!"
+
+msgid "Timeshift copied to your harddisk!"
+msgstr "Timeshiftaufnahme auf Festplatte kopiert!"
+
+msgid "Timeshift save failed!"
+msgstr "Fehler beim speichern der Timeshiftaufnahme!"
+
+msgid "No Timeshift found to save as recording!"
+msgstr "Keine Timeshift Datei gefunden zum speichern!"
+
+msgid "Permanent Timeshift Settings"
+msgstr "Permanent Timeshift Einstellungen"
+
+msgid ""
+"The Timeshift record was not saved yet!\n"
+"What do you want to do now with the timeshift file?"
+msgstr ""
+"Die Timeshiftaufnahme wurde noch nicht gespeichert!\n"
+"Was möchtest du nun mit der Timeshift aufnahme tun?"
+
+msgid "Which event do you want to save permanently?"
+msgstr "Welche Sendung möchtest du permanent speichern?"
+
+msgid "Save Timeshift as Movie and stop recording"
+msgstr "Timeshiftaufnahme als Film speichern und Aufnahme beenden"
+
+msgid "Save Timeshift as Movie and continue recording"
+msgstr "Timeshiftaufnahme als Film speichern und weiter aufnehmen"
+
+msgid "Don't save Timeshift as Movie"
+msgstr "Timeshiftaufnahme nicht als Film speichern"
+
+msgid "Current Event:"
+msgstr "Aktuelle Sendung:"
+
+msgid "Getting Event Info failed!"
+msgstr "Fehler bei lesen der Event-Infos!"
+
+msgid ""
+"Maximum Timeshift length per Event reached!\n"
+"Restarting Timeshift now ..."
+msgstr ""
+"Maximale länge für eine Timeshiftaufnahme erreicht!\n"
+"Timeshiftaufnahme wird neu gestartet ..."
+
+msgid "Timeshift will get saved at end of event!"
+msgstr "Timeshiftaufnahme wird am Ende dieses Films gespeichert!"
+
+msgid "save recording (stop after current event)"
+msgstr "Aufnahme speichern (Aktuelle Sendung)"
+
+msgid "save recording (Select event)"
+msgstr "Aufnahme speichern (Sendung auswählen)"
+
+msgid "Permanent Timeshift Enable"
+msgstr "Permanent Timeshift aktivieren"
+
+msgid "Permanent Timeshift Max Events"
+msgstr "Permanent Timeshift Max Sendungen"
+
+msgid "Permanent Timeshift Max Length"
+msgstr "Permanent Timeshift Max Länge"
+
+msgid "Permanent Timeshift Start Delay"
+msgstr "Permanent Timeshift Start Verzögerung"
+
+msgid "Timeshift-Save Action on zap"
+msgstr "Timeshift-Save Aktion beim zap"
+
+msgid "Show PTS Infobar while timeshifting?"
+msgstr "PTS Infobar anzeigen während des timeshiftens?"
+
+msgid "Stop timeshift while recording?"
+msgstr "Timeshift beenden wenn Aufnahme läuft?"
+
+msgid "Creating Hardlink to Timeshift file failed!"
+msgstr "Fehler beim erstellen des Hardlinks zur Timeshift Datei!"
+
Index: /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/locale/it/LC_MESSAGES/PTSPlugin.po
===================================================================
--- /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/locale/it/LC_MESSAGES/PTSPlugin.po	(revision 8656)
+++ /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/locale/it/LC_MESSAGES/PTSPlugin.po	(revision 8656)
@@ -0,0 +1,282 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: enigma2 - permanenttimeshift\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-04-28 13:56+0100\n"
+"PO-Revision-Date: 2010-04-30 10:31+0100\n"
+"Last-Translator: Spaeleus <spaeleus@croci.org>\n"
+"Language-Team: www.linsat.net <spaeleus@croci.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Italian\n"
+"X-Poedit-Country: ITALY\n"
+"X-Poedit-SourceCharset: iso-8859-1\n"
+"X-Poedit-Basepath: /home/dario/Plugins/PermanentTimeshift\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Poedit-SearchPath-0: /home/dario/Plugins/PermanentTimeshift\n"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:52
+msgid "Ask user"
+msgstr "Chiedere"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:52
+msgid "Save and stop"
+msgstr "Salvare e fermare"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:52
+msgid "Save and record"
+msgstr "Salvare e registrare"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:52
+msgid "Don't save"
+msgstr "Non salvare"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:164
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1147
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1148
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1157
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1158
+msgid "Timeshift"
+msgstr "Timeshift"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:211
+msgid ""
+"OH NO!\n"
+"The timeshift that was marked to save at end of event, was lost because you zapped away!"
+msgstr ""
+"OH NO!\n"
+"Il salvataggio del timeshift previsto al termine evento ora non sarà più possibile a causa dello zap!"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:319
+msgid ""
+"Timeshift Buffer Full!\n"
+" Cleaning Buffer and restarting timeshift ..."
+msgstr ""
+"Buffer timeshift pieno!\n"
+" Il buffer sarà ripulito e timeshift riavviato..."
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:396
+msgid "No Timeshift found to save as recording!"
+msgstr "Nessun timeshift trovato da salvare come registrazione!"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:437
+msgid "Timeshift saved to your harddisk!"
+msgstr "Timeshift salvato su harddisk!"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:448
+msgid "We try to copy the file now. This might take a while!"
+msgstr "Copia del file incorso. Potrebbe richiedere un po' di tempo..."
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:475
+msgid "Timeshift save failed!"
+msgstr "Salvataggio timeshift fallito!"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:479
+msgid ""
+"The Timeshift record was not saved yet!\n"
+"What do you want to do now with the timeshift file?"
+msgstr ""
+"Il file timeshift non è ancora stato salvato!\n"
+"Cosa si desidera fare con il file timeshift?"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:480
+msgid "Save Timeshift as Movie and stop recording"
+msgstr "Salvare il timeshift come registrazione e arrestarla"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:481
+msgid "Save Timeshift as Movie and continue recording"
+msgstr "Salvare il timeshift come registrazione e continuare a registrare"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:482
+msgid "Don't save Timeshift as Movie"
+msgstr "Non salvare il timeshift come registrazione"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:499
+msgid "Current Event:"
+msgstr "Evento corrente:"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:518
+#, python-format
+msgid "Record #%s: %s"
+msgstr "Registrare #%s: %s"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:520
+msgid "Which event do you want to save permanently?"
+msgstr "Quale evento salvare permanentemente?"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:574
+msgid "Getting Event Info failed!"
+msgstr "Recupero informazioni evento fallito!"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:618
+msgid "Creating Hardlink to Timeshift file failed!"
+msgstr "Creazione hardlink al file timeshift fallita!"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:658
+msgid ""
+"Merging Timeshift records now!\n"
+"This might take a while ..."
+msgstr ""
+"Unione file timeshift in corso.\n"
+"Potrebbe richiedere un po' di tempo..."
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:675
+#, python-format
+msgid ""
+"PTS-Plugin: Merging records failed!\n"
+"Eventnames did not match ...\n"
+"\n"
+"SRC: %s\n"
+"DEST:%s"
+msgstr ""
+"PST-Plugin: unione file fallita!\n"
+"I nomi evento non corrispondono...\n"
+"\n"
+"SORG: %s\n"
+"DEST: %s"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:895
+msgid ""
+"Could not activate Permanent-Timeshift!\n"
+"\n"
+"Timeshift-Path does not exist"
+msgstr ""
+"Impossibile attivare Permanent-Timeshift!\n"
+"\n"
+"Non esiste un percorso timeshift."
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:910
+msgid ""
+"Maximum Timeshift length per Event reached!\n"
+"Restarting Timeshift now ..."
+msgstr ""
+"Raggiunta la massima durata timeshift consentita per evento!\n"
+"Riavvio timeshift in corso..."
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1073
+msgid "Timeshift will get saved at end of event!"
+msgstr "Il timeshift sarà salvato al ternine dell'evento!"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1134
+msgid "No HDD found or HDD not initialized!"
+msgstr "HDD non trovato o non formattato!"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1139
+msgid ""
+"A recording is currently running.\n"
+"What do you want to do?"
+msgstr ""
+"Registrazione in corso!\n"
+"Cosa si desidera fare?"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1140
+msgid "stop recording"
+msgstr "\"Fermare registrazione"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1141
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1153
+msgid "add recording (stop after current event)"
+msgstr "Avviare registrazione (evento corrente)"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1142
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1154
+msgid "add recording (indefinitely)"
+msgstr "Avviare registrazione (illimitata)"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1143
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1155
+msgid "add recording (enter recording duration)"
+msgstr "Avviare registrazione (inserire durata)"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1144
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1156
+msgid "add recording (enter recording endtime)"
+msgstr "Avviare registrazione (inserire ora termine)"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1145
+msgid "change recording (duration)"
+msgstr "Cambiare durata registrazione"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1146
+msgid "change recording (endtime)"
+msgstr "\"Cambiare ora fine registrazione"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1147
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1157
+msgid "save recording (stop after current event)"
+msgstr "Salvare registrazione (evento corrente)"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1148
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1158
+msgid "save recording (Select event)"
+msgstr "Salvare registrazione (selezionare evento)"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1149
+msgid "do nothing"
+msgstr "Non fare nulla"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1152
+msgid "Start recording?"
+msgstr "Avviare la registrazione?"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1159
+msgid "don't record"
+msgstr "\"Uscire senza registrare"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1170
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1252
+msgid "Permanent Timeshift Settings"
+msgstr "Configurazione Permanent Timeshift"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1184
+msgid "OK"
+msgstr "Ok"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1185
+msgid "Cancel"
+msgstr "Annull."
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1194
+msgid "Permanent Timeshift Enable"
+msgstr "Abilitare Permanent Timeshift"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1197
+msgid "Permanent Timeshift Max Events"
+msgstr "Numero massimo eventi Permanent Timeshift"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1198
+msgid "Permanent Timeshift Max Length"
+msgstr "Massima durata Permanent Timeshift"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1199
+msgid "Permanent Timeshift Start Delay"
+msgstr "Ritardo avvio Permanent Timeshift"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1200
+msgid "Timeshift-Save Action on zap"
+msgstr "Azione salvataggio timeshift su zap"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1201
+msgid "Beta: Copy Movie when hardlinking failed?"
+msgstr "Beta: copiare il file su fallimento hardlink?"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1202
+msgid "Beta: Show PTS Infobar while timeshifting?"
+msgstr "Beta: mostrare le informazioni PTS durante il timeshift?"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1203
+msgid "Beta: Merge PTS and Instant Record later?"
+msgstr "Beta: unire PTS e registrazione istantanea più tardi?"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1204
+msgid "Beta: Margin after recording current event?"
+msgstr "Beta: margine al termine dell'evento corrente?"
+
+#: /home/dario/Plugins/PermanentTimeshift/plugin.py:1246
+msgid "Timeshift Settings"
+msgstr "Configurazione timeshift"
+
+#~ msgid "Disable Instant Record Button"
+#~ msgstr "Disabilitare pulsante registrazione immediata"
+
Index: /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/locale/pl/LC_MESSAGES/PTSPlugin.po
===================================================================
--- /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/locale/pl/LC_MESSAGES/PTSPlugin.po	(revision 8656)
+++ /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/locale/pl/LC_MESSAGES/PTSPlugin.po	(revision 8656)
@@ -0,0 +1,152 @@
+# Polish translations for PTS Plugin package.
+# This file is distributed under the same license as the tuxbox-enigma package.
+# Converted from German version.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version:  1.0.0.RC11\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-05-16 13:00+0200\n"
+"PO-Revision-Date: 2010-06-15 12:42+0200\n"
+"Last-Translator: Maciek  <tv_sat@maciej-orzech.pl>\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+
+msgid "Save and stop"
+msgstr "Zapisz i zatrzymaj"
+
+msgid "Save and record"
+msgstr "Zapisz i nagraj"
+
+msgid "Don't save"
+msgstr "Nie zapisuj"
+
+msgid "Timeshift"
+msgstr "Timeshift"
+
+msgid ""
+"OH NO!\n"
+"The timeshift that was marked to save at end of event, was lost because you zapped away!"
+msgstr ""
+"O NIE!\n"
+"Timeshift oznaczony jako do zapisu po wydarzeniu został utracony gdyż przełączono kanał!!"
+
+msgid "Timeshift saved to your harddisk!"
+msgstr "Timeshift zapisany  na Twój dysk twardy!"
+
+msgid "Timeshift copied to your harddisk!"
+msgstr "Timeshift skopiowany na Twój dysk twardy!"
+
+msgid "Timeshift save failed!"
+msgstr "Zapis timeshift-u nie powiódł się!"
+
+msgid "No Timeshift found to save as recording!"
+msgstr "Nie znaleziono timeshift-u do zapisu jako nagranie!"
+
+msgid "Permanent Timeshift Settings"
+msgstr "Ustawienia automatycznego timeshift-u"
+
+msgid ""
+"The Timeshift record was not saved yet!\n"
+"What do you want to do now with the timeshift file?"
+msgstr ""
+"Timeshift nie został jeszcze zapisany!\n"
+"Co zrobić z plikiem timeshift-u?"
+
+msgid "Which event do you want to save permanently?"
+msgstr "Które z wydarzeń zapisań na stałe?"
+
+msgid "Save Timeshift as Movie and stop recording"
+msgstr "Zapisz timeshift jako film i zakończ nagrywanie"
+
+msgid "Save Timeshift as Movie and continue recording"
+msgstr "Zapisz timeshift jako film i kontynuuj nagrywanie"
+
+msgid "Don't save Timeshift as Movie"
+msgstr "Nie zapisuj timeshift-u jako film"
+
+msgid "Current Event:"
+msgstr "Bieżące wydarzenie:"
+
+msgid "Getting Event Info failed!"
+msgstr "Pobieranie informacji o wydarzeniu nie powiodło się!"
+
+msgid ""
+"Maximum Timeshift length per Event reached!\n"
+"Restarting Timeshift now ..."
+msgstr ""
+"Osiągnięto maksymalną długość timeshift-u dla wydarzenia!\n"
+"Trwa ponowne uruchomienie timeshift-u ..."
+
+msgid "Timeshift will get saved at end of event!"
+msgstr "Timeshift zostanie nagrany po zakończeniu wydarzenia!"
+
+msgid "save recording (stop after current event)"
+msgstr "zapisz nagranie (zatrzymaj po bieżącym wydarzeniu)"
+
+msgid "save recording (Select event)"
+msgstr "zapisz nagranie (wybierz wydarzenie)"
+
+msgid "Permanent Timeshift Enable"
+msgstr "Automatyczny timeshift aktywny"
+
+msgid "Permanent Timeshift Max Events"
+msgstr "Maksymalna liczba wydarzeń"
+
+msgid "Permanent Timeshift Max Length"
+msgstr "Maksymalna długość"
+
+msgid "Permanent Timeshift Start Delay"
+msgstr "Początkowe opóźnienie"
+
+msgid "Timeshift-Save Action on zap"
+msgstr "Zachowanie dot. zapisywania przy przełączaniu"
+
+msgid "Clean Timeshift Buffer on zap?"
+msgstr "Czyścić bufor timeshift przy przełączaniu?"
+
+msgid "Creating Hardlink to Timeshift file failed!"
+msgstr "Utworzenie twardego dowiązania do pliku timeshift-u nie powiodło się!"
+
+msgid "Timeshift Buffer Full!\n Cleaning Buffer and restarting timeshift ..."
+msgstr "Bufor timeshiftu-u zapełniony!\n Trwa czyszczenie bufora i ponowne uruchomianie timeshift-u ..."
+
+msgid "We try to copy the file now. This might take a while!"
+msgstr "Próba kopiowania pliku. To może potrwać!"
+
+msgid "Filesystems like FAT32 do not support hardlinks!"
+msgstr "Niektóre systemy plików (np. FAT32) nie pozwalają na twarde dowiązania!"
+
+msgid "Merging Timeshift records now!\nThis might take a while ..."
+msgstr "Trwa łączenie nagrań timeshift-u!\nProszę czekać ..."
+
+msgid "Could not activate Permanent-Timeshift!\n\nTimeshift-Path does not exist"
+msgstr "Nie można aktywować automatycznego timeshift-u!\n\nŚcieżka timeshift-u nie istnieje"
+
+msgid "Timeshift Settings"
+msgstr "Ustawienia timeshift-u"
+
+msgid "Beta: Copy Movie when hardlinking failed?"
+msgstr "TEST: Skopiować film gdy utowrzenie twardego łącza nie uda się?"
+
+msgid "Beta: Show PTS Infobar while timeshifting?"
+msgstr "TEST: Pokazać infobar timeshift-a podczas działania?"
+
+msgid "Beta: Merge PTS and Instant Record later?"
+msgstr "TEST: Łączyć timeshift i szybkie nagranie później?"
+
+msgid "Beta: Margin after recording current event?"
+msgstr "TEST: Margines po nagraniu bieżącego wydarzenia?"
+
+msgid "Copy Movie when hardlinking failed?"
+msgstr "Skopiować film gdy utowrzenie twardego łącza nie uda się?"
+
+msgid "Show PTS Infobar while timeshifting?"
+msgstr "Pokazać infobar timeshift-a podczas działania?"
+
+msgid "Stop timeshift while recording?"
+msgstr "Zatrzymać timeshift podczas nagrywania?"
Index: /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/locale/ru/LC_MESSAGES/PTSPlugin.po
===================================================================
--- /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/locale/ru/LC_MESSAGES/PTSPlugin.po	(revision 8656)
+++ /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/locale/ru/LC_MESSAGES/PTSPlugin.po	(revision 8656)
@@ -0,0 +1,168 @@
+# Rusian translations for PTS Plugin package.
+# This file is distributed under the same license as the tuxbox-enigma package.
+# Converted from German version.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pts-enigma 1.0.0.RC13\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-05-16 13:00+0200\n"
+"PO-Revision-Date: 2010-06-25 13:18+0300\n"
+"Last-Translator: Pavel Chernov <p070707@rambler.ru>\n"
+"Language-Team: http://gisclub.tv/\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Poedit-Language: Russian\n"
+"X-Poedit-SourceCharset: utf-8\n"
+
+msgid "Save and stop"
+msgstr "Сохранить и остановить"
+
+msgid "Save and record"
+msgstr "Сохранить и записать"
+
+msgid "Don't save"
+msgstr "Не сохранять"
+
+msgid "Timeshift"
+msgstr "Временной сдвиг"
+
+msgid ""
+"OH NO!\n"
+"The timeshift that was marked to save at end of event, was lost because you zapped away!"
+msgstr ""
+"О НЕТ!!\n"
+"Временной сдвиг, который должен был быть сохранен, утерян из-за того что вы переключили канал!"
+
+msgid "Timeshift saved to your harddisk!"
+msgstr "Временной сдвиг сохранен на Вас жесткий диск!"
+
+msgid "Timeshift copied to your harddisk!"
+msgstr "Временной сдвиг скопирован на Ваш жесткий диск!"
+
+msgid "Timeshift save failed!"
+msgstr "Ошибка сохранения временного сдвига!"
+
+msgid "No Timeshift found to save as recording!"
+msgstr "Не найден временной сдвиг для сохранения в виде записи!"
+
+msgid "Permanent Timeshift Settings"
+msgstr "Настройки временного сдвига"
+
+msgid ""
+"The Timeshift record was not saved yet!\n"
+"What do you want to do now with the timeshift file?"
+msgstr ""
+"Запись временного сдвига не была еще сохранена!\n"
+"Что вы хотите сделать с сохраненным файлом временного сдвига ?"
+
+msgid "Which event do you want to save permanently?"
+msgstr "Какое событие вы хотите сохранить из временного сдвига ?"
+
+msgid "Save Timeshift as Movie and stop recording"
+msgstr "Сохранить временной сдвиг и остановить запись"
+
+msgid "Save Timeshift as Movie and continue recording"
+msgstr "Сохранить временной сдвиг и продолжить запись"
+
+msgid "Don't save Timeshift as Movie"
+msgstr "Не сохранять временной сдвиг в виде записи"
+
+msgid "Current Event:"
+msgstr "Текущие событие:"
+
+msgid "Getting Event Info failed!"
+msgstr "Ошибка получение информации о текущем событии!"
+
+msgid ""
+"Maximum Timeshift length per Event reached!\n"
+"Restarting Timeshift now ..."
+msgstr ""
+"Максимальное время временного сдвига исчерпано!\n"
+"Делаю перезагрузку временного сдвига ..."
+
+msgid "Timeshift will get saved at end of event!"
+msgstr "Временной сдвиг будет сохранен до конца события!"
+
+msgid "save recording (stop after current event)"
+msgstr "Сохр. запись (стоп после тек. события)"
+
+msgid "save recording (Select event)"
+msgstr "Сохранить запись (выбрать событие)"
+
+msgid "Permanent Timeshift Enable"
+msgstr "Временной сдвиг включен"
+
+msgid "Permanent Timeshift Max Events"
+msgstr "Максимальное количество событий"
+
+msgid "Permanent Timeshift Max Length"
+msgstr "Максимальная длина записи"
+
+msgid "Permanent Timeshift Start Delay"
+msgstr "Задержка на включение временного сдвига"
+
+msgid "Timeshift-Save Action on zap"
+msgstr "Действие при переключении канала"
+
+msgid "Clean Timeshift Buffer on zap?"
+msgstr "Очистить буффер при переключении канала ?"
+
+msgid "Creating Hardlink to Timeshift file failed!"
+msgstr "Creating Hardlink to Timeshift file failed!"
+
+msgid ""
+"Timeshift Buffer Full!\n"
+" Cleaning Buffer and restarting timeshift ..."
+msgstr ""
+"Буфер временного сдвига переполнено!!\n"
+"Очищаю буфер и делаю перезагрузку плагина..."
+
+msgid "We try to copy the file now. This might take a while!"
+msgstr "Мы пытаемся скопировать файл. Это займет некоторе время..."
+
+msgid "Filesystems like FAT32 do not support hardlinks!"
+msgstr "Файловая система FAT32 не совсем совсместима с данным плагином."
+
+msgid ""
+"Merging Timeshift records now!\n"
+"This might take a while ..."
+msgstr ""
+"Обьединяю записи временного сдвига!\n"
+"Это займет некоторое время ..."
+
+msgid ""
+"Could not activate Permanent-Timeshift!\n"
+"\n"
+"Timeshift-Path does not exist"
+msgstr ""
+"Не могу запустить временной сдвиг!\n"
+"\n"
+"Проверьте пути установки"
+
+msgid "Timeshift Settings"
+msgstr "Настройки временного сдвига"
+
+msgid "Beta: Copy Movie when hardlinking failed?"
+msgstr "Beta: Copy Movie when hardlinking failed?"
+
+msgid "Beta: Show PTS Infobar while timeshifting?"
+msgstr "Beta: Show PTS Infobar while timeshifting?"
+
+msgid "Beta: Merge PTS and Instant Record later?"
+msgstr "Beta: Merge PTS and Instant Record later?"
+
+msgid "Beta: Margin after recording current event?"
+msgstr "Beta: Margin after recording current event?"
+
+msgid "Copy Movie when hardlinking failed?"
+msgstr "Copy Movie when hardlinking failed?"
+
+msgid "Show PTS Infobar while timeshifting?"
+msgstr "Показывать PTS инфо-бар во время временного сдвига?"
+
+msgid "Stop timeshift while recording?"
+msgstr "Остановить сдвиг времени на время записи ?"
+
Index: /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/maintainer.info
===================================================================
--- /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/maintainer.info	(revision 8656)
+++ /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/maintainer.info	(revision 8656)
@@ -0,0 +1,2 @@
+homey@battletracker.com
+Permanent Timeshift Plugin
Index: /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/plugin.py
===================================================================
--- /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/plugin.py	(revision 8656)
+++ /ipk/source.sh4/system_permanenttimeshift_1_0_RC18/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/plugin.py	(revision 8656)
@@ -0,0 +1,1426 @@
+#######################################################
+# Permanent Timeshift Plugin for Enigma2 Dreamboxes
+# Coded by Homey (c) 2010
+#
+# Version: 1.00 RC18
+# Support: www.i-have-a-dreambox.com
+#######################################################
+from Components.ActionMap import ActionMap
+from Components.ConfigList import ConfigList, ConfigListScreen
+from Components.config import config, configfile, getConfigListEntry, ConfigSubsection, ConfigYesNo, ConfigInteger, ConfigSelection
+from Components.Label import Label
+from Components.Language import language
+from Components.Pixmap import Pixmap
+from Components.ServiceEventTracker import ServiceEventTracker
+from Components.Sources.StaticText import StaticText
+from Components.Task import Task, Job, job_manager as JobManager
+from Components.UsageConfig import preferredInstantRecordPath, defaultMoviePath
+from Screens.ChoiceBox import ChoiceBox
+from Screens.ChannelSelection import ChannelSelection
+from Screens.InfoBar import InfoBar
+from Screens.InfoBarGenerics import NumberZap, InfoBarSeek, InfoBarNumberZap, InfoBarEPG, InfoBarTimeshiftState, InfoBarInstantRecord, InfoBarChannelSelection
+from Screens.MessageBox import MessageBox
+from Screens.Screen import Screen
+from Screens.Setup import SetupSummary
+from Screens.PVRState import TimeshiftState
+from ServiceReference import ServiceReference
+from Tools import Directories, ASCIItranslit
+from Tools.Directories import fileExists, copyfile, resolveFilename, SCOPE_LANGUAGE, SCOPE_PLUGINS
+from Plugins.Plugin import PluginDescriptor
+from RecordTimer import RecordTimerEntry, parseEvent
+
+from re import search as re_search
+from enigma import eTimer, eServiceCenter, eBackgroundFileEraser, eConsoleAppContainer, iPlayableService, iServiceInformation
+from os import environ, stat as os_stat, listdir as os_listdir, link as os_link, path as os_path, statvfs
+from time import localtime, time, strftime
+from timer import TimerEntry
+
+import gettext
+import Screens.InfoBar
+
+##############################
+#####  CONFIG SETTINGS   #####
+##############################
+
+config.plugins.pts = ConfigSubsection()
+config.plugins.pts.enabled = ConfigYesNo(default = False)
+config.plugins.pts.maxevents = ConfigInteger(default=5, limits=(1, 99))
+config.plugins.pts.maxlength = ConfigInteger(default=180, limits=(5, 999))
+config.plugins.pts.startdelay = ConfigInteger(default=5, limits=(5, 999))
+config.plugins.pts.showinfobar = ConfigYesNo(default = False)
+config.plugins.pts.stopwhilerecording = ConfigYesNo(default = False)
+config.plugins.pts.favoriteSaveAction = ConfigSelection([("askuser", _("Ask user")),("savetimeshift", _("Save and stop")),("savetimeshiftandrecord", _("Save and record")),("noSave", _("Don't save"))], "askuser")
+
+##############################
+###   Multilanguage Init   ###
+##############################
+
+def localeInit():
+	lang = language.getLanguage()
+	environ["LANGUAGE"] = lang[:2]
+	gettext.bindtextdomain("enigma2", resolveFilename(SCOPE_LANGUAGE))
+	gettext.textdomain("enigma2")
+	gettext.bindtextdomain("PTSPlugin", "%s%s" % (resolveFilename(SCOPE_PLUGINS), "Extensions/PermanentTimeshift/locale/"))
+
+def _(txt):
+	t = gettext.dgettext("PTSPlugin", txt)
+	if t == txt:
+		t = gettext.gettext(txt)
+	return t
+
+localeInit()
+language.addCallback(localeInit)
+
+###################################
+###  PTS TimeshiftState Screen  ###
+###################################
+
+class PTSTimeshiftState(Screen):
+	skin = """
+		<screen position="center,40" zPosition="2" size="420,70" backgroundColor="transpBlack" flags="wfNoBorder">
+			<widget name="state" position="10,3" size="80,27" font="Regular;20" halign="center" backgroundColor="transpBlack" />
+			<widget source="session.CurrentService" render="Label" position="95,5" size="120,27" font="Regular;20" halign="left" foregroundColor="white" backgroundColor="transpBlack">
+				<convert type="ServicePosition">Position</convert>
+			</widget>
+			<widget source="session.CurrentService" render="Label" position="350,5" size="60,27" font="Regular;20" halign="left" foregroundColor="white" backgroundColor="transpBlack">
+				<convert type="ServicePosition">Length</convert>
+			</widget>
+			<widget name="PTSSeekPointer" position="8,30" zPosition="3" size="19,50" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/images/timeline-now.png" alphatest="on" />
+			<ePixmap position="10,33" size="840,15" zPosition="1" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/images/slider_back.png" alphatest="on"/>
+			   <widget source="session.CurrentService" render="Progress" position="10,33" size="390,15" zPosition="2" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/PermanentTimeshift/images/slider.png" transparent="1">
+				<convert type="ServicePosition">Position</convert>
+			</widget>
+			<widget name="eventname" position="10,49" zPosition="4" size="420,20" font="Regular;18" halign="center" backgroundColor="transpBlack" />
+		</screen>"""
+
+	def __init__(self, session):
+		Screen.__init__(self, session)
+		self["state"] = Label(text="")
+		self["PTSSeekPointer"] = Pixmap()
+		self["eventname"] = Label(text="")
+		
+
+###################################
+###   PTS CopyTimeshift Task    ###
+###################################
+
+class CopyTimeshiftJob(Job):
+	def __init__(self, toolbox, cmdline):
+		Job.__init__(self, _("Saving Timeshift files"))
+		self.toolbox = toolbox
+		AddCopyTimeshiftTask(self, cmdline)
+
+class AddCopyTimeshiftTask(Task):
+	def __init__(self, job, cmdline):
+		Task.__init__(self, job, job.name)
+		self.toolbox = job.toolbox
+		self.setCmdline(cmdline)
+
+	def afterRun(self):
+		self.toolbox.ptsCopyFilefinished(self.returncode)
+
+###################################
+###   PTS MergeTimeshift Task   ###
+###################################
+
+class MergeTimeshiftJob(Job):
+	def __init__(self, toolbox, cmdline):
+		Job.__init__(self, _("Merging Timeshift files"))
+		self.toolbox = toolbox
+		AddMergeTimeshiftTask(self, cmdline)
+
+class AddMergeTimeshiftTask(Task):
+	def __init__(self, job, cmdline):
+		Task.__init__(self, job, job.name)
+		self.toolbox = job.toolbox
+		self.setCmdline(cmdline)
+
+	def afterRun(self):
+		self.toolbox.ptsMergeFilefinished(self.returncode)
+
+
+##############################
+#####  Class InfoBarPTS  #####
+##############################
+class InfoBarPTS(InfoBar):
+	def __init__(self, session):
+		InfoBar.__init__(self, session)
+		self.skinName = "InfoBar"
+
+		self.__event_tracker = ServiceEventTracker(screen = self, eventmap =
+			{
+				iPlayableService.evStart: self.__evStart,
+				iPlayableService.evEnd: self.__evEnd,
+				iPlayableService.evSOF: self.__evSOF,
+				iPlayableService.evUpdatedInfo: self.__evInfoChanged,
+				iPlayableService.evUpdatedEventInfo: self.__evEventInfoChanged,
+				iPlayableService.evSeekableStatusChanged: self.__seekableStatusChanged,
+				iPlayableService.evUser+1: self.ptsTimeshiftFileChanged
+			})
+
+		self["PTSactions"] = ActionMap(["PTS_GlobalActions"],{"instantRecord": self.instantRecord, "restartTimeshift": self.restartTimeshift},-2)
+#---> HDF CHANGE FOR AAF VERSION
+#		self["PTSSeekPointerActions"] = ActionMap(["PTS_SeekPointerActions"],{"SeekPointerOK": self.ptsSeekPointerOK, "SeekPointerLeft": self.ptsSeekPointerLeft, "SeekPointerRight": self.ptsSeekPointerRight},-2)
+#---<
+#+++>
+		self["PTSSeekPointerActions"] = ActionMap(["PTS_SeekPointerActions"],{"SeekPointerOK": self.ptsSeekPointerOK, "SeekPointerLeft": self.ptsSeekPointerLeft, "SeekPointerRight": self.ptsSeekPointerRight, "SeekPointerStop": self.stopTimeshift},-2)
+#+++<
+		self["PTSSeekPointerActions"].setEnabled(False)
+
+		self.pts_begintime = 0
+		self.pts_pathchecked = False
+		self.pts_delmergeRecordName = None
+		self.pts_pvrStateDialog = "TimeshiftState"
+		self.pts_seektoprevfile = False
+		self.pts_switchtolive = False
+		self.pts_currplaying = 1
+		self.pts_lastseekspeed = 0
+		self.pts_service_changed = False
+		self.pts_record_running = self.session.nav.RecordTimer.isRecording()
+		self.save_current_timeshift = False
+		self.save_timeshift_postaction = None
+		self.save_timeshift_filename = None
+		self.service_changed = 0
+
+		# Init eBackgroundFileEraser
+		self.BgFileEraser = eBackgroundFileEraser.getInstance()
+
+		# Init PTS Delay-Timer
+		self.pts_delay_timer = eTimer()
+		self.pts_delay_timer.callback.append(self.ActivatePermanentTimeshift)
+
+		# Init PTS LengthCheck-Timer
+		self.pts_LengthCheck_timer = eTimer()
+		self.pts_LengthCheck_timer.callback.append(self.ptsLengthCheck)
+
+		# Init PTS MergeRecords-Timer
+		self.pts_mergeRecords_timer = eTimer()
+		self.pts_mergeRecords_timer.callback.append(self.ptsMergeRecords)
+
+		# Init PTS CleanUp-Timer
+		self.pts_cleanUp_timer = eTimer()
+		self.pts_cleanUp_timer.callback.append(self.ptsCleanTimeshiftFolder)
+		self.pts_cleanUp_timer.start(30000, True)
+
+		# Init PTS SeekBack-Timer
+		self.pts_SeekBack_timer = eTimer()
+		self.pts_SeekBack_timer.callback.append(self.ptsSeekBackTimer)
+
+		# Record Event Tracker
+		self.session.nav.RecordTimer.on_state_change.append(self.ptsTimerEntryStateChange)
+
+		# Keep Current Event Info for recordings
+		self.pts_eventcount = 1
+		self.pts_curevent_begin = int(time())
+		self.pts_curevent_end = 0
+		self.pts_curevent_name = _("Timeshift")
+		self.pts_curevent_description = ""
+		self.pts_curevent_servicerefname = ""
+		self.pts_curevent_station = ""
+		self.pts_curevent_eventid = None
+
+		# Init PTS Infobar
+		self.pts_seekpointer_MinX = 8
+		self.pts_seekpointer_MaxX = 396 # make sure you can divide this through 2
+
+	def __evStart(self):
+		self.service_changed = 1
+		self.pts_delay_timer.stop()
+		self.pts_service_changed = True
+
+	def __evEnd(self):
+		self.service_changed = 0
+
+	def __evSOF(self):
+		if not config.plugins.pts.enabled.value or not self.timeshift_enabled:
+			return
+
+		if self.pts_currplaying == 1:
+			preptsfile = config.plugins.pts.maxevents.value
+		else:
+			preptsfile = self.pts_currplaying-1
+
+		# Switch to previous TS file by seeking forward to next one
+		if fileExists("%s/pts_livebuffer.%s" % (config.usage.timeshift_path.value, preptsfile), 'r') and preptsfile != self.pts_eventcount:
+			self.pts_seektoprevfile = True
+			self.ptsSetNextPlaybackFile("pts_livebuffer.%s" % (preptsfile))
+
+			self.setSeekState(self.SEEK_STATE_PAUSE)
+			if self.seekstate != self.SEEK_STATE_PLAY:
+				self.setSeekState(self.SEEK_STATE_PLAY)
+			self.doSeek(-1)
+			self.seekFwd()
+
+	def __evInfoChanged(self):
+		if self.service_changed:
+			self.service_changed = 0
+
+			# Delete Timeshift Records on zap
+			self.pts_eventcount = 0
+			self.pts_cleanUp_timer.start(3000, True)
+
+			# Ooops, we zapped away before saving the file :(
+			if self.save_current_timeshift:
+				self.save_current_timeshift = False
+				self.session.open(MessageBox,_("OH NO!\nThe timeshift that was marked to save at end of event, was lost because you zapped away!"), MessageBox.TYPE_INFO)
+
+	def __evEventInfoChanged(self):
+		if not config.plugins.pts.enabled.value:
+			return
+
+		# Get Current Event Info
+		service = self.session.nav.getCurrentService()
+		old_begin_time = self.pts_begintime
+		info = service and service.info()
+		ptr = info and info.getEvent(0)
+		self.pts_begintime = ptr and ptr.getBeginTime() or 0
+
+		# Save current TimeShift permanently now ...
+		if info.getInfo(iServiceInformation.sVideoPID) != -1:
+
+			# Take care of Record Margin Time ...
+			if self.save_current_timeshift and self.timeshift_enabled:
+				if config.recording.margin_after.value > 0 and len(self.recording) == 0:
+					self.SaveTimeshift(mergelater=True)
+					recording = RecordTimerEntry(ServiceReference(self.session.nav.getCurrentlyPlayingServiceReference()), time(), time()+(config.recording.margin_after.value*60), self.pts_curevent_name, self.pts_curevent_description, self.pts_curevent_eventid, dirname = config.usage.default_path.value)
+					recording.dontSave = True
+					self.session.nav.RecordTimer.record(recording)
+					self.recording.append(recording)
+				else:
+					self.SaveTimeshift()
+
+			# Restarting active timers after zap ...
+			if self.pts_delay_timer.isActive() and not self.timeshift_enabled:
+				self.pts_delay_timer.start(config.plugins.pts.startdelay.value*1000, True)
+			if self.pts_cleanUp_timer.isActive() and not self.timeshift_enabled:
+				self.pts_cleanUp_timer.start(3000, True)
+
+			# (Re)Start TimeShift
+			if not self.pts_delay_timer.isActive():
+				if not self.timeshift_enabled or old_begin_time != self.pts_begintime or old_begin_time == 0:
+					if self.pts_service_changed:
+						self.pts_service_changed = False
+						self.pts_delay_timer.start(config.plugins.pts.startdelay.value*1000, True)
+					else:
+						self.pts_delay_timer.start(1000, True)
+
+	def __seekableStatusChanged(self):
+		enabled = False
+		if not self.isSeekable() and self.timeshift_enabled:
+			enabled = True
+		self["TimeshiftActivateActions"].setEnabled(enabled)
+
+		enabled = False
+		if config.plugins.pts.enabled.value and config.plugins.pts.showinfobar.value and self.timeshift_enabled and self.isSeekable():
+			enabled = True
+
+		self["PTSSeekPointerActions"].setEnabled(enabled)
+
+		# Reset Seek Pointer And Eventname in InfoBar
+		if config.plugins.pts.enabled.value and config.plugins.pts.showinfobar.value and self.timeshift_enabled and not self.isSeekable():
+			if self.pts_pvrStateDialog == "PTSTimeshiftState":
+				self.pvrStateDialog["eventname"].setText("")
+			self.ptsSeekPointerReset()
+
+		# setNextPlaybackFile() when switching back to live tv
+		if config.plugins.pts.enabled.value and self.timeshift_enabled and not self.isSeekable():
+			self.pts_currplaying = self.pts_eventcount
+			self.ptsSetNextPlaybackFile("pts_livebuffer.%s" % (self.pts_eventcount))
+
+	def ActivatePermanentTimeshift(self):
+		if self.ptsCheckTimeshiftPath() is False or self.session.screen["Standby"].boolean is True or self.ptsLiveTVStatus() is False or (config.plugins.pts.stopwhilerecording.value and self.pts_record_running):
+			return
+
+		# Replace PVR Timeshift State Icon
+		if config.plugins.pts.showinfobar.value:
+			if self.pts_pvrStateDialog != "PTSTimeshiftState":
+				self.pts_pvrStateDialog = "PTSTimeshiftState"
+				self.pvrStateDialog = self.session.instantiateDialog(PTSTimeshiftState)
+		elif not config.plugins.pts.showinfobar.value and self.pts_pvrStateDialog != "TimeshiftState":
+			self.pts_pvrStateDialog = "TimeshiftState"
+			self.pvrStateDialog = self.session.instantiateDialog(TimeshiftState)
+
+		# Set next-file on event change only when watching latest timeshift ...
+		if self.isSeekable() and self.pts_eventcount == self.pts_currplaying:
+			pts_setnextfile = True
+		else:
+			pts_setnextfile = False
+
+		# Update internal Event Counter
+		if self.pts_eventcount >= config.plugins.pts.maxevents.value:
+			self.pts_eventcount = 0
+
+		self.pts_eventcount += 1
+
+		# Do not switch back to LiveTV while timeshifting
+		# Note: This only works with enigma from JAN 2010 or later
+		if self.isSeekable():
+			switchToLive = False
+		else:
+			switchToLive = True
+
+		# setNextPlaybackFile() on event change while timeshifting
+		if self.pts_eventcount > 1 and self.isSeekable() and pts_setnextfile:
+			self.ptsSetNextPlaybackFile("pts_livebuffer.%s" % (self.pts_eventcount))
+
+		# (Re)start Timeshift now
+		self.stopTimeshiftConfirmed(True, switchToLive)
+		ts = self.getTimeshift()
+		if ts and not ts.startTimeshift():
+			self.pts_starttime = time()
+			self.pts_LengthCheck_timer.start(120000)
+			self.timeshift_enabled = 1
+			self.save_timeshift_postaction = None
+			self.ptsGetEventInfo()
+			self.ptsCreateHardlink()
+			self.__seekableStatusChanged()
+		else:
+			self.pts_eventcount = 0
+
+	def startTimeshift(self):
+		if config.plugins.pts.enabled.value:
+			self.pts_delay_timer.stop()
+			self.ActivatePermanentTimeshift()
+			self.activateTimeshiftEndAndPause()
+		else:
+			InfoBar.startTimeshift(self)
+
+	def stopTimeshift(self):
+		if not self.timeshift_enabled:
+			return 0
+
+		# Jump Back to Live TV
+		if config.plugins.pts.enabled.value and self.timeshift_enabled:
+			if self.isSeekable():
+				self.pts_switchtolive = True
+				self.ptsSetNextPlaybackFile("")
+				self.setSeekState(self.SEEK_STATE_PAUSE)
+				if self.seekstate != self.SEEK_STATE_PLAY:
+					self.setSeekState(self.SEEK_STATE_PLAY)
+#---> HDF CHANGE FOT AAF VERSION
+#				self.doSeek(-1) # seek 1 gop before end
+#				self.seekFwd() # seekFwd to switch to live TV
+#---<
+#+++>
+				self.fwdSeekTo(+1)
+#+++<
+				return 1
+			return 0
+		InfoBar.stopTimeshift(self)
+
+	def stopTimeshiftConfirmed(self, confirmed, switchToLive=True):
+		was_enabled = self.timeshift_enabled
+
+		if not confirmed:
+			return
+		ts = self.getTimeshift()
+		if ts is None:
+			return
+
+		try:
+			ts.stopTimeshift(switchToLive)
+		except:
+			ts.stopTimeshift()
+
+		self.timeshift_enabled = 0
+		self.__seekableStatusChanged()
+
+		if was_enabled and not self.timeshift_enabled:
+			self.timeshift_enabled = 0
+			self.pts_LengthCheck_timer.stop()
+
+	def restartTimeshift(self):
+		self.ActivatePermanentTimeshift()
+		self.session.open(MessageBox, _("PTS-Plugin: Restarting timeshift!"), MessageBox.TYPE_INFO, timeout=5)
+
+	def saveTimeshiftPopup(self):
+		self.session.openWithCallback(self.saveTimeshiftPopupCallback, ChoiceBox, \
+			title=_("The Timeshift record was not saved yet!\nWhat do you want to do now with the timeshift file?"), \
+			list=((_("Save Timeshift as Movie and stop recording"), "savetimeshift"), \
+			(_("Save Timeshift as Movie and continue recording"), "savetimeshiftandrecord"), \
+			(_("Don't save Timeshift as Movie"), "noSave")))
+
+	def saveTimeshiftPopupCallback(self, answer):
+		if answer is None:
+			return
+
+		if answer[1] == "savetimeshift":
+			self.saveTimeshiftActions("savetimeshift")
+		elif answer[1] == "savetimeshiftandrecord":
+			self.saveTimeshiftActions("savetimeshiftandrecord")
+		elif answer[1] == "noSave":
+			self.save_current_timeshift = False
+			self.saveTimeshiftActions("noSave")
+
+	def saveTimeshiftEventPopup(self):
+		filecount = 0
+		entrylist = []
+		entrylist.append((_("Current Event:")+" %s" % (self.pts_curevent_name), "savetimeshift"))
+
+		filelist = os_listdir(config.usage.timeshift_path.value)
+
+		if filelist is not None:
+			filelist.sort()
+
+		for filename in filelist:
+			if (filename.startswith("pts_livebuffer.") is True) and (filename.endswith(".del") is False and filename.endswith(".meta") is False and filename.endswith(".copy") is False):
+				statinfo = os_stat("%s/%s" % (config.usage.timeshift_path.value,filename))
+				if statinfo.st_mtime < (time()-5.0):
+					# Get Event Info from meta file
+					readmetafile = open("%s/%s.meta" % (config.usage.timeshift_path.value,filename), "r")
+					servicerefname = readmetafile.readline()[0:-1]
+					eventname = readmetafile.readline()[0:-1]
+					description = readmetafile.readline()[0:-1]
+					begintime = readmetafile.readline()[0:-1]
+					readmetafile.close()
+
+					# Add Event to list
+					filecount += 1
+					entrylist.append((_("Record") + " #%s (%s): %s" % (filecount,strftime("%H:%M",localtime(int(begintime))),eventname), "%s" % filename))
+
+		self.session.openWithCallback(self.recordQuestionCallback, ChoiceBox, title=_("Which event do you want to save permanently?"), list=entrylist)
+
+	def saveTimeshiftActions(self, action = None):
+		if action is None:
+			if config.plugins.pts.favoriteSaveAction.value == "askuser":
+				self.saveTimeshiftPopup()
+				return
+			elif config.plugins.pts.favoriteSaveAction.value == "savetimeshift":
+				self.SaveTimeshift()
+			elif config.plugins.pts.favoriteSaveAction.value == "savetimeshiftandrecord":
+				self.SaveTimeshift(mergelater=True)
+				InfoBarInstantRecord.startInstantRecording(self, limitEvent = True)
+			elif config.plugins.pts.favoriteSaveAction.value == "noSave":
+				self.save_current_timeshift = False
+		elif action == "savetimeshift":
+			self.SaveTimeshift()
+		elif action == "savetimeshiftandrecord":
+			self.SaveTimeshift(mergelater=True)
+			InfoBarInstantRecord.startInstantRecording(self, limitEvent = True)
+		elif action == "noSave":
+			self.save_current_timeshift = False
+
+		# Post PTS Actions like ZAP or whatever the user requested
+		if self.save_timeshift_postaction == "zapUp":
+			InfoBarChannelSelection.zapUp(self)
+		elif self.save_timeshift_postaction == "zapDown":
+			InfoBarChannelSelection.zapDown(self)
+		elif self.save_timeshift_postaction == "historyBack":
+			InfoBarChannelSelection.historyBack(self)
+		elif self.save_timeshift_postaction == "historyNext":
+			InfoBarChannelSelection.historyNext(self)
+		elif self.save_timeshift_postaction == "switchChannelUp":
+			InfoBarChannelSelection.switchChannelUp(self)
+		elif self.save_timeshift_postaction == "switchChannelDown":
+			InfoBarChannelSelection.switchChannelDown(self)
+		elif self.save_timeshift_postaction == "openServiceList":
+			InfoBarChannelSelection.openServiceList(self)
+		elif self.save_timeshift_postaction == "showRadioChannelList":
+			InfoBarChannelSelection.showRadioChannelList(self, zap=True)
+
+	def SaveTimeshift(self, timeshiftfile=None, mergelater=False):
+		self.save_current_timeshift = False
+		savefilename = None
+
+		if not self.timeshift_enabled:
+			return
+
+		if timeshiftfile is not None:
+			savefilename = timeshiftfile
+
+		if savefilename is None:
+			for filename in os_listdir(config.usage.timeshift_path.value):
+				if filename.startswith("timeshift.") and not filename.endswith(".del") and not filename.endswith(".copy"):
+					statinfo = os_stat("%s/%s" % (config.usage.timeshift_path.value,filename))
+					if statinfo.st_mtime > (time()-5.0):
+						savefilename=filename
+
+		if savefilename is None:
+			self.session.open(MessageBox, _("No Timeshift found to save as recording!"), MessageBox.TYPE_ERROR)
+		else:
+			timeshift_saved = True
+			timeshift_saveerror1 = ""
+			timeshift_saveerror2 = ""
+			metamergestring = ""
+
+			if mergelater:
+				self.pts_mergeRecords_timer.start(120000, True)
+				metamergestring = "pts_merge\n"
+
+			try:
+				if timeshiftfile is None:
+					# Save Current Event by creating hardlink to ts file
+					ptsfilename = "%s - %s - %s" % (strftime("%Y%m%d %H%M",localtime(self.pts_starttime)),self.pts_curevent_station,self.pts_curevent_name)
+					try:
+						if config.usage.setup_level.index >= 2:
+							if config.recording.filename_composition.value == "long" and self.pts_curevent_name != pts_curevent_description:
+								ptsfilename = "%s - %s - %s - %s" % (strftime("%Y%m%d %H%M",localtime(self.pts_starttime)),self.pts_curevent_station,self.pts_curevent_name,self.pts_curevent_description)
+							elif config.recording.filename_composition.value == "short":
+								ptsfilename = "%s - %s" % (strftime("%Y%m%d",localtime(self.pts_starttime)),self.pts_curevent_name)
+					except Exception, errormsg:
+						print "PTS-Plugin: Using default filename"
+					
+					if config.recording.ascii_filenames.value:
+						ptsfilename = ASCIItranslit.legacyEncode(ptsfilename)
+
+					fullname = Directories.getRecordingFilename(ptsfilename,config.usage.default_path.value)
+					os_link("%s/%s" % (config.usage.timeshift_path.value,savefilename), "%s.ts" % (fullname))
+					metafile = open("%s.ts.meta" % (fullname), "w")
+					metafile.write("%s\n%s\n%s\n%i\n%s" % (self.pts_curevent_servicerefname,self.pts_curevent_name,self.pts_curevent_description,int(self.pts_starttime),metamergestring))
+					metafile.close()
+				elif timeshiftfile.startswith("pts_livebuffer"):
+					# Save stored timeshift by creating hardlink to ts file
+					readmetafile = open("%s/%s.meta" % (config.usage.timeshift_path.value,timeshiftfile), "r")
+					servicerefname = readmetafile.readline()[0:-1]
+					eventname = readmetafile.readline()[0:-1]
+					description = readmetafile.readline()[0:-1]
+					begintime = readmetafile.readline()[0:-1]
+					readmetafile.close()
+
+					ptsfilename = "%s - %s - %s" % (strftime("%Y%m%d %H%M",localtime(int(begintime))),self.pts_curevent_station,eventname)
+					try:
+						if config.usage.setup_level.index >= 2:
+							if config.recording.filename_composition.value == "long" and eventname != description:
+								ptsfilename = "%s - %s - %s - %s" % (strftime("%Y%m%d %H%M",localtime(int(begintime))),self.pts_curevent_station,eventname,description)
+							elif config.recording.filename_composition.value == "short":
+								ptsfilename = "%s - %s" % (strftime("%Y%m%d",localtime(int(begintime))),eventname)
+					except Exception, errormsg:
+						print "PTS-Plugin: Using default filename"
+						
+					if config.recording.ascii_filenames.value:
+						ptsfilename = ASCIItranslit.legacyEncode(ptsfilename)
+
+					fullname=Directories.getRecordingFilename(ptsfilename,config.usage.default_path.value)
+					os_link("%s/%s" % (config.usage.timeshift_path.value,timeshiftfile),"%s.ts" % (fullname))
+					os_link("%s/%s.meta" % (config.usage.timeshift_path.value,timeshiftfile),"%s.ts.meta" % (fullname))
+
+				self.session.open(MessageBox, _("Timeshift saved to your harddisk!"), MessageBox.TYPE_INFO, timeout=5)
+			except Exception, errormsg:
+				timeshift_saved = False
+				timeshift_saveerror1 = errormsg
+
+			# Hmpppf! Saving Timeshift via Hardlink-Method failed. Probably other device?
+			# Let's try to copy the file in background now! This might take a while ...
+			if not timeshift_saved:
+				try:
+					stat = statvfs(config.usage.default_path.value)
+					freespace = stat.f_bfree / 1000 * stat.f_bsize / 1000
+
+					if timeshiftfile is None:
+						# Get Filesize for Free Space Check
+						filesize = int(os_path.getsize("%s/%s" % (config.usage.timeshift_path.value,savefilename)) / (1024*1024))
+
+						# Save Current Event by copying it to the other device
+						if filesize <= freespace:
+							os_link("%s/%s" % (config.usage.timeshift_path.value,savefilename), "%s/%s.copy" % (config.usage.timeshift_path.value,savefilename))
+							copy_cmd = "cp '%s/%s.copy' '%s.ts'" % (config.usage.timeshift_path.value,savefilename,fullname)
+							metafile = open("%s.ts.meta" % (fullname), "w")
+							metafile.write("%s\n%s\n%s\n%i\n%s" % (self.pts_curevent_servicerefname,self.pts_curevent_name,self.pts_curevent_description,int(self.pts_starttime),metamergestring))
+							metafile.close()
+					elif timeshiftfile.startswith("pts_livebuffer"):
+						# Get Filesize for Free Space Check
+						filesize = int(os_path.getsize("%s/%s" % (config.usage.timeshift_path.value, timeshiftfile)) / (1024*1024))
+
+						# Save stored timeshift by copying it to the other device
+						if filesize <= freespace:
+							os_link("%s/%s" % (config.usage.timeshift_path.value,timeshiftfile), "%s/%s.copy" % (config.usage.timeshift_path.value,timeshiftfile))
+							copyfile("%s/%s.meta" % (config.usage.timeshift_path.value,timeshiftfile),"%s.ts.meta" % (fullname))
+							copy_cmd = "cp '%s/%s.copy' '%s.ts'" % (config.usage.timeshift_path.value,timeshiftfile,fullname)
+
+					# Only copy file when enough disk-space available!
+					if filesize <= freespace:
+						timeshift_saved = True
+						self.session.open(MessageBox, _("Saving timeshift as movie now. This might take a while!"), MessageBox.TYPE_INFO, timeout=5)
+						self.ptsFrontpanelActions("start")
+						JobManager.AddJob(CopyTimeshiftJob(self, copy_cmd))
+					else:
+						timeshift_saved = False
+						timeshift_saveerror1 = ""
+						timeshift_saveerror2 = _("Not enough free Diskspace!\n\nFilesize: %sMB\nFree Space: %sMB\nPath: %s" % (filesize,freespace,config.usage.default_path.value))
+						self.save_timeshift_postaction = None
+
+				except Exception, errormsg:
+					timeshift_saved = False
+					timeshift_saveerror2 = errormsg
+
+			if not timeshift_saved:
+				errormessage = str(timeshift_saveerror1) + "\n" + str(timeshift_saveerror2)
+				self.session.open(MessageBox, _("Timeshift save failed!")+"\n\n%s" % errormessage, MessageBox.TYPE_ERROR)
+
+	def ptsCleanTimeshiftFolder(self):
+		if not config.plugins.pts.enabled.value or self.ptsCheckTimeshiftPath() is False or self.session.screen["Standby"].boolean is True:
+			return
+
+		try:
+			for filename in os_listdir(config.usage.timeshift_path.value):
+				if (filename.startswith("timeshift.") or filename.startswith("pts_livebuffer.")) and (filename.endswith(".del") is False and filename.endswith(".meta") is False and filename.endswith(".copy") is False):
+
+					statinfo = os_stat("%s/%s" % (config.usage.timeshift_path.value,filename))
+					# if no write for 5 sec = stranded timeshift
+					if statinfo.st_mtime < (time()-5.0):
+						print "PTS-Plugin: Erasing stranded timeshift %s" % filename
+						self.BgFileEraser.erase("%s/%s" % (config.usage.timeshift_path.value,filename))
+
+						# Delete Meta File too
+						if filename.startswith("pts_livebuffer.") is True:
+							self.BgFileEraser.erase("%s/%s.meta" % (config.usage.timeshift_path.value,filename))
+		except:
+			print "PTS: IO-Error while cleaning Timeshift Folder ..."
+
+	def ptsGetEventInfo(self):
+		event = None
+		try:
+			serviceref = self.session.nav.getCurrentlyPlayingServiceReference()
+			serviceHandler = eServiceCenter.getInstance()
+			info = serviceHandler.info(serviceref)
+
+			self.pts_curevent_servicerefname = serviceref.toString()
+			self.pts_curevent_station = info.getName(serviceref)
+
+			service = self.session.nav.getCurrentService()
+			info = service and service.info()
+			event = info and info.getEvent(0)
+		except Exception, errormsg:
+			self.session.open(MessageBox, _("Getting Event Info failed!")+"\n\n%s" % errormsg, MessageBox.TYPE_ERROR, timeout=10)
+
+		if event is not None:
+			curEvent = parseEvent(event)
+			self.pts_curevent_begin = int(curEvent[0])
+			self.pts_curevent_end = int(curEvent[1])
+			self.pts_curevent_name = curEvent[2]
+			self.pts_curevent_description = curEvent[3]
+			self.pts_curevent_eventid = curEvent[4]
+
+	def ptsFrontpanelActions(self, action=None):
+		if InfoBarInstantRecord.isInstantRecordRunning(self):
+			return
+
+		if action == "start":
+			try:
+				open("/proc/stb/fp/led0_pattern", "w").write("0x55555555")
+				open("/proc/stb/fp/led_pattern_speed", "w").write("20")
+			except IOError:
+				print "PTS-Plugin: No FrontPanel LED that can start blinking"
+		elif action == "stop":
+			try:
+				open("/proc/stb/fp/led0_pattern", "w").write("0")
+			except IOError:
+				print "PTS-Plugin: No FrontPanel LED that can stop blinking"
+
+	def ptsCreateHardlink(self):
+		for filename in os_listdir(config.usage.timeshift_path.value):
+			if filename.startswith("timeshift.") and not filename.endswith(".del") and not filename.endswith(".copy"):
+				statinfo = os_stat("%s/%s" % (config.usage.timeshift_path.value,filename))
+				if statinfo.st_mtime > (time()-5.0):
+					try:
+						self.BgFileEraser.erase("%s/pts_livebuffer.%s" % (config.usage.timeshift_path.value,self.pts_eventcount))
+					except Exception, e:
+						print "PTS Plugin: %s" % (e)
+
+					try:
+						os_link("%s/%s" % (config.usage.timeshift_path.value,filename), "%s/pts_livebuffer.%s" % (config.usage.timeshift_path.value,self.pts_eventcount))
+
+						# Create a Meta File
+						metafile = open("%s/pts_livebuffer.%s.meta" % (config.usage.timeshift_path.value,self.pts_eventcount), "w")
+						metafile.write("%s\n%s\n%s\n%i\n" % (self.pts_curevent_servicerefname,self.pts_curevent_name,self.pts_curevent_description,int(self.pts_starttime)))
+						metafile.close()
+					except Exception, errormsg:
+						self.session.open(MessageBox, _("Creating Hardlink to Timeshift file failed!")+"\nFilesystems like FAT32 do not support hardlinks!"+"\n\n%s" % errormsg, MessageBox.TYPE_ERROR)
+
+	def ptsMergeRecords(self):
+		if InfoBarInstantRecord.isInstantRecordRunning(self):
+			self.pts_mergeRecords_timer.start(120000, True)
+			return
+
+		ptsmergeSRC = ""
+		ptsmergeDEST = ""
+		ptsmergeeventname = ""
+		ptsgetnextfile = False
+
+		filelist = os_listdir(config.usage.default_path.value)
+
+		if filelist is not None:
+			filelist.sort()
+
+		for filename in filelist:
+			if filename.endswith(".meta"):
+				# Get Event Info from meta file
+				readmetafile = open("%s/%s" % (config.usage.default_path.value,filename), "r")
+				servicerefname = readmetafile.readline()[0:-1]
+				eventname = readmetafile.readline()[0:-1]
+				eventtitle = readmetafile.readline()[0:-1]
+				eventtime = readmetafile.readline()[0:-1]
+				eventtag = readmetafile.readline()[0:-1]
+				readmetafile.close()
+
+				if ptsgetnextfile:
+					ptsgetnextfile = False
+					ptsmergeSRC = filename[0:-5]
+
+					if ASCIItranslit.legacyEncode(eventname) == ASCIItranslit.legacyEncode(ptsmergeeventname):
+						self.pts_delmergeRecordName = ptsmergeSRC
+						self.ptsFrontpanelActions("start")
+
+						self.session.open(MessageBox,_("Merging Timeshift records now!\nThis might take a while ..."), MessageBox.TYPE_INFO, timeout=5)
+
+						# Copy EIT File
+						copyfile("%s/%s.eit" % (config.usage.default_path.value, ptsmergeSRC[0:-3]),"%s/%s.eit" % (config.usage.default_path.value, ptsmergeDEST[0:-3]))
+
+						# Delete AP File
+						self.BgFileEraser.erase("%s/%s.ap" % (config.usage.default_path.value, ptsmergeDEST))
+
+						# Add Merge Job to JobManager
+						JobManager.AddJob(MergeTimeshiftJob(self, "cat '%s/%s' >> '%s/%s'" % (config.usage.default_path.value,ptsmergeSRC,config.usage.default_path.value,ptsmergeDEST)))
+						return
+					else:
+						self.session.open(MessageBox,_("PTS-Plugin: Merging records failed!\nEventnames did not match ...\n\nSRC: %s\nDEST: %s") % (ASCIItranslit.legacyEncode(eventname),ASCIItranslit.legacyEncode(ptsmergeeventname)), MessageBox.TYPE_ERROR)
+
+				if eventtag == "pts_merge":
+					ptsgetnextfile = True
+					ptsmergeDEST = filename[0:-5]
+					ptsmergeeventname = eventname
+
+					# If still recording or transfering, try again later ...
+					statinfo = os_stat("%s/%s" % (config.usage.default_path.value,ptsmergeDEST))
+					if statinfo.st_mtime > (time()-10.0):
+						self.pts_mergeRecords_timer.start(120000, True)
+						return
+
+					# Rewrite Meta File to get rid of pts_merge tag
+					metafile = open("%s/%s.meta" % (config.usage.default_path.value,ptsmergeDEST), "w")
+					metafile.write("%s\n%s\n%s\n%i\n" % (servicerefname,eventname,eventtitle,int(eventtime)))
+					metafile.close()
+
+	def ptsCopyFilefinished(self,retval):
+		for filename in os_listdir(config.usage.timeshift_path.value):
+			if filename.endswith(".copy"):
+				self.BgFileEraser.erase("%s/%s" % (config.usage.timeshift_path.value,filename))
+
+		# Restart Merge Timer
+		if self.pts_mergeRecords_timer.isActive():
+			self.pts_mergeRecords_timer.stop()
+			self.pts_mergeRecords_timer.start(15000, True)
+		else:
+			self.ptsFrontpanelActions("stop")
+			self.session.open(MessageBox, _("Timeshift saved to your harddisk!"), MessageBox.TYPE_INFO, timeout = 5)
+
+	def ptsMergeFilefinished(self,retval):
+		if self.pts_delmergeRecordName is not None:
+			# Delete Instant Record permanently now ... R.I.P.
+			self.BgFileEraser.erase("%s/%s" % (config.usage.default_path.value,self.pts_delmergeRecordName))
+			self.BgFileEraser.erase("%s/%s.eit" % (config.usage.default_path.value,self.pts_delmergeRecordName[0:-3]))
+			self.BgFileEraser.erase("%s/%s.ap" % (config.usage.default_path.value,self.pts_delmergeRecordName))
+			self.BgFileEraser.erase("%s/%s.cuts" % (config.usage.default_path.value,self.pts_delmergeRecordName))
+			self.BgFileEraser.erase("%s/%s.meta" % (config.usage.default_path.value,self.pts_delmergeRecordName))
+			self.BgFileEraser.erase("%s/%s.sc" % (config.usage.default_path.value,self.pts_delmergeRecordName))
+
+			self.pts_delmergeRecordName = None
+
+		self.ptsFrontpanelActions("stop")
+		self.session.open(MessageBox,("Records successfully merged!"), MessageBox.TYPE_INFO, timeout = 5)
+
+	def ptsGetSeekInfo(self):
+		s = self.session.nav.getCurrentService()
+		return s and s.seek()
+
+	def ptsGetPosition(self):
+		seek = self.ptsGetSeekInfo()
+		if seek is None:
+			return None
+		pos = seek.getPlayPosition()
+		if pos[0]:
+			return 0
+		return pos[1]
+
+	def ptsGetLength(self):
+		seek = self.ptsGetSeekInfo()
+		if seek is None:
+			return None
+		length = seek.getLength()
+		if length[0]:
+			return 0
+		return length[1]
+
+	def ptsSeekPointerOK(self):
+		if self.pts_pvrStateDialog == "PTSTimeshiftState" and self.timeshift_enabled and self.isSeekable():
+			if not self.pvrstate_hide_timer.isActive():
+				if self.seekstate != self.SEEK_STATE_PLAY:
+					self.setSeekState(self.SEEK_STATE_PLAY)
+				self.doShow()
+				return
+
+			length = self.ptsGetLength()
+			position = self.ptsGetPosition()
+
+			if length is None or position is None:
+				return
+
+			cur_pos = self.pvrStateDialog["PTSSeekPointer"].position
+			jumptox = int(cur_pos[0]) - int(self.pts_seekpointer_MinX)
+			jumptoperc = round((jumptox / 400.0) * 100, 0)
+			jumptotime = int((length / 100) * jumptoperc)
+			jumptodiff = position - jumptotime
+
+			self.doSeekRelative(-jumptodiff)
+		else:
+			return
+
+	def ptsSeekPointerLeft(self):
+		if self.pts_pvrStateDialog == "PTSTimeshiftState" and self.timeshift_enabled and self.isSeekable():
+			self.ptsMoveSeekPointer(direction="left")
+		else:
+			return
+
+	def ptsSeekPointerRight(self):
+		if self.pts_pvrStateDialog == "PTSTimeshiftState" and self.timeshift_enabled and self.isSeekable():
+			self.ptsMoveSeekPointer(direction="right")
+		else:
+			return
+
+	def ptsSeekPointerReset(self):
+		if self.pts_pvrStateDialog == "PTSTimeshiftState" and self.timeshift_enabled:
+			self.pvrStateDialog["PTSSeekPointer"].setPosition(self.pts_seekpointer_MinX,self.pvrStateDialog["PTSSeekPointer"].position[1])
+
+	def ptsSeekPointerSetCurrentPos(self):
+		if not self.pts_pvrStateDialog == "PTSTimeshiftState" or not self.timeshift_enabled or not self.isSeekable():
+			return
+		
+		position = self.ptsGetPosition()
+		length = self.ptsGetLength()
+		
+		if length >= 1:
+			tpixels = int((float(int((position*100)/length))/100)*400)
+			self.pvrStateDialog["PTSSeekPointer"].setPosition(self.pts_seekpointer_MinX+tpixels, self.pvrStateDialog["PTSSeekPointer"].position[1])
+
+	def ptsMoveSeekPointer(self, direction=None):
+		if direction is None or self.pts_pvrStateDialog != "PTSTimeshiftState":
+			return
+
+		isvalidjump = False
+		cur_pos = self.pvrStateDialog["PTSSeekPointer"].position
+		InfoBarTimeshiftState._mayShow(self)
+
+		if direction == "left":
+			minmaxval = self.pts_seekpointer_MinX
+			movepixels = -15
+			if cur_pos[0]+movepixels > minmaxval:
+				isvalidjump = True
+		elif direction == "right":
+			minmaxval = self.pts_seekpointer_MaxX
+			movepixels = 15
+			if cur_pos[0]+movepixels < minmaxval:
+				isvalidjump = True
+		else:
+			return 0
+
+		if isvalidjump:
+			self.pvrStateDialog["PTSSeekPointer"].setPosition(cur_pos[0]+movepixels,cur_pos[1])
+		else:
+			self.pvrStateDialog["PTSSeekPointer"].setPosition(minmaxval,cur_pos[1])
+
+	def ptsTimeshiftFileChanged(self):
+		# Reset Seek Pointer
+		if config.plugins.pts.enabled.value and config.plugins.pts.showinfobar.value:
+			self.ptsSeekPointerReset()
+		
+		if self.pts_switchtolive:
+			self.pts_switchtolive = False
+			return
+
+		if self.pts_seektoprevfile:
+			if self.pts_currplaying == 1:
+				self.pts_currplaying = config.plugins.pts.maxevents.value
+			else:
+				self.pts_currplaying -= 1
+		else:
+			if self.pts_currplaying == config.plugins.pts.maxevents.value:
+				self.pts_currplaying = 1
+			else:
+				self.pts_currplaying += 1
+
+		if not fileExists("%s/pts_livebuffer.%s" % (config.usage.timeshift_path.value,self.pts_currplaying), 'r'):
+			self.pts_currplaying = self.pts_eventcount
+
+		# Set Eventname in PTS InfoBar
+		if config.plugins.pts.enabled.value and config.plugins.pts.showinfobar.value:
+			try:
+				if self.pts_eventcount != self.pts_currplaying:
+					readmetafile = open("%s/pts_livebuffer.%s.meta" % (config.usage.timeshift_path.value,self.pts_currplaying), "r")
+					servicerefname = readmetafile.readline()[0:-1]
+					eventname = readmetafile.readline()[0:-1]
+					readmetafile.close()
+					self.pvrStateDialog["eventname"].setText(eventname)
+				else:
+					self.pvrStateDialog["eventname"].setText("")
+			except Exception, errormsg:
+				self.pvrStateDialog["eventname"].setText("")
+		
+		# Get next pts file ...
+		if self.pts_currplaying+1 > config.plugins.pts.maxevents.value:
+			nextptsfile = 1
+		else:
+			nextptsfile = self.pts_currplaying+1
+
+		# Seek to previous file
+		if self.pts_seektoprevfile:
+			self.pts_seektoprevfile = False
+
+			if fileExists("%s/pts_livebuffer.%s" % (config.usage.timeshift_path.value,nextptsfile), 'r'):
+				self.ptsSetNextPlaybackFile("pts_livebuffer.%s" % (nextptsfile))
+
+			self.ptsSeekBackHack()
+		else:
+			if fileExists("%s/pts_livebuffer.%s" % (config.usage.timeshift_path.value,nextptsfile), 'r') and nextptsfile <= self.pts_eventcount:
+				self.ptsSetNextPlaybackFile("pts_livebuffer.%s" % (nextptsfile))
+			if nextptsfile == self.pts_currplaying:
+				self.pts_switchtolive = True
+				self.ptsSetNextPlaybackFile("")
+
+	def ptsSetNextPlaybackFile(self, nexttsfile):
+		ts = self.getTimeshift()
+		if ts is None:
+			return
+
+		try:
+			ts.setNextPlaybackFile("%s/%s" % (config.usage.timeshift_path.value,nexttsfile))
+		except:
+			print "PTS-Plugin: setNextPlaybackFile() not supported by OE. Enigma2 too old !?"
+
+	def ptsSeekBackHack(self):
+		if not config.plugins.pts.enabled.value or not self.timeshift_enabled:
+			return
+
+		self.setSeekState(self.SEEK_STATE_PAUSE)
+		self.doSeek(-90000*4) # seek ~4s before end
+		self.pts_SeekBack_timer.start(1000, True)
+
+	def ptsSeekBackTimer(self):
+		if self.pts_lastseekspeed == 0:
+			self.setSeekState(self.makeStateBackward(int(config.seek.enter_backward.value)))
+		else:
+			self.setSeekState(self.makeStateBackward(int(-self.pts_lastseekspeed)))
+
+	def ptsCheckTimeshiftPath(self):
+		if self.pts_pathchecked:
+			return True
+		else:
+			if fileExists(config.usage.timeshift_path.value, 'w'):
+				self.pts_pathchecked = True
+				return True
+			else:
+				self.session.open(MessageBox, _("Could not activate Permanent-Timeshift!\nTimeshift-Path does not exist"), MessageBox.TYPE_ERROR, timeout=15)
+				if self.pts_delay_timer.isActive():
+					self.pts_delay_timer.stop()
+				if self.pts_cleanUp_timer.isActive():
+					self.pts_cleanUp_timer.stop()
+				return False
+
+	def ptsTimerEntryStateChange(self, timer):
+		if not config.plugins.pts.enabled.value or not config.plugins.pts.stopwhilerecording.value:
+			return
+
+		self.pts_record_running = self.session.nav.RecordTimer.isRecording()
+
+		# Abort here when box is in standby mode
+		if self.session.screen["Standby"].boolean is True:
+			return
+
+		# Stop Timeshift when Record started ...
+		if timer.state == TimerEntry.StateRunning and self.timeshift_enabled and self.pts_record_running:
+			if self.ptsLiveTVStatus() is False:
+				self.timeshift_enabled = 0
+				self.pts_LengthCheck_timer.stop()
+				return
+
+			if self.seekstate != self.SEEK_STATE_PLAY:
+				self.setSeekState(self.SEEK_STATE_PLAY)
+
+			if self.isSeekable():
+				self.session.open(MessageBox,_("Record started! Stopping timeshift now ..."), MessageBox.TYPE_INFO, timeout=5)
+
+			self.stopTimeshiftConfirmed(True, False)
+			
+		# Restart Timeshift when all records stopped
+		if timer.state == TimerEntry.StateEnded and not self.timeshift_enabled and not self.pts_record_running:
+			self.ActivatePermanentTimeshift()
+
+		# Restart Merge-Timer when all records stopped
+		if timer.state == TimerEntry.StateEnded and self.pts_mergeRecords_timer.isActive():
+			self.pts_mergeRecords_timer.stop()
+			self.pts_mergeRecords_timer.start(15000, True)
+
+		# Restart FrontPanel LED when still copying or merging files
+		# ToDo: Only do this on PTS Events and not events from other jobs
+		if timer.state == TimerEntry.StateEnded and (len(JobManager.getPendingJobs()) >= 1 or self.pts_mergeRecords_timer.isActive()):
+			self.ptsFrontpanelActions("start")
+		
+	def ptsLiveTVStatus(self):
+		service = self.session.nav.getCurrentService()
+		info = service and service.info()
+		sTSID = info and info.getInfo(iServiceInformation.sTSID) or -1
+
+		if sTSID is None or sTSID == -1:
+			return False
+		else:
+			return True
+
+	def ptsLengthCheck(self):
+		# Check if we are in TV Mode ...
+		if self.ptsLiveTVStatus() is False:
+			self.timeshift_enabled = 0
+			self.pts_LengthCheck_timer.stop()
+			return
+
+		if config.plugins.pts.stopwhilerecording.value and self.pts_record_running:
+			return
+
+		# Length Check
+		if config.plugins.pts.enabled.value and self.session.screen["Standby"].boolean is not True and self.timeshift_enabled and (time() - self.pts_starttime) >= (config.plugins.pts.maxlength.value * 60):
+			if self.save_current_timeshift:
+				self.saveTimeshiftActions("savetimeshift")
+				self.ActivatePermanentTimeshift()
+				self.save_current_timeshift = True
+			else:
+				self.ActivatePermanentTimeshift()
+			self.session.open(MessageBox,_("Maximum Timeshift length per Event reached!\nRestarting Timeshift now ..."), MessageBox.TYPE_INFO, timeout=5)
+
+#Replace the InfoBar with our version ;)
+Screens.InfoBar.InfoBar = InfoBarPTS
+
+############
+#zapUp Hack#
+############
+InfoBarChannelSelection_zapUp = InfoBarChannelSelection.zapUp
+
+def zapUp(self):
+	if self.save_current_timeshift and self.timeshift_enabled:
+		self.save_timeshift_postaction = "zapUp"
+		InfoBarPTS.saveTimeshiftActions(self)
+	else:
+		InfoBarChannelSelection_zapUp(self)
+
+InfoBarChannelSelection.zapUp = zapUp
+
+##############
+#zapDown Hack#
+##############
+InfoBarChannelSelection_zapDown = InfoBarChannelSelection.zapDown
+
+def zapDown(self):
+	if self.save_current_timeshift and self.timeshift_enabled:
+		self.save_timeshift_postaction = "zapDown"
+		InfoBarPTS.saveTimeshiftActions(self)
+	else:
+		InfoBarChannelSelection_zapDown(self)
+
+InfoBarChannelSelection.zapDown = zapDown
+
+##################
+#historyBack Hack#
+##################
+InfoBarChannelSelection_historyBack = InfoBarChannelSelection.historyBack
+
+def historyBack(self):
+	if self.save_current_timeshift and self.timeshift_enabled:
+		self.save_timeshift_postaction = "historyBack"
+		InfoBarPTS.saveTimeshiftActions(self)
+	elif self.pts_pvrStateDialog == "PTSTimeshiftState" and self.timeshift_enabled and self.isSeekable():
+		InfoBarTimeshiftState._mayShow(self)
+		self.pvrStateDialog["PTSSeekPointer"].setPosition(self.pts_seekpointer_MinX, self.pvrStateDialog["PTSSeekPointer"].position[1])
+		if self.seekstate != self.SEEK_STATE_PLAY:
+			self.setSeekState(self.SEEK_STATE_PLAY)
+		self.ptsSeekPointerOK()
+	else:
+		InfoBarChannelSelection_historyBack(self)
+
+InfoBarChannelSelection.historyBack = historyBack
+
+##################
+#historyNext Hack#
+##################
+InfoBarChannelSelection_historyNext = InfoBarChannelSelection.historyNext
+
+def historyNext(self):
+	if self.save_current_timeshift and self.timeshift_enabled:
+		self.save_timeshift_postaction = "historyNext"
+		InfoBarPTS.saveTimeshiftActions(self)
+	elif self.pts_pvrStateDialog == "PTSTimeshiftState" and self.timeshift_enabled and self.isSeekable():
+		InfoBarTimeshiftState._mayShow(self)
+		self.pvrStateDialog["PTSSeekPointer"].setPosition(self.pts_seekpointer_MaxX, self.pvrStateDialog["PTSSeekPointer"].position[1])
+		if self.seekstate != self.SEEK_STATE_PLAY:
+			self.setSeekState(self.SEEK_STATE_PLAY)
+		self.ptsSeekPointerOK()
+	else:
+		InfoBarChannelSelection_historyNext(self)
+
+InfoBarChannelSelection.historyNext = historyNext
+
+######################
+#switchChannelUp Hack#
+######################
+InfoBarChannelSelection_switchChannelUp = InfoBarChannelSelection.switchChannelUp
+
+def switchChannelUp(self):
+	if self.save_current_timeshift and self.timeshift_enabled:
+		self.save_timeshift_postaction = "switchChannelUp"
+		InfoBarPTS.saveTimeshiftActions(self)
+	else:
+		InfoBarChannelSelection_switchChannelUp(self)
+
+InfoBarChannelSelection.switchChannelUp = switchChannelUp
+
+########################
+#switchChannelDown Hack#
+########################
+InfoBarChannelSelection_switchChannelDown = InfoBarChannelSelection.switchChannelDown
+
+def switchChannelDown(self):
+	if self.save_current_timeshift and self.timeshift_enabled:
+		self.save_timeshift_postaction = "switchChannelDown"
+		InfoBarPTS.saveTimeshiftActions(self)
+	else:
+		InfoBarChannelSelection_switchChannelDown(self)
+
+InfoBarChannelSelection.switchChannelDown = switchChannelDown
+
+######################
+#openServiceList Hack#
+######################
+InfoBarChannelSelection_openServiceList = InfoBarChannelSelection.openServiceList
+
+def openServiceList(self):
+	if self.save_current_timeshift and self.timeshift_enabled:
+		self.save_timeshift_postaction = "openServiceList"
+		InfoBarPTS.saveTimeshiftActions(self)
+	else:
+		InfoBarChannelSelection_openServiceList(self)
+
+InfoBarChannelSelection.openServiceList = openServiceList
+
+###########################
+#showRadioChannelList Hack#
+###########################
+InfoBarChannelSelection_showRadioChannelList = InfoBarChannelSelection.showRadioChannelList
+
+def showRadioChannelList(self, zap=False):
+	if self.save_current_timeshift and self.timeshift_enabled:
+		self.save_timeshift_postaction = "showRadioChannelList"
+		InfoBarPTS.saveTimeshiftActions(self)
+	else:
+		InfoBarChannelSelection_showRadioChannelList(self, zap)
+
+InfoBarChannelSelection.showRadioChannelList = showRadioChannelList
+
+#######################
+#InfoBarNumberZap Hack#
+#######################
+InfoBarNumberZap_keyNumberGlobal = InfoBarNumberZap.keyNumberGlobal
+
+def keyNumberGlobal(self, number):
+	if self.save_current_timeshift and self.timeshift_enabled:
+		InfoBarPTS.saveTimeshiftActions(self)
+		return
+
+	if self.pts_pvrStateDialog == "PTSTimeshiftState" and self.timeshift_enabled and self.isSeekable() and number == 0:
+		InfoBarTimeshiftState._mayShow(self)
+		self.pvrStateDialog["PTSSeekPointer"].setPosition(self.pts_seekpointer_MaxX/2, self.pvrStateDialog["PTSSeekPointer"].position[1])
+		if self.seekstate != self.SEEK_STATE_PLAY:
+			self.setSeekState(self.SEEK_STATE_PLAY)
+		self.ptsSeekPointerOK()
+		return
+
+	InfoBarNumberZap_keyNumberGlobal(self, number)
+	if number and config.plugins.pts.enabled.value and self.timeshift_enabled and not self.isSeekable():
+		self.session.openWithCallback(self.numberEntered, NumberZap, number)
+
+InfoBarNumberZap.keyNumberGlobal = keyNumberGlobal
+
+###########################
+#InfoBarInstantRecord Hack#
+###########################
+InfoBarInstantRecord_recordQuestionCallback = InfoBarInstantRecord.recordQuestionCallback
+
+def recordQuestionCallback(self, answer):
+	InfoBarInstantRecord_recordQuestionCallback(self, answer)
+
+	if config.plugins.pts.enabled.value:
+		if answer is not None and answer[1] == "savetimeshift":
+			self.session.open(MessageBox,_("Timeshift will get saved at end of event!"), MessageBox.TYPE_INFO, timeout=5)
+			self.save_current_timeshift = True
+
+		if answer is not None and answer[1] == "savetimeshiftEvent":
+			InfoBarPTS.saveTimeshiftEventPopup(self)
+
+		if answer is not None and answer[1].startswith("pts_livebuffer") is True:
+			InfoBarPTS.SaveTimeshift(self, timeshiftfile=answer[1])
+
+InfoBarInstantRecord.recordQuestionCallback = recordQuestionCallback
+
+############################
+#InfoBarTimeshiftState Hack#
+############################
+def _mayShow(self):
+	if self.execing and self.timeshift_enabled and self.isSeekable():
+		InfoBarPTS.ptsSeekPointerSetCurrentPos(self)
+		self.pvrStateDialog.show()
+			
+		self.pvrstate_hide_timer = eTimer()
+		self.pvrstate_hide_timer.callback.append(self.pvrStateDialog.hide)
+
+		if self.seekstate == self.SEEK_STATE_PLAY:
+			idx = config.usage.infobar_timeout.index
+			if not idx:
+				idx = 5
+			self.pvrstate_hide_timer.start(idx*1000, True)
+		else:
+			self.pvrstate_hide_timer.stop()
+	elif self.execing and self.timeshift_enabled and not self.isSeekable():
+		self.pvrStateDialog.hide()
+
+InfoBarTimeshiftState._mayShow = _mayShow
+
+##################
+# seekBack Hack  #
+##################
+InfoBarSeek_seekBack = InfoBarSeek.seekBack
+
+def seekBack(self):
+	InfoBarSeek_seekBack(self)
+	self.pts_lastseekspeed = self.seekstate[1]
+
+InfoBarSeek.seekBack = seekBack
+
+####################
+#instantRecord Hack#
+####################
+InfoBarInstantRecord_instantRecord = InfoBarInstantRecord.instantRecord
+
+def instantRecord(self):
+	if not config.plugins.pts.enabled.value or not self.timeshift_enabled:
+		InfoBarInstantRecord_instantRecord(self)
+		return
+
+	dir = preferredInstantRecordPath()
+	if not dir or not fileExists(dir, 'w'):
+		dir = defaultMoviePath()
+	try:
+		stat = os_stat(dir)
+	except:
+		# XXX: this message is a little odd as we might be recording to a remote device
+		self.session.open(MessageBox, _("No HDD found or HDD not initialized!"), MessageBox.TYPE_ERROR)
+		return
+
+	if self.isInstantRecordRunning():
+		self.session.openWithCallback(self.recordQuestionCallback, ChoiceBox, \
+			title=_("A recording is currently running.\nWhat do you want to do?"), \
+			list=((_("stop recording"), "stop"), \
+			(_("add recording (stop after current event)"), "event"), \
+			(_("add recording (indefinitely)"), "indefinitely"), \
+			(_("add recording (enter recording duration)"), "manualduration"), \
+			(_("add recording (enter recording endtime)"), "manualendtime"), \
+			(_("change recording (duration)"), "changeduration"), \
+			(_("change recording (endtime)"), "changeendtime"), \
+			(_("Timeshift")+" "+_("save recording (stop after current event)"), "savetimeshift"), \
+			(_("Timeshift")+" "+_("save recording (Select event)"), "savetimeshiftEvent"), \
+			(_("do nothing"), "no")))
+	else:
+		self.session.openWithCallback(self.recordQuestionCallback, ChoiceBox, \
+			title=_("Start recording?"), \
+			list=((_("add recording (stop after current event)"), "event"), \
+			(_("add recording (indefinitely)"), "indefinitely"), \
+			(_("add recording (enter recording duration)"), "manualduration"), \
+			(_("add recording (enter recording endtime)"), "manualendtime"), \
+			(_("Timeshift")+" "+_("save recording (stop after current event)"), "savetimeshift"), \
+			(_("Timeshift")+" "+_("save recording (Select event)"), "savetimeshiftEvent"), \
+			(_("don't record"), "no")))
+
+InfoBarInstantRecord.instantRecord = instantRecord
+
+############################
+#####  SETTINGS SCREEN #####
+############################
+class PermanentTimeShiftSetup(Screen, ConfigListScreen):
+	def __init__(self, session):
+		Screen.__init__(self, session)
+		self.skinName = [ "PTSSetup", "Setup" ]
+		self.setup_title = _("Permanent Timeshift Settings")
+
+		self.onChangedEntry = [ ]
+		self.list = [ ]
+		ConfigListScreen.__init__(self, self.list, session = session, on_change = self.changedEntry)
+
+		self["actions"] = ActionMap(["SetupActions", "ColorActions"],
+		{
+			"ok": self.SaveSettings,
+			"green": self.SaveSettings,
+			"red": self.Exit,
+			"cancel": self.Exit
+		}, -2)
+
+		self["key_green"] = StaticText(_("OK"))
+		self["key_red"] = StaticText(_("Cancel"))
+
+		self.createSetup()
+		self.onLayoutFinish.append(self.layoutFinished)
+
+	def layoutFinished(self):
+		self.setTitle(self.setup_title)
+
+	def createSetup(self):
+		self.list = [ getConfigListEntry(_("Permanent Timeshift Enable"), config.plugins.pts.enabled) ]
+		if config.plugins.pts.enabled.value:
+			self.list.extend((
+				getConfigListEntry(_("Permanent Timeshift Max Events"), config.plugins.pts.maxevents),
+				getConfigListEntry(_("Permanent Timeshift Max Length"), config.plugins.pts.maxlength),
+				getConfigListEntry(_("Permanent Timeshift Start Delay"), config.plugins.pts.startdelay),
+				getConfigListEntry(_("Timeshift-Save Action on zap"), config.plugins.pts.favoriteSaveAction),
+				getConfigListEntry(_("Stop timeshift while recording?"), config.plugins.pts.stopwhilerecording),
+				getConfigListEntry(_("Show PTS Infobar while timeshifting?"), config.plugins.pts.showinfobar)
+			))
+
+		self["config"].list = self.list
+		self["config"].setList(self.list)
+
+	def keyLeft(self):
+		ConfigListScreen.keyLeft(self)
+		if self["config"].getCurrent()[1] == config.plugins.pts.enabled:
+			self.createSetup()
+
+	def keyRight(self):
+		ConfigListScreen.keyRight(self)
+		if self["config"].getCurrent()[1] == config.plugins.pts.enabled:
+			self.createSetup()
+
+	def changedEntry(self):
+		for x in self.onChangedEntry:
+			x()
+
+	def getCurrentEntry(self):
+		return self["config"].getCurrent()[0]
+
+	def getCurrentValue(self):
+		return str(self["config"].getCurrent()[1].getText())
+
+	def createSummary(self):
+		return SetupSummary
+
+	def SaveSettings(self):
+		config.plugins.pts.save()
+		configfile.save()
+		self.close()
+
+	def Exit(self):
+		self.close()
+
+#################################################
+
+def startSetup(menuid):
+	if menuid != "system":
+		return [ ]
+	return [(_("Timeshift Settings"), PTSSetupMenu, "pts_setup", 50)]
+
+def PTSSetupMenu(session, **kwargs):
+	session.open(PermanentTimeShiftSetup)
+
+def Plugins(path, **kwargs):
+	return [ PluginDescriptor(name=_("Permanent Timeshift Settings"), description=_("Permanent Timeshift Settings"), where=PluginDescriptor.WHERE_MENU, fnc=startSetup) ]
