add latest date and podcast:guid
This commit is contained in:
parent
7ed0a1863d
commit
6e33ad712e
@ -16,21 +16,24 @@ if string.find(ngx.var.host, "panamaracing.club") then
|
||||
name = "Panama Racing Club Archive",
|
||||
url = "panamaracing.club",
|
||||
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
|
||||
page_titles = {
|
||||
name = "Hotmix Video Archive",
|
||||
url = "videohotmix.net",
|
||||
css = "videohotmix.css",
|
||||
header = "videohotmix.net-logo.png"
|
||||
header = "videohotmix.net-logo.png",
|
||||
feed = "videohotmix"
|
||||
}
|
||||
elseif string.find(ngx.var.host, "hotmixxx.com") then
|
||||
page_titles = {
|
||||
name = "Hotmix Video Archive",
|
||||
url = "videohotmix.net",
|
||||
css = "videohotmix.css",
|
||||
header = "videohotmix.net-logo.png"
|
||||
header = "videohotmix.net-logo.png",
|
||||
feed = "hotmixxx"
|
||||
}
|
||||
else
|
||||
page_titles = {
|
||||
|
||||
@ -15,6 +15,7 @@ local function RSShandler(self)
|
||||
self.latestname = latest_name
|
||||
self.latestsize = latest_size
|
||||
self.latestdate = latest_date
|
||||
self.datenow = hotmixes.utils.rss_date_now()
|
||||
|
||||
return { content_type = "application/rss+xml", layout = require "views.rss" }
|
||||
end
|
||||
|
||||
@ -190,4 +190,13 @@ utils['total_files_dir'] = function( path )
|
||||
return t
|
||||
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
|
||||
|
||||
@ -22,6 +22,8 @@
|
||||
<itunes:category text="Electronic"/>
|
||||
</itunes:category>
|
||||
<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 %>
|
||||
<item>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user