Skip to content

Commit

Permalink
Allow separate GUID URL for legacy purposes.
Browse files Browse the repository at this point in the history
  • Loading branch information
rosmo committed Jun 8, 2017
1 parent 53a4210 commit a34035a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ image:

items:
guid:
baseUrl: http://base/url/
baseUrl: http://base/url/for/guid/
link:
baseUrl: http://base/url/
baseUrl: http://base/url/for/link/
enclosure:
baseUrl: http://base/url/
baseUrl: http://base/url/for/enclosure/
date: # optional, allows extracting date from title
from: title
format: dd.mm.yyyy # for supported formats, see process.go
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,18 @@ func generateFeed(cfg *config.Configuration, files []*process.AudioFile) {
Title: file.Title,
Description: file.Title,
Link: link,
GUID: guid,
}

enclosureType := extensionToEnclosureType[strings.ToLower(filepath.Ext(file.Filename))]

item.AddEnclosure(enclosure, enclosureType, file.Length)
item.AddPubDate(&file.PublishDate)

_, err := feed.AddItem(item)
itemIndex, err := feed.AddItem(item)
if err != nil {
fmt.Fprintf(os.Stderr, "Failed to add file %v: %v\n", file, err)
}
feed.Items[itemIndex-1].GUID = guid // hack for guid
}
fmt.Print(feed.String())
}
Expand Down

0 comments on commit a34035a

Please sign in to comment.