mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-07-05 17:38:43 +02:00
init subtitle,mypanel info
This commit is contained in:
@@ -121,6 +121,13 @@
|
||||
0: '如果你有该种子的字幕文件,你可以在这里上传.',
|
||||
1: '请注意字幕文件名的正确格式,比如: Sing.2016.3D.HKG.BluRay.1080p.AVC.Atmos.TrueHD7.1-MTeam.chs&eng.srt'
|
||||
},
|
||||
MY_TORRENT_RULES: {
|
||||
0: '这个种子文件是由你自己上传的,你可以对其做如下操作.',
|
||||
1: '如需其它帮助,请与我们的管理员联系:<strong><a href="mailto:#">{{admin}}</a></strong>.'
|
||||
},
|
||||
ENTER_VIDEO_NFO: '请输入视频NFO信息',
|
||||
TORRENT_SEED_USERS: '做种用户列表',
|
||||
TORRENT_LEECHER_USERS: '下载用户列表',
|
||||
|
||||
//TorrentsUploadsController
|
||||
TORRENTS_UPLOAD_SUCCESSFULLY: '文件上传成功',
|
||||
@@ -144,7 +151,6 @@
|
||||
CANCEL_BUTTON: '算了,以后再说',
|
||||
AGREE_RULES: '我已阅读并同意站内所有协议条款,<a href="#">协议条款</a>',
|
||||
DOWNLOAD_TORRENT: '下载种子',
|
||||
ENTER_VIDEO_NFO: '请输入视频NFO信息',
|
||||
|
||||
//footer view
|
||||
MIT_PROTOCOL: '本项目源码受 <a href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a> 开源协议保护',
|
||||
|
||||
@@ -118,9 +118,16 @@
|
||||
UPLOAD_SUBTITLE: 'Upload Subtitle files',
|
||||
SUBTITLE_LIST: 'Subtitle list',
|
||||
SUBTITLE_RULES: {
|
||||
0: 'If the torrent has no subtitle files, you can uploads here.',
|
||||
0: 'If the torrent has no subtitle files, you have the following actions.',
|
||||
1: 'Please note the filename format, such as: <mark>Sing.2016.3D.HKG.BluRay.1080p.AVC.Atmos.TrueHD7.1-MTeam.chs&eng.srt</mark>'
|
||||
},
|
||||
MY_TORRENT_RULES: {
|
||||
0: 'This torrent file is uploaded by yourself, you have actions bellow.',
|
||||
1: 'For additional assistance, please contact our administrator: <strong><a href="mailto:#">{{admin}}</a></strong>'
|
||||
},
|
||||
ENTER_VIDEO_NFO: 'Please enter video NFO',
|
||||
TORRENT_SEED_USERS: 'Seed Users',
|
||||
TORRENT_LEECHER_USERS: 'Leecher Users',
|
||||
|
||||
//TorrentsUploadsController & views
|
||||
TORRENTS_UPLOAD_SUCCESSFULLY: 'Successfully uploads file',
|
||||
@@ -144,7 +151,6 @@
|
||||
CANCEL_BUTTON: 'NO, CANCEL IT',
|
||||
AGREE_RULES: 'I agree and already read all the rules, <a href="#">read here</a>',
|
||||
DOWNLOAD_TORRENT: 'Download Torrent',
|
||||
ENTER_VIDEO_NFO: 'Please enter video NFO',
|
||||
|
||||
//footer view
|
||||
MIT_PROTOCOL: 'The source of this project is protected by <a href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a> open source protocol',
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
//filter: blur(1px);
|
||||
.filter {
|
||||
background-color: #2a2730;
|
||||
background-color: rgba(0, 0, 0, .6);
|
||||
background-color: rgba(0, 0, 0, .7);
|
||||
//opacity: 0.5;
|
||||
padding-top: 30px;
|
||||
padding-bottom: 30px;
|
||||
@@ -315,4 +315,5 @@
|
||||
|
||||
.video-nfo {
|
||||
font-size: 12px !important;
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
DownloadService, $window, $sce, $filter) {
|
||||
var vm = this;
|
||||
vm.user = Authentication.user;
|
||||
vm.announce = MeanTorrentConfig.meanTorrentConfig.announce;
|
||||
vm.tmdbConfig = MeanTorrentConfig.meanTorrentConfig.tmdbConfig;
|
||||
vm.resourcesTags = MeanTorrentConfig.meanTorrentConfig.resourcesTags;
|
||||
|
||||
|
||||
@@ -160,8 +160,8 @@
|
||||
</div>
|
||||
</dd>
|
||||
|
||||
<dt class="h-line">{{ 'VIDEO_NFO' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<dt class="h-line" ng-show="vm.torrentLocalInfo.torrent_nfo.length>0">{{ 'VIDEO_NFO' | translate}}:</dt>
|
||||
<dd class="h-line" ng-show="vm.torrentLocalInfo.torrent_nfo.length>0">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<textarea class="form-control video-nfo margin-top-10" rows="15" ng-bind="vm.torrentLocalInfo.torrent_nfo"
|
||||
@@ -169,60 +169,74 @@
|
||||
</div>
|
||||
</div>
|
||||
</dd>
|
||||
|
||||
<div class="margin-top-20"></div>
|
||||
|
||||
<dt class="h-line"></dt>
|
||||
<dd class="h-line">
|
||||
<div class="down-torrent">
|
||||
<button class="btn btn-success" ng-click="vm.downloadTorrent(vm.torrentLocalInfo._id)"
|
||||
translate="DOWNLOAD_TORRENT"></button>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/ng-template" id="subtitleInfo.html">
|
||||
<div>
|
||||
<div class="padding-top-30">
|
||||
<dl class="dl-horizontal">
|
||||
<dt class="h-line"></dt>
|
||||
<dd class="h-line margin-bottom-30">
|
||||
<ul>
|
||||
<li translate="SUBTITLE_RULES.0"></li>
|
||||
<li translate="SUBTITLE_RULES.1"></li>
|
||||
</ul>
|
||||
</dd>
|
||||
<div class="padding-top-30">
|
||||
<dl class="dl-horizontal">
|
||||
<dt class="h-line"></dt>
|
||||
<dd class="h-line margin-bottom-30">
|
||||
<ul>
|
||||
<li translate="SUBTITLE_RULES.0"></li>
|
||||
<li translate="SUBTITLE_RULES.1"></li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dt class="h-line">{{ 'UPLOAD_SUBTITLE' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" ng-model="vm.sFile.name" disabled>
|
||||
<dt class="h-line">{{ 'UPLOAD_SUBTITLE' | translate}}:</dt>
|
||||
<dd class="h-line">
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" ng-model="vm.sFile.name" disabled>
|
||||
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-primary btn-file"
|
||||
ngf-select="vm.fileSelected = true; vm.successfully = undefined; vm.progress = 0;"
|
||||
ng-model="vm.sFile"
|
||||
accept="application/x-bittorrent"
|
||||
ngf-resize="{width: 400}"
|
||||
ngf-resize-if="$width > 400 || $height > 400"
|
||||
ng-disabled="vm.successfully">{{ 'SELECT_FILE' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-primary btn-file"
|
||||
ngf-select="vm.fileSelected = true; vm.successfully = undefined; vm.progress = 0;"
|
||||
ng-model="vm.sFile"
|
||||
accept="application/x-bittorrent"
|
||||
ngf-resize="{width: 400}"
|
||||
ngf-resize-if="$width > 400 || $height > 400"
|
||||
ng-disabled="vm.successfully">{{ 'SELECT_FILE' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<button class="btn btn-success inline-block"
|
||||
ng-click="vm.upload(vm.sFile)">{{ 'DO_UPLOADS' | translate}} ({{vm.progress}}%)
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</dd>
|
||||
<div class="col-md-4">
|
||||
<button class="btn btn-success inline-block"
|
||||
ng-click="vm.upload(vm.sFile)">{{ 'DO_UPLOADS' | translate}} ({{vm.progress}}%)
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</dd>
|
||||
|
||||
<dt class="h-line" ng-show="vm.torrentLocalInfo.subtitles.length>0">{{ 'SUBTITLE_LIST' | translate}}:</dt>
|
||||
<dd class="h-line" ng-show="vm.torrentLocalInfo.subtitles.length>0">
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<dt class="h-line" ng-show="vm.torrentLocalInfo.subtitles.length>0">{{ 'SUBTITLE_LIST' | translate}}:</dt>
|
||||
<dd class="h-line" ng-show="vm.torrentLocalInfo.subtitles.length>0">
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/ng-template" id="userInfo.html">
|
||||
<div>
|
||||
<p>building</p>
|
||||
<div class="padding-top-30">
|
||||
<dl class="dl-horizontal">
|
||||
<dt class="h-line">{{ 'TORRENT_SEED_USERS' | translate}}:</dt>
|
||||
<dd class="h-line">{{vm.torrentLocalInfo.torrent_seeds}}</dd>
|
||||
|
||||
<dt class="h-line">{{ 'TORRENT_LEECHER_USERS' | translate}}:</dt>
|
||||
<dd class="h-line">{{vm.torrentLocalInfo.torrent_leechers}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
@@ -233,8 +247,20 @@
|
||||
</script>
|
||||
|
||||
<script type="text/ng-template" id="myPanel.html">
|
||||
<div>
|
||||
<p>building</p>
|
||||
<div class="padding-top-30">
|
||||
<dl class="dl-horizontal">
|
||||
<dt class="h-line"></dt>
|
||||
<dd class="h-line margin-bottom-30">
|
||||
<ul>
|
||||
<li translate="MY_TORRENT_RULES.0"></li>
|
||||
<li translate="MY_TORRENT_RULES.1" translate-values='{admin: vm.announce.admin}'></li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dt class="h-line"></dt>
|
||||
<dd class="h-line">
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
|
||||
@@ -399,7 +399,8 @@ exports.list = function (req, res) {
|
||||
Torrent.find(condition)
|
||||
.sort('-createdat')
|
||||
.populate('user', 'displayName')
|
||||
.populate('subtitles')
|
||||
.populate('_subtitles')
|
||||
.populate('_peers')
|
||||
.skip(skip)
|
||||
.limit(limit)
|
||||
.exec(function (err, torrents) {
|
||||
@@ -426,7 +427,8 @@ exports.torrentByID = function (req, res, next, id) {
|
||||
|
||||
Torrent.findById(id)
|
||||
.populate('user', 'displayName')
|
||||
.populate('subtitles')
|
||||
.populate('_subtitles')
|
||||
.populate('_peers')
|
||||
.exec(function (err, torrent) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
|
||||
Reference in New Issue
Block a user