fix: _delete_telecast() in savetv.py implementiert
Funktion fehlte komplett - Auto-Delete nach Download hat nie funktioniert. Nutzt GET /STV/M/obj/cRecordOrder/croDelete.cfm?TelecastID=...
This commit is contained in:
parent
b45b377ffe
commit
2e61530055
1 changed files with 19 additions and 0 deletions
|
|
@ -390,6 +390,25 @@ def _record_telecast(telecast_id):
|
|||
return "Fehler: " + str(e)
|
||||
|
||||
|
||||
def _delete_telecast(telecast_id):
|
||||
"""Loescht einen Eintrag aus dem Save.TV Online-Archiv nach erfolgreichem Download."""
|
||||
s = _get_session()
|
||||
if not s:
|
||||
return False, "Login fehlgeschlagen"
|
||||
try:
|
||||
r = s.get(
|
||||
SAVETV_URL + "/STV/M/obj/cRecordOrder/croDelete.cfm",
|
||||
params={"TelecastID": telecast_id},
|
||||
headers={"X-Requested-With": "XMLHttpRequest"},
|
||||
timeout=15,
|
||||
)
|
||||
if r.status_code == 200:
|
||||
return True, None
|
||||
return False, f"HTTP {r.status_code}"
|
||||
except Exception as e:
|
||||
return False, str(e)
|
||||
|
||||
|
||||
def _get_download_url(telecast_id, fmt=DOWNLOAD_FORMAT_HD, adfree=True):
|
||||
"""Holt die temporaere Download-URL fuer eine fertige Aufnahme."""
|
||||
s = _get_session()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue