Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2014-02-26 12:03:15 +0400
committerFeross Aboukhadijeh <feross@feross.org>2014-02-26 12:03:15 +0400
commit948d2ce7f28093a5f8e91a6fc1572046028fff50 (patch)
treef7918cad9857bda8a189ceb8e2b7912e0ed024a0 /lib/torrent.js
parent96c634df2339569232f07c147b3f2e9568e80040 (diff)
torrent.title -> torrent.name (for consistency)
Diffstat (limited to 'lib/torrent.js')
-rw-r--r--lib/torrent.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/torrent.js b/lib/torrent.js
index 7e65178..cb314a2 100644
--- a/lib/torrent.js
+++ b/lib/torrent.js
@@ -26,16 +26,16 @@ function Torrent (uri, opts) {
throw new Error('invalid torrent uri')
self.infoHash = info.infoHash
- self.title = info.title
-
- self.metadataRaw = null
- self.metadata = null
self.file = null
+ self.name = info.name
self.peerId = opts.peerId
self.torrentPort = opts.torrentPort
self.dhtPort = opts.dhtPort
+ self.metadataRaw = null
+ self.metadata = null
+
self.swarm = new Swarm(self.infoHash, self.peerId, { dht: true })
if (self.torrentPort) {
@@ -212,14 +212,14 @@ Torrent.prototype.onMetadata = function () {
//
/**
- * Given a magnet URI, return infoHash and title
+ * Given a magnet URI, return infoHash and name
* @param {string} uri
* @return {Object}
*/
function parseMagnetUri (uri) {
var parsed = magnet(uri)
return {
- title: parsed.dn, // displayName
+ name: parsed.dn, // displayName
infoHash: parsed.xt && parsed.xt.split('urn:btih:')[1]
}
}