feat(torrents): show torrent info_hash in detail page

This commit is contained in:
OldHawk
2018-05-04 11:07:40 +08:00
parent 6b10f2acb0
commit c371287f23
4 changed files with 7 additions and 0 deletions

View File

@@ -374,6 +374,7 @@
IMG_PAGE_INFO: 'Current: {{index}} / {{total}}',
ANNOUNCE_URL: 'Announce Url',
TORRENT_INFO_HASH: 'Info Hash',
TORRENT_FILENAME: 'Torrent Filename',
ATTRIBUTE_TAGS: 'Video Attribute (tags)',
VIDEO_NFO: 'Video NFO',

View File

@@ -374,6 +374,7 @@
IMG_PAGE_INFO: '当前页: {{index}} / {{total}}',
ANNOUNCE_URL: 'Tracker 地址',
TORRENT_INFO_HASH: 'Hash 值',
TORRENT_FILENAME: '种子文件名',
ATTRIBUTE_TAGS: '视频属性(标签)',
VIDEO_NFO: '视频 NFO',

View File

@@ -593,6 +593,9 @@
<dt class="h-line">{{ 'ANNOUNCE_URL' | translate}}</dt>
<dd class="h-line">{{vm.torrentLocalInfo.torrent_announce}}</dd>
<dt class="h-line">{{ 'TORRENT_INFO_HASH' | translate}}</dt>
<dd class="h-line">{{vm.torrentLocalInfo.info_hash}}</dd>
<dt class="h-line">{{ 'TABLE_FIELDS.SEEDED' | translate}}</dt>
<dd class="h-line"><span class="glyphicon glyphicon-arrow-up torrent-up"></span> {{vm.torrentLocalInfo.torrent_seeds}}</dd>
<dt class="h-line">{{ 'TABLE_FIELDS.LEECHED' | translate}}</dt>

View File

@@ -225,6 +225,7 @@ exports.upload = function (req, res) {
//the original tracker.
var sourceInfo = config.meanTorrentConfig.announce.sourceInfo;
torrent.metadata.info.sourceInfo = sourceInfo;
torrent.metadata.info.source = appConfig.name;
var cws = fs.createWriteStream(newfile);
cws.write(benc.encode(torrent.metadata));
@@ -528,6 +529,7 @@ exports.announceEdit = function (req, res) {
//the original tracker.
var sourceInfo = config.meanTorrentConfig.announce.sourceInfo;
torrent.metadata.info.sourceInfo = sourceInfo;
torrent.metadata.info.source = appConfig.name;
torrent_data = torrent.metadata;
resolve();