summaryrefslogtreecommitdiff
path: root/rhimport
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-05-09 17:11:41 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-05-09 17:11:41 (GMT)
commitf88f22efa5f336cbd3dad60c4c4aaa71f39b0333 (patch)
treea9cf4eeb6e22673886b529490c4b913371a39f76 /rhimport
parent1803267ace5a7a7c6f28b9c4b941b09530dea207 (diff)
fix archiv fetcher url format
Diffstat (limited to 'rhimport')
-rw-r--r--rhimport/fetcher.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/rhimport/fetcher.go b/rhimport/fetcher.go
index 966402c..4819e92 100644
--- a/rhimport/fetcher.go
+++ b/rhimport/fetcher.go
@@ -203,11 +203,11 @@ var weekdays = [...]string{
func generateArchivFilePath(uri *url.URL) (file, path string, err error) {
var t time.Time
- if t, err = time.Parse("2006/01/02/15", fmt.Sprintf("%s%s", uri.Host, uri.Path)); err != nil {
+ if t, err = time.Parse("2006/01/02/15/04", fmt.Sprintf("%s%s", uri.Host, uri.Path)); err != nil {
return
}
- file = t.Format("2006-01-02-15") + "00.ogg"
+ file = t.Format("2006-01-02-1504") + ".ogg"
// TODO: make basepath configurable
path = fmt.Sprintf("/srv/archiv/%04d/%02d-%s/%02d-%s", t.Year(), t.Month(), months[t.Month()-1], t.Day(), weekdays[t.Weekday()])