Taking time from file lastmodified.
parent
702b096d9d
commit
e822d510ba
|
@ -1,6 +1,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
@ -43,10 +44,16 @@ func generateRSS() error {
|
||||||
}
|
}
|
||||||
epBaseImg := baseURL + "/covers/" + strip + ".jpg"
|
epBaseImg := baseURL + "/covers/" + strip + ".jpg"
|
||||||
|
|
||||||
|
timepub, err := time.Parse(time.RFC1123, ep.PubDate)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println("Errore nella conversione:", err)
|
||||||
|
timepub = time.Now()
|
||||||
|
}
|
||||||
|
|
||||||
item := podcast.Item{
|
item := podcast.Item{
|
||||||
Title: ep.Title,
|
Title: ep.Title,
|
||||||
Description: ep.Description,
|
Description: ep.Description,
|
||||||
PubDate: &timeNow,
|
PubDate: &timepub,
|
||||||
Enclosure: &podcast.Enclosure{
|
Enclosure: &podcast.Enclosure{
|
||||||
URL: epBaseUrl,
|
URL: epBaseUrl,
|
||||||
Type: podcast.MP3,
|
Type: podcast.MP3,
|
||||||
|
|
Loading…
Reference in New Issue