diff --git a/packages/addons/service/emby/changelog.txt b/packages/addons/service/emby/changelog.txt new file mode 100644 index 0000000000..30cf79a734 --- /dev/null +++ b/packages/addons/service/emby/changelog.txt @@ -0,0 +1,2 @@ +8.0.100 +- Initial release diff --git a/packages/addons/service/emby/icon/icon.png b/packages/addons/service/emby/icon/icon.png new file mode 100644 index 0000000000..2674bc985b Binary files /dev/null and b/packages/addons/service/emby/icon/icon.png differ diff --git a/packages/addons/service/emby/package.mk b/packages/addons/service/emby/package.mk new file mode 100644 index 0000000000..703703c99a --- /dev/null +++ b/packages/addons/service/emby/package.mk @@ -0,0 +1,60 @@ +################################################################################ +# This file is part of LibreELEC - https://libreelec.tv +# Copyright (C) 2016 Team LibreELEC +# +# LibreELEC 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. +# +# LibreELEC 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 LibreELEC. If not, see . +################################################################################ + +PKG_NAME="emby" +PKG_VERSION="3.0.5972" +PKG_REV="100" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="http://emby.media" +PKG_URL="https://github.com/MediaBrowser/Emby/releases/download/$PKG_VERSION/Emby.Mono.zip" +PKG_DEPENDS_TARGET="toolchain mono imagemagick" +PKG_PRIORITY="optional" +PKG_SECTION="service" +PKG_SHORTDESC="Emby: a personal media server" +PKG_LONGDESC="Emby ($PKG_VERSION) brings your home videos, music, and photos together, automatically converting and streaming your media on-the-fly to any device" +PKG_MAINTAINER="Anton Voyl (awiouy)" + +PKG_IS_ADDON="yes" +PKG_ADDON_NAME="Emby (beta)" +PKG_ADDON_TYPE="xbmc.service" +PKG_ADDON_PROVIDES="" +PKG_ADDON_REPOVERSION="8.0" +PKG_ADDON_REQUIRES="tools.mono:0.0.0" + +PKG_AUTORECONF="no" + +unpack() { + mkdir -p $PKG_BUILD +} + +make_target() { + : # nop +} + +makeinstall_target() { + : # nop +} + +addon() { + mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/Emby.Mono + unzip -q $ROOT/$SOURCES/$PKG_NAME/$PKG_SOURCE_NAME -d $ADDON_BUILD/$PKG_ADDON_ID/Emby.Mono + + mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/lib + cp -PR $(get_build_dir imagemagick)/.install_pkg/usr/lib/* $ADDON_BUILD/$PKG_ADDON_ID/lib/ +} diff --git a/packages/addons/service/emby/source/bin/emby.start b/packages/addons/service/emby/source/bin/emby.start new file mode 100644 index 0000000000..dbed4da513 --- /dev/null +++ b/packages/addons/service/emby/source/bin/emby.start @@ -0,0 +1,27 @@ +#!/bin/sh +################################################################################ +# This file is part of LibreELEC - https://libreelec.tv +# Copyright (C) 2016 Team LibreELEC +# +# LibreELEC 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. +# +# LibreELEC 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 LibreELEC. If not, see . +################################################################################ + +. /etc/profile +oe_setup_addon service.emby + +chmod +x $ADDON_DIR/bin/* + +mkdir -p $ADDON_HOME + +mono $ADDON_DIR/Emby.Mono/MediaBrowser.Server.Mono.exe -programdata $ADDON_HOME diff --git a/packages/addons/service/emby/source/default.py b/packages/addons/service/emby/source/default.py new file mode 100644 index 0000000000..3999a0eb31 --- /dev/null +++ b/packages/addons/service/emby/source/default.py @@ -0,0 +1,35 @@ +################################################################################ +# This file is part of LibreELEC - https://libreelec.tv +# Copyright (C) 2016 Team LibreELEC +# +# LibreELEC 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. +# +# LibreELEC 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 LibreELEC. If not, see . +################################################################################ + +import subprocess +import xbmc +import xbmcaddon + + +class Monitor(xbmc.Monitor): + + def __init__(self, *args, **kwargs): + xbmc.Monitor.__init__(self) + self.id = xbmcaddon.Addon().getAddonInfo('id') + + def onSettingsChanged(self): + subprocess.call(['systemctl', 'restart', self.id]) + + +if __name__ == "__main__": + Monitor().waitForAbort() diff --git a/packages/addons/service/emby/source/system.d/service.emby.service b/packages/addons/service/emby/source/system.d/service.emby.service new file mode 100644 index 0000000000..5859e94281 --- /dev/null +++ b/packages/addons/service/emby/source/system.d/service.emby.service @@ -0,0 +1,13 @@ +[Unit] +Description=Emby - streaming server +Documentation=http://emby.media +After=network.target +Requires=network.target + +[Service] +ExecStart=/bin/sh /storage/.kodi/addons/service.emby/bin/emby.start +Restart=always + +[Install] +WantedBy=kodi.target +