summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2014-01-09 15:40:34 +0100
committerDan McGee <dan@archlinux.org>2014-01-09 15:41:22 +0100
commit67a0c0ac088ed2d48fc785f13097557ed6ad25cf (patch)
treeddb6673b59d585ea47615fbc075c5729b1d0beb2
parent0e29ce68fc0aa899a7e02954943642381d9531e5 (diff)
downloadarchweb-67a0c0ac088ed2d48fc785f13097557ed6ad25cf.tar.gz
archweb-67a0c0ac088ed2d48fc785f13097557ed6ad25cf.tar.xz
Remove remaining references to release file_size field
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--feeds.py5
-rw-r--r--templates/public/download.html2
-rw-r--r--templates/releng/release_list.html2
3 files changed, 6 insertions, 3 deletions
diff --git a/feeds.py b/feeds.py
index 678bebc..ecdb7d9 100644
--- a/feeds.py
+++ b/feeds.py
@@ -194,7 +194,10 @@ class ReleaseFeed(Feed):
return "%s://%s/%s.torrent" % (proto, domain, item.iso_url())
def item_enclosure_length(self, item):
- return item.file_size or ""
+ if item.torrent_data:
+ torrent = item.torrent()
+ return torrent['file_length'] or ""
+ return ""
item_enclosure_mime_type = 'application/x-bittorrent'
diff --git a/templates/public/download.html b/templates/public/download.html
index 71da1c1..00db9be 100644
--- a/templates/public/download.html
+++ b/templates/public/download.html
@@ -27,7 +27,7 @@
<ul>
{% if release.version %}<li><strong>Current Release:</strong> {{ release.version }}</li>{% endif %}
{% if release.kernel_version %}<li><strong>Included Kernel:</strong> {{ release.kernel_version }}</li>{% endif %}
- {% if release.file_size %}<li><strong>ISO Size:</strong> {{ release.file_size|filesizeformat }}</li>{% endif %}
+ {% if release.torrent_data %}<li><strong>ISO Size:</strong> {{ release.torrent.file_length|filesizeformat }}</li>{% endif %}
<li><a href="https://wiki.archlinux.org/index.php/Installation_Guide">Installation Guide</a></li>
<li><strong>Resources:</strong>
<ul>
diff --git a/templates/releng/release_list.html b/templates/releng/release_list.html
index f7e9037..be257f9 100644
--- a/templates/releng/release_list.html
+++ b/templates/releng/release_list.html
@@ -34,7 +34,7 @@
<td>{% if item.available %}<a href="{% url 'releng-release-torrent' item.version %}"
title="Download torrent for {{ item.version }}">Torrent</a>{% endif %}</td>
<td>{% if item.available %}<a href="{{ item.magnet_uri }}">Magnet</a>{% endif %}</td>
- <td>{% if item.file_size %}{{ item.file_size|filesizeformat }}{% endif %}</td>
+ <td>{% if item.torrent_data %}{{ item.torrent.file_length|filesizeformat }}{% endif %}</td>
</tr>
{% endfor %}
</tbody>