Ändere das Veröffentlichungsdatum auf 2 Tage zurück, um zukünftige Probleme zu vermeiden.
This commit is contained in:
@ -134,9 +134,9 @@ class LocalPodcastGenerator:
|
|||||||
# Dateigröße
|
# Dateigröße
|
||||||
file_size = file_path.stat().st_size
|
file_size = file_path.stat().st_size
|
||||||
|
|
||||||
# Änderungsdatum als Veröffentlichungsdatum, aber einen Tag zurück
|
# Änderungsdatum als Veröffentlichungsdatum, aber 2 Tage zurück
|
||||||
from datetime import timezone, timedelta
|
from datetime import timezone, timedelta
|
||||||
pub_date = datetime.fromtimestamp(file_path.stat().st_mtime, tz=timezone.utc) - timedelta(days=1)
|
pub_date = datetime.fromtimestamp(file_path.stat().st_mtime, tz=timezone.utc) - timedelta(days=2)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'title': title,
|
'title': title,
|
||||||
@ -367,9 +367,9 @@ Ich spezialisiere mich auf House Music, die mehr als nur Beats bietet – sie er
|
|||||||
atom_link.set("type", "application/rss+xml")
|
atom_link.set("type", "application/rss+xml")
|
||||||
|
|
||||||
# Wichtig: lastBuildDate für bessere Erkennung von Updates (RFC 2822 konform)
|
# Wichtig: lastBuildDate für bessere Erkennung von Updates (RFC 2822 konform)
|
||||||
# Verwende aktuelles Datum für die Feed-Erstellung, aber einen Tag zurück
|
# Verwende aktuelles Datum, aber 2 Tage zurück um Zukunftsprobleme zu vermeiden
|
||||||
from datetime import timezone, timedelta
|
from datetime import timezone, timedelta
|
||||||
current_date = datetime.now(timezone.utc) - timedelta(days=1)
|
current_date = datetime.now(timezone.utc) - timedelta(days=2)
|
||||||
|
|
||||||
last_build = ET.SubElement(channel, "lastBuildDate")
|
last_build = ET.SubElement(channel, "lastBuildDate")
|
||||||
last_build.text = self.format_rfc2822_date(current_date)
|
last_build.text = self.format_rfc2822_date(current_date)
|
||||||
|
Reference in New Issue
Block a user