add latest date and podcast:guid

This commit is contained in:
dreamer 2026-04-27 11:15:55 +02:00
parent 7ed0a1863d
commit 6e33ad712e
4 changed files with 18 additions and 3 deletions

View File

@ -16,21 +16,24 @@ if string.find(ngx.var.host, "panamaracing.club") then
name = "Panama Racing Club Archive", name = "Panama Racing Club Archive",
url = "panamaracing.club", url = "panamaracing.club",
css = "panamaracing.css", css = "panamaracing.css",
header = "panamaracing.club_header.png" header = "panamaracing.club_header.png",
feed = "panamaracing.club"
} }
elseif string.find(ngx.var.host, "videohotmix.net") then elseif string.find(ngx.var.host, "videohotmix.net") then
page_titles = { page_titles = {
name = "Hotmix Video Archive", name = "Hotmix Video Archive",
url = "videohotmix.net", url = "videohotmix.net",
css = "videohotmix.css", css = "videohotmix.css",
header = "videohotmix.net-logo.png" header = "videohotmix.net-logo.png",
feed = "videohotmix"
} }
elseif string.find(ngx.var.host, "hotmixxx.com") then elseif string.find(ngx.var.host, "hotmixxx.com") then
page_titles = { page_titles = {
name = "Hotmix Video Archive", name = "Hotmix Video Archive",
url = "videohotmix.net", url = "videohotmix.net",
css = "videohotmix.css", css = "videohotmix.css",
header = "videohotmix.net-logo.png" header = "videohotmix.net-logo.png",
feed = "hotmixxx"
} }
else else
page_titles = { page_titles = {

View File

@ -15,6 +15,7 @@ local function RSShandler(self)
self.latestname = latest_name self.latestname = latest_name
self.latestsize = latest_size self.latestsize = latest_size
self.latestdate = latest_date self.latestdate = latest_date
self.datenow = hotmixes.utils.rss_date_now()
return { content_type = "application/rss+xml", layout = require "views.rss" } return { content_type = "application/rss+xml", layout = require "views.rss" }
end end

View File

@ -190,4 +190,13 @@ utils['total_files_dir'] = function( path )
return t return t
end end
utils['rss_date_now'] = function()
local popen = io.popen
local pdate = popen('date "+%a, %-d %b %Y %H:%M:%S %Z"')
for date in pdate:lines() do
return date
end
pdate:close()
end
return utils return utils

View File

@ -22,6 +22,8 @@
<itunes:category text="Electronic"/> <itunes:category text="Electronic"/>
</itunes:category> </itunes:category>
<itunes:image href="https://intergalactic.fm/themes/custom/ifm/logo.svg"/> <itunes:image href="https://intergalactic.fm/themes/custom/ifm/logo.svg"/>
<lastBuildDate><%= datenow %></lastBuildDate>
<podcast:guid>intergalactic-fm-<%= titles['feed'] %>-feed</podcast:guid>
<% for i, file in ipairs(latestpath) do %> <% for i, file in ipairs(latestpath) do %>
<item> <item>