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