mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
Merge pull request #2786 from awiouy/82-tvmosaic
Backport of #2782 and #2784
This commit is contained in:
commit
6383674424
2
packages/addons/service/tvmosaic/changelog.txt
Normal file
2
packages/addons/service/tvmosaic/changelog.txt
Normal file
@ -0,0 +1,2 @@
|
||||
100
|
||||
- Initial addon
|
BIN
packages/addons/service/tvmosaic/icon/icon.png
Normal file
BIN
packages/addons/service/tvmosaic/icon/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 37 KiB |
76
packages/addons/service/tvmosaic/package.mk
Normal file
76
packages/addons/service/tvmosaic/package.mk
Normal file
@ -0,0 +1,76 @@
|
||||
################################################################################
|
||||
# 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_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_IS_ADDON="yes"
|
||||
PKG_ADDON_NAME="TV Mosaic"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
PKG_MAINTAINER="Anton Voyl (awiouy)"
|
||||
|
||||
configure_target() {
|
||||
:
|
||||
}
|
||||
|
||||
make_target() {
|
||||
:
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
:
|
||||
}
|
||||
|
||||
debug_strip() {
|
||||
:
|
||||
}
|
||||
|
||||
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
|
||||
}
|
25
packages/addons/service/tvmosaic/source/bin/tvmosaic.cli
Executable file
25
packages/addons/service/tvmosaic/source/bin/tvmosaic.cli
Executable 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
|
42
packages/addons/service/tvmosaic/source/bin/tvmosaic.start
Executable file
42
packages/addons/service/tvmosaic/source/bin/tvmosaic.start
Executable 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
|
39
packages/addons/service/tvmosaic/source/default.py
Normal file
39
packages/addons/service/tvmosaic/source/default.py
Normal 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()
|
@ -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 ""
|
@ -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>
|
@ -0,0 +1,3 @@
|
||||
<settings>
|
||||
<setting id="tvm_delay" value="0" />
|
||||
</settings>
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user