<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -111,16 +111,18 @@ NSData *getTorrentPreview(NSURL *url)
              [torrentInfo objectForKey:@&quot;torrentName&quot;],
              @&quot;[Unknown]&quot;);
 
-    // Replace torrent size witht length or totalSize
+    // Replace torrent size with length or totalSize
     NSNumber *size;
     if([torrentInfo objectForKey:@&quot;length&quot;] != NULL){
-         size = [torrentInfo objectForKey:@&quot;length&quot;];
+        // For single-file torrents
+        size = [torrentInfo objectForKey:@&quot;length&quot;];
     }else{
+        // Multi-file torrents don't have length, so use the total file size
         size = [torrentInfo objectForKey:@&quot;totalSize&quot;];
     }
+    
     NSString *torrentInfoString = [NSString stringWithFormat:@&quot;&lt;ul&gt;&lt;li&gt;Size: %@&lt;/li&gt;&lt;/ul&gt;&quot;,
                                    stringFromFileSize([size integerValue])];
-
     replacer(html,
              @&quot;{TORRENT_INFO}&quot;,
              torrentInfoString,</diff>
      <filename>torrent.m</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>558ec9bc7c243e7b6488e0ddf00e7ffd34826afd</id>
    </parent>
  </parents>
  <author>
    <name>dbr</name>
    <email>dbr.onix@gmail.com</email>
  </author>
  <url>http://github.com/dbr/qltorrent/commit/45c4f1cb8a2d1e101a7543ebedc78fc1c8b87c01</url>
  <id>45c4f1cb8a2d1e101a7543ebedc78fc1c8b87c01</id>
  <committed-date>2009-04-23T12:19:34-07:00</committed-date>
  <authored-date>2009-04-23T12:19:34-07:00</authored-date>
  <message>Typo in comment, added a few more</message>
  <tree>f96fd4b51af78d75d7a97d1802071758477cef1d</tree>
  <committer>
    <name>dbr</name>
    <email>dbr.onix@gmail.com</email>
  </committer>
</commit>
