diff --git a/packages/mediacenter/kodi/config/guisettings.xml b/packages/mediacenter/kodi/config/guisettings.xml
new file mode 100755
index 0000000000..9078075027
--- /dev/null
+++ b/packages/mediacenter/kodi/config/guisettings.xml
@@ -0,0 +1,5 @@
+
+
+ $HOME/screenshots/
+
+
diff --git a/packages/mediacenter/kodi/config/sources.xml b/packages/mediacenter/kodi/config/sources.xml
new file mode 100644
index 0000000000..0dff1d344b
--- /dev/null
+++ b/packages/mediacenter/kodi/config/sources.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+ Music
+ $HOME/music/
+ true
+
+
+
+
+
+ Pictures
+ $HOME/pictures/
+ true
+
+
+
diff --git a/packages/mediacenter/kodi/package.mk b/packages/mediacenter/kodi/package.mk
index 320e7cd136..4df2ea47f3 100644
--- a/packages/mediacenter/kodi/package.mk
+++ b/packages/mediacenter/kodi/package.mk
@@ -415,8 +415,6 @@ post_makeinstall_target() {
mkdir -p $INSTALL/usr/lib/kodi
cp $PKG_DIR/scripts/kodi-config $INSTALL/usr/lib/kodi
cp $PKG_DIR/scripts/kodi.sh $INSTALL/usr/lib/kodi
- cp $PKG_DIR/scripts/kodi-hacks $INSTALL/usr/lib/kodi
- cp $PKG_DIR/scripts/kodi-sources $INSTALL/usr/lib/kodi
mkdir -p $INSTALL/usr/lib/openelec
cp $PKG_DIR/scripts/systemd-addon-wrapper $INSTALL/usr/lib/openelec
@@ -453,8 +451,11 @@ post_makeinstall_target() {
mkdir -p $INSTALL/usr/lib/python"$PYTHON_VERSION"/site-packages/kodi
cp -R tools/EventClients/lib/python/* $INSTALL/usr/lib/python"$PYTHON_VERSION"/site-packages/kodi
-# install project specific configs
mkdir -p $INSTALL/usr/share/kodi/config
+ cp $PKG_DIR/config/guisettings.xml $INSTALL/usr/share/kodi/config
+ cp $PKG_DIR/config/sources.xml $INSTALL/usr/share/kodi/config
+
+# install project specific configs
if [ -f $PROJECT_DIR/$PROJECT/kodi/guisettings.xml ]; then
cp -R $PROJECT_DIR/$PROJECT/kodi/guisettings.xml $INSTALL/usr/share/kodi/config
fi
@@ -494,8 +495,6 @@ post_install() {
# enable default services
enable_service kodi-autostart.service
enable_service kodi-cleanlogs.service
- enable_service kodi-hacks.service
- enable_service kodi-sources.service
enable_service kodi-halt.service
enable_service kodi-poweroff.service
enable_service kodi-reboot.service
diff --git a/packages/mediacenter/kodi/scripts/kodi-config b/packages/mediacenter/kodi/scripts/kodi-config
index b319a38f31..9af49ca6b6 100755
--- a/packages/mediacenter/kodi/scripts/kodi-config
+++ b/packages/mediacenter/kodi/scripts/kodi-config
@@ -17,6 +17,31 @@
# along with OpenELEC. If not, see .
################################################################################
+
+# hack: make addon-bins executable
+# TODO remove
+chmod +x /storage/.kodi/addons/*/bin/*
+
+# hack: update RSSnews.xml in userdata
+if [ -f /storage/.kodi/userdata/RssFeeds.xml ]; then
+ sed -e "s,http://openelec.tv/news?format=feed&type=rss,http://feeds.openelec.tv/news,g" \
+ -i /storage/.kodi/userdata/RssFeeds.xml
+fi
+
+# setup Kodi sources
+if [ ! -f $HOME/.kodi/userdata/sources.xml ]; then
+ if [ -f /usr/share/kodi/config/sources.xml ]; then
+ cp /usr/share/kodi/config/sources.xml $HOME/.kodi/userdata
+ fi
+fi
+
+# common setup guisettings
+if [ ! -f $HOME/.kodi/userdata/guisettings.xml ] ; then
+ if [ -f /usr/share/kodi/config/guisettings.xml ]; then
+ cp /usr/share/kodi/config/guisettings.xml $HOME/.kodi/userdata
+ fi
+fi
+
if [ -e /run/lirc/lircd.irtrans ]; then
KODI_ARGS="--lircdev /run/lirc/lircd.irtrans"
else
diff --git a/packages/mediacenter/kodi/scripts/kodi-hacks b/packages/mediacenter/kodi/scripts/kodi-hacks
deleted file mode 100755
index 327e9a9ca2..0000000000
--- a/packages/mediacenter/kodi/scripts/kodi-hacks
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-################################################################################
-# This file is part of OpenELEC - http://www.openelec.tv
-# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
-#
-# OpenELEC is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# OpenELEC is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with OpenELEC. If not, see .
-################################################################################
-
-# hack: make addon-bins executable
- chmod +x /storage/.kodi/addons/*/bin/*
-
-# hack: update RSSnews.xml in userdata
- if [ -f /storage/.kodi/userdata/RssFeeds.xml ]; then
- sed -e "s,http://openelec.tv/news?format=feed&type=rss,http://feeds.openelec.tv/news,g" \
- -i /storage/.kodi/userdata/RssFeeds.xml
- fi
diff --git a/packages/mediacenter/kodi/scripts/kodi-sources b/packages/mediacenter/kodi/scripts/kodi-sources
deleted file mode 100755
index 7282fde4d0..0000000000
--- a/packages/mediacenter/kodi/scripts/kodi-sources
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/bin/sh
-################################################################################
-# This file is part of OpenELEC - http://www.openelec.tv
-# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
-#
-# OpenELEC is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# OpenELEC is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with OpenELEC. If not, see .
-################################################################################
-
-. /etc/profile
-
-#
-# setup XBMC sources
-#
-
- if [ ! -f $HOME/.kodi/userdata/sources.xml ]; then
- if [ -f /usr/share/kodi/config/sources.xml ]; then
- # include project specific sources
- cp /usr/share/kodi/config/sources.xml $HOME/.kodi/userdata
- else
- cat > $HOME/.kodi/userdata/sources.xml << EOF
-
-
-
-
-
- Music
- $HOME/music/
- true
-
-
-
-
-
- Pictures
- $HOME/pictures/
- true
-
-
-
-EOF
- fi
- fi
-
-#
-# common setup guisettings
-#
-
- if [ ! -f $HOME/.kodi/userdata/guisettings.xml ] ; then
- echo "" > $HOME/.kodi/userdata/guisettings.xml
-
- cat >> $HOME/.kodi/userdata/guisettings.xml << EOF
-
- $HOME/screenshots/
-
-EOF
-
- #
- # include project specific options
- #
-
- if [ -f /usr/share/kodi/config/guisettings.xml ]; then
- cat /usr/share/kodi/config/guisettings.xml >> $HOME/.kodi/userdata/guisettings.xml
- fi
-
- echo "" >> $HOME/.kodi/userdata/guisettings.xml
- fi
diff --git a/packages/mediacenter/kodi/system.d/kodi-hacks.service b/packages/mediacenter/kodi/system.d/kodi-hacks.service
deleted file mode 100644
index a7f8a7716e..0000000000
--- a/packages/mediacenter/kodi/system.d/kodi-hacks.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Kodi hacks
-Before=kodi.service
-
-[Service]
-Type=oneshot
-Environment=HOME=/storage
-ExecStart=/usr/lib/kodi/kodi-hacks
-RemainAfterExit=yes
-
-[Install]
-WantedBy=kodi.service
diff --git a/packages/mediacenter/kodi/system.d/kodi-sources.service b/packages/mediacenter/kodi/system.d/kodi-sources.service
deleted file mode 100644
index 915483cdbc..0000000000
--- a/packages/mediacenter/kodi/system.d/kodi-sources.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Kodi sources Setup
-Before=kodi.service
-
-[Service]
-Type=oneshot
-Environment=HOME=/storage
-ExecStart=/usr/lib/kodi/kodi-sources
-RemainAfterExit=yes
-
-[Install]
-WantedBy=kodi.service