plex und threadfin
This commit is contained in:
1 parent
66e53b4be4
commit
fcb87cf881
7 files changed
+223
-42
No files matched your search
+12
-3
@@ -2,6 +2,7 @@ import subprocess
|
||||
from flask import Flask, request, jsonify
|
||||
from lxml import etree
|
||||
from datetime import datetime, timedelta
|
||||
from zoneinfo import ZoneInfo
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@@ -12,11 +13,19 @@ def update_sky():
|
||||
data = request.json
|
||||
channel_name = data.get('channel', 'Unbekannt')
|
||||
content_title = data.get('content', 'Keine Information')
|
||||
skyq_media_type = data.get('type', 'Keine Information')
|
||||
|
||||
|
||||
if skyq_media_type == 'app':
|
||||
content_title = "App-TV"
|
||||
# Zeitstempel für XMLTV (Start jetzt, Ende in 1 Std als Platzhalter)
|
||||
now = datetime.now()
|
||||
start_time = now.strftime("%Y%m%d%H%M%S +0100")
|
||||
stop_time = (now + timedelta(hours=12)).strftime("%Y%m%d%H%M%S +0100")
|
||||
tz = ZoneInfo("Europe/Berlin")
|
||||
now = datetime.now(tz)
|
||||
|
||||
start_time = now.strftime("%Y%m%d%H%M%S %z")
|
||||
stop_time = (now + timedelta(hours=12)).strftime("%Y%m%d%H%M%S %z")
|
||||
print(start_time)
|
||||
print(stop_time)
|
||||
|
||||
# XML Struktur aufbauen
|
||||
root = etree.Element("tv")
|
||||
|
||||
Reference in new issue
Block a user