Skip to content

Commit

Permalink
adding torrent info and dev info
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Williams committed Aug 6, 2012
1 parent d8780ff commit 29e8aa2
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
Binary file modified images/fork.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h6><%= hash %></h6>
<i class="icon-arrow-down"></i> <span class="download_speed"><%= download_speed %></span>
<i class="icon-arrow-up"></i> <span class="upload_speed"><%= upload_speed %></span>
</div>

<div class="swarm">Swarm: <%= peers %> / <%= seeds %> Peers / Seeds</div>
<div class="eta"><%= eta %></div>
<div class="ratio">UL/DL Ratio: <%= ratio %></div>
<div class="files">
Expand Down Expand Up @@ -184,6 +184,11 @@ <h2 class="torrent_name"><%= name %></h2>
btapp.live('torrent * file * properties streaming_url', function(url, file_props, file) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;//create an html5 video/audio tag and play!<br>
});<br>
<br>
//lets add some content that will get detected by the code above.<br>
btapp.on('add', function(add) {<br>
&nbsp;&nbsp;&nbsp;&nbsp;add.torrent('http://apps.bittorrent.com/torrents/PrettyLights-Bittorrent.torrent');
});<br>
</div>
</div>
</div>
Expand Down
12 changes: 12 additions & 0 deletions javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ jQuery(function() {
var ratio = '?';
var upload_speed = '?';
var download_speed = '?';
var seeds = '?';
var peers = '?';

if(this.model.has('properties')) {
var properties = this.model.get('properties');
Expand Down Expand Up @@ -286,6 +288,14 @@ jQuery(function() {
if(properties.has('ratio')) {
ratio = properties.get('ratio') / 1000.0;
}

if(properties.has('peers_in_swarm')) {
peers = properties.get('peers_in_swarm');
}

if(properties.has('seeds_in_swarm')) {
seeds = properties.get('seeds_in_swarm');
}
}

if(this.model.has('file')) {
Expand Down Expand Up @@ -316,6 +326,8 @@ jQuery(function() {
eta: eta,
files: files,
ratio: ratio,
seeds: seeds,
peers: peers,
hash: this.model.id
}));

Expand Down
4 changes: 4 additions & 0 deletions stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
min-height: 150px;
}

.container {
width: 750px !important;
}

html, body {
height: auto;
overflow-x: hidden;
Expand Down

0 comments on commit 29e8aa2

Please sign in to comment.