mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
commit
dcfc56793a
2
packages/addons/service/tvheadend42/changelog.txt
Normal file
2
packages/addons/service/tvheadend42/changelog.txt
Normal file
@ -0,0 +1,2 @@
|
||||
7.0.100
|
||||
- initial LibreELEC version
|
BIN
packages/addons/service/tvheadend42/icon/icon.png
Normal file
BIN
packages/addons/service/tvheadend42/icon/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
105
packages/addons/service/tvheadend42/package.mk
Normal file
105
packages/addons/service/tvheadend42/package.mk
Normal file
@ -0,0 +1,105 @@
|
||||
################################################################################
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="tvheadend42"
|
||||
PKG_VERSION="616413f"
|
||||
PKG_VERSION_NUMBER="4.1.1892"
|
||||
PKG_REV="100"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.tvheadend.org"
|
||||
PKG_URL="https://github.com/tvheadend/tvheadend/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_SOURCE_DIR="tvheadend-${PKG_VERSION}*"
|
||||
PKG_DEPENDS_TARGET="toolchain curl libdvbcsa libiconv libressl Python:host yasm"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="service"
|
||||
PKG_SHORTDESC="Tvheadend: a TV streaming server for Linux"
|
||||
PKG_LONGDESC="Tvheadend($PKG_VERSION_NUMBER): is a TV streaming server for Linux supporting DVB-S/S2, DVB-C, DVB-T/T2, IPTV, SAT>IP, ATSC and ISDB-T"
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_NAME="Tvheadend 4.2"
|
||||
PKG_ADDON_TYPE="xbmc.service"
|
||||
PKG_AUTORECONF="no"
|
||||
PKG_ADDON_REPOVERSION="7.0"
|
||||
|
||||
# transcoding only for generic
|
||||
if [ "$TARGET_ARCH" = x86_64 ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET libva-intel-driver"
|
||||
TVH_TRANSCODING="--enable-ffmpeg_static --enable-libav --enable-libfdkaac --disable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --disable-qsv"
|
||||
else
|
||||
TVH_TRANSCODING="--disable-ffmpeg_static --disable-libav"
|
||||
fi
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--prefix=/usr \
|
||||
--arch=$TARGET_ARCH \
|
||||
--cpu=$TARGET_CPU \
|
||||
--cc=$TARGET_CC \
|
||||
--disable-avahi \
|
||||
--enable-bundle \
|
||||
--disable-dbus_1 \
|
||||
--enable-dvbcsa \
|
||||
--disable-dvben50221 \
|
||||
--enable-hdhomerun_client \
|
||||
--enable-hdhomerun_static \
|
||||
--enable-epoll \
|
||||
--enable-inotify \
|
||||
--disable-nvenc \
|
||||
--disable-uriparser \
|
||||
$TVH_TRANSCODING \
|
||||
--enable-tvhcsa \
|
||||
--nowerror \
|
||||
--python=$ROOT/$TOOLCHAIN/bin/python"
|
||||
|
||||
post_unpack() {
|
||||
sed -e 's/VER="0.0.0~unknown"/VER="'$PKG_VERSION_NUMBER' ~ LibreELEC Tvh-addon v'$PKG_ADDON_REPOVERSION'.'$PKG_REV'"/g' -i $PKG_BUILD/support/version
|
||||
}
|
||||
|
||||
pre_configure_target() {
|
||||
# fails to build in subdirs
|
||||
cd $ROOT/$PKG_BUILD
|
||||
rm -rf .$TARGET_NAME
|
||||
|
||||
# transcoding
|
||||
if [ "$TARGET_ARCH" = x86_64 ]; then
|
||||
export AS=$ROOT/$TOOLCHAIN/bin/yasm
|
||||
fi
|
||||
|
||||
export CROSS_COMPILE=$TARGET_PREFIX
|
||||
export CFLAGS="$CFLAGS -I$SYSROOT_PREFIX/usr/include/iconv -L$SYSROOT_PREFIX/usr/lib/iconv"
|
||||
}
|
||||
|
||||
# transcoding link tvheadend with g++
|
||||
if [ "$TARGET_ARCH" = x86_64 ]; then
|
||||
pre_make_target() {
|
||||
export CXX=$TARGET_CXX
|
||||
}
|
||||
fi
|
||||
|
||||
post_make_target() {
|
||||
$CC -O -fbuiltin -fomit-frame-pointer -fPIC -shared -o capmt_ca.so src/extra/capmt_ca.c -ldl
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
: # nothing to do here
|
||||
}
|
||||
|
||||
addon() {
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp -P $PKG_BUILD/build.linux/tvheadend $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp -P $PKG_BUILD/capmt_ca.so $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
From: Team LibreELEC - https://LibreELEC.tv
|
||||
Subject: adjust Tvheadend ffmpeg build to work with LibreELEC (transcoding) 06.04.2016
|
||||
|
||||
---
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -91,50 +91,65 @@ FFMPEG_CONFIG := \
|
||||
PKG_CONFIG_LIBDIR=$(FFMPEG_LIBDIR)/pkgconfig $(PKG_CONFIG) \
|
||||
--define-variable=prefix=$(FFMPEG_PREFIX) --static
|
||||
|
||||
+CFLAGS += -I${FFMPEG_PREFIX}/include
|
||||
+LDFLAGS += ${FFMPEG_LIBDIR}/libavfilter.a
|
||||
+LDFLAGS += ${FFMPEG_LIBDIR}/libswresample.a
|
||||
+LDFLAGS += ${FFMPEG_LIBDIR}/libavresample.a
|
||||
+LDFLAGS += ${FFMPEG_LIBDIR}/libswscale.a
|
||||
+LDFLAGS += ${FFMPEG_LIBDIR}/libavformat.a
|
||||
+LDFLAGS += ${FFMPEG_LIBDIR}/libavcodec.a
|
||||
+LDFLAGS += ${FFMPEG_LIBDIR}/libavutil.a
|
||||
+
|
||||
ifeq ($(CONFIG_LIBX264_STATIC),yes)
|
||||
FFMPEG_DEPS += libx264
|
||||
+LDFLAGS += ${FFMPEG_LIBDIR}/libx264.a
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LIBX265_STATIC),yes)
|
||||
FFMPEG_DEPS += libx265
|
||||
+LDFLAGS += ${FFMPEG_LIBDIR}/libx265.a
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LIBVPX_STATIC),yes)
|
||||
FFMPEG_DEPS += libvpx
|
||||
+LDFLAGS += ${FFMPEG_LIBDIR}/libvpx.a
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LIBOGG_STATIC),yes)
|
||||
FFMPEG_DEPS += libogg
|
||||
+LDFLAGS += ${FFMPEG_LIBDIR}/libogg.a
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LIBTHEORA_STATIC),yes)
|
||||
FFMPEG_DEPS += libtheoraenc libtheoradec libtheora
|
||||
+LDFLAGS += ${FFMPEG_LIBDIR}/libtheora.a
|
||||
+LDFLAGS += ${FFMPEG_LIBDIR}/libtheoradec.a
|
||||
+LDFLAGS += ${FFMPEG_LIBDIR}/libtheoraenc.a
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LIBVORBIS_STATIC),yes)
|
||||
FFMPEG_DEPS += libvorbisfile libvorbisenc libvorbis
|
||||
+LDFLAGS += ${FFMPEG_LIBDIR}/libvorbis.a
|
||||
+LDFLAGS += ${FFMPEG_LIBDIR}/libvorbisenc.a
|
||||
+LDFLAGS += ${FFMPEG_LIBDIR}/libvorbisfile.a
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LIBFDKAAC_STATIC),yes)
|
||||
FFMPEG_DEPS += libfdk-aac
|
||||
+LDFLAGS += ${FFMPEG_LIBDIR}/libfdk-aac.a
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LIBMFX_STATIC),yes)
|
||||
FFMPEG_DEPS += libmfx
|
||||
+LDFLAGS += ${FFMPEG_LIBDIR}/libmfx.a
|
||||
endif
|
||||
|
||||
-LDFLAGS += $(foreach lib,$(FFMPEG_LIBS),$(FFMPEG_LIBDIR)/$(lib).a)
|
||||
-LDFLAGS += $(foreach lib,$(FFMPEG_DEPS),$(FFMPEG_LIBDIR)/$(lib).a)
|
||||
-
|
||||
else # !FFMPEG_STATIC
|
||||
|
||||
FFMPEG_CONFIG := $(PKG_CONFIG)
|
||||
|
||||
endif # FFMPEG_STATIC
|
||||
|
||||
-CFLAGS += `$(FFMPEG_CONFIG) --cflags $(FFMPEG_LIBS)`
|
||||
-LDFLAGS += `$(FFMPEG_CONFIG) --libs $(FFMPEG_LIBS)`
|
||||
-
|
||||
endif
|
||||
|
||||
# LIBAV ########################################################################
|
||||
@@ -606,7 +606,7 @@
|
||||
|
||||
# Binary
|
||||
${PROG}: .config.mk make_webui $(OBJS)
|
||||
- $(pCC) -o $@ $(OBJS) $(CFLAGS) $(LDFLAGS)
|
||||
+ $(CXX) -o $@ $(OBJS) $(CFLAGS) $(LDFLAGS)
|
||||
|
||||
# Object
|
||||
${BUILDDIR}/%.o: %.c
|
@ -0,0 +1,82 @@
|
||||
From: Team LibreELEC - https://LibreELEC.tv
|
||||
Subject: adjust Tvheadend ffmpeg build to work with LibreELEC (transcoding) 06.04.2016
|
||||
|
||||
---
|
||||
|
||||
diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg
|
||||
--- a/Makefile.ffmpeg
|
||||
+++ b/Makefile.ffmpeg
|
||||
@@ -24,6 +24,9 @@
|
||||
FFMPEG_TARGET := x86-linux-gcc
|
||||
endif
|
||||
|
||||
+FFMPEG_HOST := $(ARCH)-libreelec-linux-gnu
|
||||
+FFMPEG_TARGET := $(ARCH)-libreelec-linux-gnu
|
||||
+
|
||||
unexport CFLAGS
|
||||
unexport LDFLAGS
|
||||
|
||||
@@ -135,7 +141,7 @@
|
||||
|
||||
$(LIB_ROOT)/$(YASM)/.tvh_build: \
|
||||
$(LIB_ROOT)/$(YASM)/.tvh_download
|
||||
- cd $(LIB_ROOT)/$(YASM) && $(CONFIGURE)
|
||||
+ cd $(LIB_ROOT)/$(YASM) && $(CONFIGURE) CC=$(HOST_CC)
|
||||
DESTDIR=$(EBUILDIR) \
|
||||
$(MAKE) -C $(LIB_ROOT)/$(YASM) install
|
||||
@touch $@
|
||||
@@ -224,6 +226,7 @@
|
||||
cd $(LIB_ROOT)/$(LIBX265)/build/linux && cmake -G "Unix Makefiles" \
|
||||
-DCMAKE_INSTALL_PREFIX="/ffmpeg" \
|
||||
-DENABLE_SHARED:BOOL=OFF \
|
||||
+ -DEXTRA_LINK_FLAGS="-ldl" \
|
||||
../../source
|
||||
DESTDIR=$(EBUILDIR) \
|
||||
$(MAKE) -C $(LIB_ROOT)/$(LIBX265)/build/linux install
|
||||
@@ -257,7 +260,7 @@
|
||||
ifeq (yes,$(CONFIG_LIBVPX_STATIC))
|
||||
|
||||
ifneq (,$(FFMPEG_TARGET))
|
||||
-LIBVPX_TARGET := --target=$(FFMPEG_TARGET)
|
||||
+LIBVPX_TARGET := --target=generic-gnu
|
||||
endif
|
||||
|
||||
$(LIB_ROOT)/$(LIBVPX)/.tvh_download:
|
||||
@@ -268,7 +271,7 @@
|
||||
$(LIB_ROOT)/$(LIBVPX)/.tvh_build: \
|
||||
$(LIB_ROOT)/$(YASM)/.tvh_build \
|
||||
$(LIB_ROOT)/$(LIBVPX)/.tvh_download
|
||||
- cd $(LIB_ROOT)/$(LIBVPX) && $(CONFIGURE) \
|
||||
+ cd $(LIB_ROOT)/$(LIBVPX) && CROSS=$(FFMPEG_TARGET)- $(CONFIGURE) \
|
||||
--disable-examples \
|
||||
--disable-docs \
|
||||
--disable-unit-tests \
|
||||
@@ -342,7 +345,8 @@
|
||||
$(LIB_ROOT)/$(LIBOGG)/.tvh_build \
|
||||
$(LIB_ROOT)/$(LIBTHEORA)/.tvh_download
|
||||
cd $(LIB_ROOT)/$(LIBTHEORA) && $(CONFIGURE) \
|
||||
- --with-ogg=$(EPREFIX) \
|
||||
+ OGG_CFLAGS=-I$(EPREFIX)/include \
|
||||
+ OGG_LIBS=-L$(EPREFIX)/lib \
|
||||
--disable-examples \
|
||||
$(LIBTHEORA_HOST)
|
||||
DESTDIR=$(EBUILDIR) \
|
||||
@@ -387,7 +391,8 @@
|
||||
$(LIB_ROOT)/$(LIBOGG)/.tvh_build \
|
||||
$(LIB_ROOT)/$(LIBVORBIS)/.tvh_download
|
||||
cd $(LIB_ROOT)/$(LIBVORBIS) && $(CONFIGURE) \
|
||||
- --with-ogg=$(EPREFIX)
|
||||
+ OGG_CFLAGS=-I$(EPREFIX)/include \
|
||||
+ OGG_LIBS=-L$(EPREFIX)/lib
|
||||
DESTDIR=$(EBUILDIR) \
|
||||
$(MAKE) -C $(LIB_ROOT)/$(LIBVORBIS) install
|
||||
@touch $@
|
||||
@@ -538,6 +543,8 @@
|
||||
$(LIB_ROOT)/$(LIBMFX)/.tvh_build \
|
||||
$(LIB_ROOT)/$(FFMPEG)/.tvh_download
|
||||
cd $(LIB_ROOT)/$(FFMPEG) && $(CONFIGURE) \
|
||||
+ --cc=$(FFMPEG_HOST)-gcc \
|
||||
+ --cxx=$(FFMPEG_HOST)-g++ \
|
||||
--disable-all \
|
||||
--enable-gpl \
|
||||
--extra-cflags="$(ECFLAGS)" \
|
40
packages/addons/service/tvheadend42/source/bin/tv_grab_file
Executable file
40
packages/addons/service/tvheadend42/source/bin/tv_grab_file
Executable file
@ -0,0 +1,40 @@
|
||||
#!/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 <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
. /etc/profile
|
||||
|
||||
ADDON_HOME="$HOME/.kodi/userdata/addon_data/service.tvheadend42"
|
||||
ADDON_SETTINGS="$ADDON_HOME/settings.xml"
|
||||
XMLTV_TYPE=`grep XMLTV_TYPE $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
|
||||
XMLTV_LOCATION_FILE=`grep XMLTV_LOCATION_FILE $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
|
||||
XMLTV_LOCATION_WEB=`grep XMLTV_LOCATION_WEB $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
|
||||
XMLTV_LOCATION_SCRIPT=`grep XMLTV_LOCATION_SCRIPT $ADDON_SETTINGS | awk '{print $3 }' | sed -e "s,value=,," -e "s,\",,g"`
|
||||
|
||||
if [ "$XMLTV_TYPE" = "FILE" ]; then
|
||||
cat "$XMLTV_LOCATION_FILE"
|
||||
exit 0
|
||||
elif [ "$XMLTV_TYPE" = "SCRIPT" ]; then
|
||||
if [ -e "$XMLTV_LOCATION_SCRIPT" ] ; then
|
||||
exec "$XMLTV_LOCATION_SCRIPT"
|
||||
fi
|
||||
elif [ "$XMLTV_TYPE" = "WEB" ]; then
|
||||
wget -qO - "$XMLTV_LOCATION_WEB"
|
||||
exit 0
|
||||
fi
|
107
packages/addons/service/tvheadend42/source/bin/tvheadend42.start
Executable file
107
packages/addons/service/tvheadend42/source/bin/tvheadend42.start
Executable file
@ -0,0 +1,107 @@
|
||||
#!/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 <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
. /etc/profile
|
||||
|
||||
oe_setup_addon service.tvheadend42
|
||||
|
||||
ADDON_SETTINGS="$ADDON_HOME/settings.xml"
|
||||
|
||||
DVR_SETTINGS_DIR="$ADDON_HOME/dvr/config"
|
||||
DVR_SETTINGS_FILE="$DVR_SETTINGS_DIR/8d0f5b7ae354d956d7fe5db25f5d0d24"
|
||||
|
||||
EPGGRAB_SETTINGS_DIR="$ADDON_HOME/epggrab"
|
||||
EPGGRAB_SETTINGS_FILE="$EPGGRAB_SETTINGS_DIR/config"
|
||||
|
||||
TIMESHIFT_SETTINGS_DIR="$ADDON_HOME/timeshift"
|
||||
TIMESHIFT_SETTINGS_FILE="$TIMESHIFT_SETTINGS_DIR/config"
|
||||
|
||||
TVH_SETTINGS_DIR="$ADDON_HOME"
|
||||
TVH_SETTINGS_FILE="$TVH_SETTINGS_DIR/config"
|
||||
|
||||
XMLTV_SETTINGS_DIR="$ADDON_HOME/xmltv"
|
||||
XMLTV_SETTINGS_FILE="$XMLTV_SETTINGS_DIR/config"
|
||||
|
||||
TIMESHIFT_DIR="$ADDON_HOME/cache/timeshift"
|
||||
XMLTV_FILE="$ADDON_DIR/bin/tv_grab_file"
|
||||
|
||||
chmod a+x $ADDON_DIR/bin/*
|
||||
|
||||
# copy config files to userdata
|
||||
if [ ! -f "$DVR_SETTINGS_FILE" ]; then
|
||||
mkdir -p $DVR_SETTINGS_DIR
|
||||
cp $ADDON_DIR/defaults/dvr/config/8d0f5b7ae354d956d7fe5db25f5d0d24 $DVR_SETTINGS_FILE
|
||||
fi
|
||||
|
||||
if [ ! -f "$EPGGRAB_SETTINGS_FILE" ]; then
|
||||
mkdir -p $EPGGRAB_SETTINGS_DIR
|
||||
cp $ADDON_DIR/defaults/epggrab/config $EPGGRAB_SETTINGS_FILE
|
||||
fi
|
||||
|
||||
if [ ! -f "$TIMESHIFT_SETTINGS_FILE" ]; then
|
||||
mkdir -p $TIMESHIFT_DIR
|
||||
mkdir -p $TIMESHIFT_SETTINGS_DIR
|
||||
cp $ADDON_DIR/defaults/timeshift/config $TIMESHIFT_SETTINGS_FILE
|
||||
fi
|
||||
|
||||
if [ ! -f "$TVH_SETTINGS_FILE" ]; then
|
||||
mkdir -p $TVH_SETTINGS_DIR
|
||||
cp $ADDON_DIR/defaults/config $TVH_SETTINGS_FILE
|
||||
fi
|
||||
|
||||
if [ ! -f "$XMLTV_SETTINGS_FILE" ]; then
|
||||
mkdir -p $XMLTV_SETTINGS_DIR
|
||||
cp $ADDON_DIR/defaults/xmltv/config $XMLTV_SETTINGS_FILE
|
||||
fi
|
||||
|
||||
# options
|
||||
if [ "$WORKAROUND_SLEEP" == "true" ] ; then
|
||||
sleep $WORKAROUND_SLEEP_TIME
|
||||
fi
|
||||
|
||||
if [ "$DEBUG" = "yes" ]; then
|
||||
TVHEADEND_ARG="-B -C -s -u root -g video -c $ADDON_HOME"
|
||||
else
|
||||
TVHEADEND_ARG="-B -C -u root -g video -c $ADDON_HOME"
|
||||
fi
|
||||
|
||||
# start userspace DVB driver/addon
|
||||
for driver_dvb in $(find /storage/.kodi/addons/driver.dvb.*/bin/userspace-driver.sh -type f 2>/dev/null); do
|
||||
driver_dvb_name=$(echo $driver_dvb | awk 'BEGIN {FS="/"} {printf("%s", $5)}')
|
||||
logger -t Tvheadend "### Loading userspace DVB driver: $driver_dvb_name ###"
|
||||
# use ". " because of variable export
|
||||
. $driver_dvb
|
||||
done
|
||||
|
||||
if [ "$WAIT_FOR_FEINIT" == "true" ] ; then
|
||||
while [ true ] ; do
|
||||
if [ -e /dev/dvb/adapter$((NUM_ADAPTERS-1))/frontend0 ] ; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "$PRELOAD_CAPMT_CA" == "true" ] ; then
|
||||
logger -t Tvheadend "### Preloading capmt_ca.so library ###"
|
||||
LD_PRELOAD="$ADDON_DIR/bin/capmt_ca.so $LD_PRELOAD" exec $ADDON_DIR/bin/tvheadend $TVHEADEND_ARG &>$ADDON_LOG_FILE
|
||||
else
|
||||
exec $ADDON_DIR/bin/tvheadend $TVHEADEND_ARG &>$ADDON_LOG_FILE
|
||||
fi
|
17
packages/addons/service/tvheadend42/source/default.py
Normal file
17
packages/addons/service/tvheadend42/source/default.py
Normal file
@ -0,0 +1,17 @@
|
||||
################################################################################
|
||||
# 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 <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
12
packages/addons/service/tvheadend42/source/defaults/config
Normal file
12
packages/addons/service/tvheadend42/source/defaults/config
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"uilevel": 1,
|
||||
"uilevel_nochange": false,
|
||||
"ui_quicktips": true,
|
||||
"cookie_expires": 14,
|
||||
"epg_compress": true,
|
||||
"prefer_picon": true,
|
||||
"chiconpath": "file:///storage/picons/tvh/%C.png",
|
||||
"chiconscheme": 2,
|
||||
"piconpath": "file:///storage/picons/vdr/",
|
||||
"piconscheme": 1
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
{
|
||||
"storage": "/storage/recordings",
|
||||
"retention-days": 31,
|
||||
"pre-extra-time": 0,
|
||||
"post-extra-time": 0,
|
||||
"day-dir": 0,
|
||||
"channel-dir": 0,
|
||||
"channel-in-title": 0,
|
||||
"date-in-title": 0,
|
||||
"time-in-title": 0,
|
||||
"whitespace-in-title": 0,
|
||||
"title-dir": 0,
|
||||
"episode-in-title": 0,
|
||||
"tag-files": 1
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"channel_rename": true,
|
||||
"channel_renumber": false,
|
||||
"channel_reicon": false,
|
||||
"epgdb_periodicsave": 2,
|
||||
"ota_initial": true,
|
||||
"modules": {
|
||||
"eit": {
|
||||
"class": "epggrab_mod_ota",
|
||||
"name": "EIT: DVB Grabber",
|
||||
"type": "Over-the-air",
|
||||
"enabled": true,
|
||||
"priority": 1
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
"enabled": 0,
|
||||
"ondemand": 0,
|
||||
"path": "/storage/.kodi/userdata/addon_data/service.tvheadend42/cache/timeshift",
|
||||
"unlimited_period": 0,
|
||||
"max_period": 3600,
|
||||
"unlimited_size": 0,
|
||||
"max_size": 3072
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
{
|
||||
"grabbers": [
|
||||
{
|
||||
"path": "/storage/.kodi/addons/service.tvheadend42/bin/tv_grab_file",
|
||||
"description": "tv_grag_file is a simple grabber that just read the ~/.xmltv/tv_grab_file.xmltv file",
|
||||
"version": "0.1\n",
|
||||
"mtime": 1318774706,
|
||||
"capabilities": 1
|
||||
}
|
||||
],
|
||||
"grab-interval": 12,
|
||||
"grab-enabled": 1,
|
||||
"current-grabber": "/storage/.kodi/addons/service.tvheadend42/bin/tv_grab_file"
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<strings>
|
||||
<!-- HTS TVHEADEND -->
|
||||
<string id="1000">XMLTV</string>
|
||||
<string id="1001">DVB</string>
|
||||
<string id="1011">XMLTV configuration</string>
|
||||
<string id="1011">XMLTV source type</string>
|
||||
<string id="1012">XMLTV File location</string>
|
||||
<string id="1013">XMLTV Web location</string>
|
||||
<string id="1014">XMLTV Script location</string>
|
||||
<string id="1020">DVB Configuration</string>
|
||||
<string id="1021">Unload DVB mudules before suspend</string>
|
||||
<string id="1022">Wait for frontend initialization</string>
|
||||
<string id="1023">Number of adapters to wait for</string>
|
||||
<string id="1024">Preload capmt_ca.so library</string>
|
||||
<string id="1025">Delay the start of Tvheadend</string>
|
||||
<string id="1026">time (s)</string>
|
||||
</strings>
|
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<settings>
|
||||
<!-- HTS TVHEADEND -->
|
||||
<category label="1000">
|
||||
<setting label="1010" type="lsep"/>
|
||||
<setting type="sep" />
|
||||
<setting id="XMLTV_TYPE" type="labelenum" label="1011" values="NONE|FILE|SCRIPT|WEB" sort="yes" default="NONE"/>
|
||||
<setting id="XMLTV_LOCATION_FILE" type="file" label="1012" default="" enable="eq(-1,0)"/>
|
||||
<setting id="XMLTV_LOCATION_WEB" type="text" label="1013" default="http://" enable="eq(-2,3)"/>
|
||||
<setting id="XMLTV_LOCATION_SCRIPT" type="file" label="1014" default="" enable="eq(-3,2)"/>
|
||||
</category>
|
||||
<category label="1001">
|
||||
<setting label="1020" type="lsep"/>
|
||||
<setting type="sep" />
|
||||
<setting id="WAIT_FOR_FEINIT" type="bool" label="1022" default="false" />
|
||||
<setting id="NUM_ADAPTERS" type="slider" range="1,16" option="int" label="1023" default="1" enable="eq(-1,true)" />
|
||||
<setting id="REMOVE_MODULES" type="text" label="1021" values="" default=""/>
|
||||
<setting id="PRELOAD_CAPMT_CA" type="bool" label="1024" default="false" />
|
||||
<setting id="WORKAROUND_SLEEP" type="bool" label="1025" default="false" />
|
||||
<setting id="WORKAROUND_SLEEP_TIME" type="slider" range="1,30" option="int" label="1026" default="1" enable="eq(-1,true)" />
|
||||
</category>
|
||||
</settings>
|
@ -0,0 +1,10 @@
|
||||
<settings>
|
||||
<setting id="WAIT_FOR_FEINIT" value="false" />
|
||||
<setting id="NUM_ADAPTERS" value="1" />
|
||||
<setting id="XMLTV_LOCATION_FILE" value="" />
|
||||
<setting id="XMLTV_LOCATION_WEB" value="http://" />
|
||||
<setting id="XMLTV_TYPE" value="NONE" />
|
||||
<setting id="PRELOAD_CAPMT_CA" value="false" />
|
||||
<setting id="WORKAROUND_SLEEP" value="false" />
|
||||
<setting id="WORKAROUND_SLEEP_TIME" value="1" />
|
||||
</settings>
|
44
packages/addons/service/tvheadend42/source/sleep.d/tvheadend.power
Executable file
44
packages/addons/service/tvheadend42/source/sleep.d/tvheadend.power
Executable file
@ -0,0 +1,44 @@
|
||||
#!/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 <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
. /etc/profile
|
||||
|
||||
oe_setup_addon service.tvheadend42
|
||||
|
||||
SERVICE="service.tvheadend42"
|
||||
|
||||
case "$1" in
|
||||
pre)
|
||||
if systemctl is-active "$SERVICE" &>/dev/null ; then
|
||||
systemctl stop "$SERVICE"
|
||||
for module in $REMOVE_MODULES ; do
|
||||
rmmod $module
|
||||
done
|
||||
fi
|
||||
;;
|
||||
post)
|
||||
if systemctl is-enabled "$SERVICE" &>/dev/null ; then
|
||||
for module in $REMOVE_MODULES ; do
|
||||
modprobe $module
|
||||
done
|
||||
systemctl start "$SERVICE"
|
||||
fi
|
||||
;;
|
||||
esac
|
@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=TVHeadend42 Service
|
||||
After=network-online.service
|
||||
Requires=network-online.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/bin/sh -c "exec sh /storage/.kodi/addons/service.tvheadend42/bin/tvheadend42.start"
|
||||
TimeoutStopSec=2
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
StartLimitInterval=0
|
||||
|
||||
[Install]
|
||||
WantedBy=kodi.target
|
Loading…
x
Reference in New Issue
Block a user