summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 678bebcf..ecdb7d9a 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 71da1c17..00db9bed 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 f7e90377..be257f9e 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>