tvmosaic: initial addon

This commit is contained in:
awiouy 2018-06-04 23:45:38 +02:00
parent dd4eaa1487
commit fd13b3c456
10 changed files with 207 additions and 0 deletions

View File

@ -0,0 +1,2 @@
100
- Initial addon

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@ -0,0 +1,63 @@
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2018-present 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 <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="tvmosaic"
PKG_VERSION="1.0.0-16296"
PKG_SHA256="63d48e7b0912f2efb6e894252a13d8312679cdcb155ebe3fa758dc88b4f91816"
PKG_REV="100"
PKG_ARCH="arm"
PKG_LICENSE="Prop."
PKG_SITE="https://tv-mosaic.com"
PKG_URL="https://github.com/awiouy/tvmosaic/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain"
PKG_SECTION="service"
PKG_SHORTDESC="TV Mosaic"
PKG_LONGDESC="TV Mosaic ($PKG_VERSION) live and recorded TV for Kodi and DLNA clients"
PKG_TOOLCHAIN="manual"
PKG_BUILD_FLAGS="-strip"
PKG_IS_ADDON="yes"
PKG_ADDON_NAME="TV Mosaic"
PKG_ADDON_TYPE="xbmc.service"
PKG_MAINTAINER="Anton Voyl (awiouy)"
addon() {
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
cp $PKG_BUILD/tvmosaic/tvmosaic_reg \
$PKG_BUILD/tvmosaic/tvmosaic_server \
$PKG_BUILD/tvmosaic/version.dat \
$ADDON_BUILD/$PKG_ADDON_ID/bin
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/config/shared.inst/RecordedTV \
$ADDON_BUILD/$PKG_ADDON_ID/config/shared.inst/channel_logo \
$ADDON_BUILD/$PKG_ADDON_ID/config/shared.inst/xmltv
cp -r $PKG_BUILD/tvmosaic/data \
$PKG_BUILD/tvmosaic/shared.inst \
$ADDON_BUILD/$PKG_ADDON_ID/config
echo $PKG_REV > $ADDON_BUILD/$PKG_ADDON_ID/config/pkg_rev
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/lib
cp -L $PKG_BUILD/tvmosaic/lib/libcares.so.2 \
$PKG_BUILD/tvmosaic/lib/libdvbapi.so \
$PKG_BUILD/tvmosaic/lib/libdvben50221.so \
$PKG_BUILD/tvmosaic/lib/libiconv.so.2 \
$PKG_BUILD/tvmosaic/lib/libidn.so.11 \
$PKG_BUILD/tvmosaic/lib/libssh2.so.1 \
$PKG_BUILD/tvmosaic/lib/libucsi.so \
$ADDON_BUILD/$PKG_ADDON_ID/lib
}

View File

@ -0,0 +1,25 @@
#!/bin/sh
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2018-present 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 <http://www.gnu.org/licenses/>.
################################################################################
. /etc/profile
oe_setup_addon service.tvmosaic
export TVMOSAIC_ROOT_CONFIG_DIR="$ADDON_HOME"
tvmosaic_server -command_line_mode

View File

@ -0,0 +1,42 @@
#!/bin/sh
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2018-present 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 <http://www.gnu.org/licenses/>.
################################################################################
. /etc/profile
oe_setup_addon service.tvmosaic
sleep "$tvm_delay"
export TVMOSAIC_ROOT_CONFIG_DIR="$ADDON_HOME"
pkg_rev() {
cat "$1/pkg_rev" 2> /dev/null
}
if [ "$(pkg_rev $ADDON_DIR/config)" != "$(pkg_rev $ADDON_HOME)" ]; then
cp -r "$ADDON_DIR/config/"* "$ADDON_HOME"
fi
if [ -f "$ADDON_HOME/tvmosaic_configuration.xml" ]; then
tvmosaic_reg -reginstall "$ADDON_HOME/data/common/product_info/tvmosaic.xml" update
else
tvmosaic_reg -preparenewinstall "$ADDON_DIR/bin" "$ADDON_HOME/data" "$ADDON_HOME/shared.inst"
tvmosaic_reg -reginstall "$ADDON_HOME/data/common/product_info/tvmosaic.xml" install
fi
tvmosaic_server

View File

@ -0,0 +1,39 @@
################################################################################
# This file is part of LibreELEC - https://libreelec.tv
# Copyright (C) 2018-present 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 <http://www.gnu.org/licenses/>.
################################################################################
import subprocess
import xbmc
import xbmcaddon
def systemctl(command):
subprocess.call(
['systemctl', command, xbmcaddon.Addon().getAddonInfo('id')])
class Monitor(xbmc.Monitor):
def __init__(self, *args, **kwargs):
xbmc.Monitor.__init__(self)
def onSettingsChanged(self):
systemctl('restart')
if __name__ == '__main__':
Monitor().waitForAbort()

View File

@ -0,0 +1,14 @@
# Kodi Media Center language file
# Addon Name: tvmosaic
# Addon id: service.tvmosaic
# Addon Provider: Team LibreELEC
msgid ""
msgstr ""
msgctxt "#30000"
msgid "Configuration"
msgstr ""
msgctxt "#30001"
msgid "Start delay"
msgstr ""

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
<category label="30000">
<setting label="30001" id="tvm_delay" type="number" default="0"/>
</category>
</settings>

View File

@ -0,0 +1,3 @@
<settings version="2">
<setting id="TVM_DELAY" default="true">0</setting>
</settings>

View File

@ -0,0 +1,13 @@
[Unit]
Description=TV Mosaic Server
Documentation=https://tv-mosaic.com
After=network-online.target
Requires=network-online.target
[Service]
ExecStart=/bin/sh /storage/.kodi/addons/service.tvmosaic/bin/tvmosaic.start
Type=forking
Restart=always
[Install]
WantedBy=kodi.target