Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add zap2epg TV grabber to tvheadend #4680

Merged
merged 11 commits into from
Jun 19, 2021
3 changes: 3 additions & 0 deletions cross/tvheadend/PLIST
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
bin:bin/tvheadend
rsc:bin/tvhmeta
rsc:bin/tv_meta_tmdb.py
rsc:bin/tv_meta_tvdb.py
rsc:share/tvheadend
rsc:share/fontconfig
26 changes: 26 additions & 0 deletions cross/zap2epg/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
PKG_NAME = zap2epg
PKG_VERS = 3.0
PKG_EXT = tar.gz
#PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover

PKG_DIST_NAME = Python3-th0ma7-updates.$(PKG_EXT)
PKG_DIST_SITE = https://github.com/daniel-widrick/zap2it-GuideScraping/archive
PKG_DIST_SITE = https://github.com/th0ma7/script.module.zap2epg/archive
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIR = script.module.zap2epg-Python3-th0ma7-updates

DEPENDS =

HOMEPAGE = https://github.com/edit4ever/script.module.zap2epg
COMMENT = zap2epg will generate an xmltv.xml file for USA/Canada TV lineups using zap2it source
LICENSE = GPLv3

INSTALL_TARGET = zap2it_install

include ../../mk/spksrc.install-resources.mk

.PHONY: zap2it_install
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace zap2it by zap2epg

zap2it_install:
install -m 755 -d $(STAGING_INSTALL_PREFIX)/bin
install -m 755 $(WORK_DIR)/$(PKG_DIR)/tv_grab_zap2epg $(STAGING_INSTALL_PREFIX)/bin
install -m 750 -d $(STAGING_INSTALL_PREFIX)/var/epggrab/conf
install -m 640 $(WORK_DIR)/$(PKG_DIR)/epggrab/conf/zap2epg.xml $(STAGING_INSTALL_PREFIX)/var/epggrab/conf
2 changes: 2 additions & 0 deletions cross/zap2epg/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rsc:bin/tv_grab_zap2epg
rsc:var/epggrab/conf/zap2epg.xml
3 changes: 3 additions & 0 deletions cross/zap2epg/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
zap2epg-3.0.tar.gz SHA1 6dbdef7a0459f151cfb06b043a5aa027af9c2011
zap2epg-3.0.tar.gz SHA256 fefb724bcd8f460af50f56085a92db88ed839609f5c38b83e42fe8526aa5c7e7
zap2epg-3.0.tar.gz MD5 a6a59af402b5b5fb6d5e60067a2e2b0a
4 changes: 3 additions & 1 deletion spk/tvheadend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ DSM_UI_DIR = app
# 000-fix-version.patch from cross/tvheadend
export TVH_VERS

DEPENDS = cross/$(SPK_NAME)
DEPENDS = cross/$(SPK_NAME) cross/zap2epg
WHEELS = src/requirements.txt
SPK_DEPENDS = "python38"

MAINTAINER = th0ma7
DESCRIPTION = Tvheadend is a TV streaming server and recorder for Linux, FreeBSD and Android supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, ISDB-T, IPTV, SAT IP and HDHomeRun as input sources. Tvheadend offers HTTP, HTSP and SAT IP streaming.
Expand Down
1 change: 1 addition & 0 deletions spk/tvheadend/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rsc:share/wheelhouse
4 changes: 4 additions & 0 deletions spk/tvheadend/src/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
certifi==2021.5.30
chardet==4.0.0
requests==2.25.1
urllib3==1.26.5
17 changes: 17 additions & 0 deletions spk/tvheadend/src/service-setup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Package specific behaviors
# Sourced script by generic installer and start-stop-status scripts

# Add ffmpeg and ifself to path
PYTHON_DIR="/var/packages/python38/target"
PYTHONENV="${SYNOPKG_PKGDEST}/env"
VIRTUALENV="${PYTHON_DIR}/bin/virtualenv"
WHEELHOUSE=${SYNOPKG_PKGDEST}/share/wheelhouse
FFMPEG_DIR="/var/packages/ffmpeg/target"
PATH="${SYNOPKG_PKGDEST}/env/bin:${SYNOPKG_PKGDEST}/bin:${FFMPEG_DIR}/bin:${PYTHON_DIR}/bin:${PATH}"

# Service configuration. Change http and htsp ports here and in conf/tvheadend.sc for non-standard ports
HTTP=9981
HTSP=9982
Expand All @@ -21,6 +29,15 @@ service_postinst ()

# Edit the password configuration according to the wizard
sed -i -e "s/@password@/${wizard_password}/g" ${SYNOPKG_PKGVAR}/passwd/a927e30a755504f9784f23a4efac5109

# EPG Grabber (zap2epg) - Create a Python virtualenv
${VIRTUALENV} --system-site-packages ${PYTHONENV}

# EPG Grabber (zap2epg) - Install the wheels/requirements
${SYNOPKG_PKGDEST}/env/bin/pip install \
--no-deps --no-index --no-input --upgrade \
--force-reinstall --find-links \
${WHEELHOUSE} ${WHEELHOUSE}/*.whl
}

service_preupgrade ()
Expand Down