Store files in month directory

This commit is contained in:
Grégory Soutadé
2014-11-27 14:11:47 +01:00
parent f7bf2e11ba
commit ce4bca056d
7 changed files with 35 additions and 26 deletions

View File

@@ -22,11 +22,10 @@ class IWLADisplayTopDownloads(IPlugin):
table.appendRow([uri, entrance])
index.appendBlock(table)
cur_time = self.iwla.getCurTime()
title = time.strftime('Top Downloads - %B %Y', cur_time)
title = time.strftime('Top Downloads - %B %Y', self.iwla.getCurTime())
filename = 'top_downloads_%d.html' % (cur_time.tm_mon)
path = '%d/%s' % (cur_time.tm_year, filename)
filename = 'top_downloads.html'
path = '%s/%s' % (self.iwla.getCurDisplayRoot(), filename)
page = DisplayHTMLPage(title, path)
table = DisplayHTMLBlockTable('All Downloads', ['URI', 'Hit'])