rssdate fuer die veroeffentlichung
This commit is contained in:
parent
3b271fdaa3
commit
4d29621c60
1 changed files with 8 additions and 2 deletions
|
@ -57,6 +57,8 @@ episodes = []
|
||||||
|
|
||||||
"description" => episode_info["beschreibung"] || "",
|
"description" => episode_info["beschreibung"] || "",
|
||||||
"summary" => episode_info["beschreibung"] || "",
|
"summary" => episode_info["beschreibung"] || "",
|
||||||
|
|
||||||
|
"rssdate" => episode_info["rssdate"] || "",
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check problem fields
|
# Check problem fields
|
||||||
|
@ -69,9 +71,13 @@ episodes = []
|
||||||
erste_sendung.gsub!(/\s*um\s*\d+:\d+$/,"")
|
erste_sendung.gsub!(/\s*um\s*\d+:\d+$/,"")
|
||||||
if erste_sendung !~ /^[0-9]{2}\.[0-9]{2}\.[0-9]{4}.*$/
|
if erste_sendung !~ /^[0-9]{2}\.[0-9]{2}\.[0-9]{4}.*$/
|
||||||
MediaWiki::logger.warn "Field erste_sendung='#{erste_sendung}' in #{episode["url"]} looks funny, fall back to today."
|
MediaWiki::logger.warn "Field erste_sendung='#{erste_sendung}' in #{episode["url"]} looks funny, fall back to today."
|
||||||
else
|
|
||||||
episode["date"] = Date.parse(datum2isodate(erste_sendung))
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if episode["rssdate"] !~ /^[0-9]{2}\.[0-9]{2}\.[0-9]{4}.*$/
|
||||||
|
episode["rssdate"] = erste_sendung
|
||||||
|
end
|
||||||
|
|
||||||
|
episode["date"] = Date.parse(datum2isodate(episode["rssdate"]))
|
||||||
episode["pubdate"] = episode["date"].strftime(RFC822)
|
episode["pubdate"] = episode["date"].strftime(RFC822)
|
||||||
|
|
||||||
# Get content type and length
|
# Get content type and length
|
||||||
|
|
Reference in a new issue