edit the Torrent Model files, add torrent_status and torrent_recommend fields

This commit is contained in:
OldHawk
2017-04-04 19:00:37 +08:00
parent c51aa6958b
commit b1f2d533bd
5 changed files with 75 additions and 13 deletions

View File

@@ -55,7 +55,12 @@
],
//HomeController & home views
LOADING_TOP: '正在推荐资源,请稍候...',
TOP_MOVIE_INFO_ERROR: '获取电影Top列表失败',
TITLE_SEEDS: '做种用户数',
TITLE_LEECHERS: '正在下载数',
TITLE_FINISHED: '完成下载数',
TITLE_IMDB_VOTES: 'IMDB 评分',
//TorrentsUploadsController
TORRENTS_UPLOAD_SUCCESSFULLY: '文件上传成功',
@@ -79,7 +84,6 @@
CANCEL_BUTTON: '算了,以后再说',
AGREE_RULES: '我已阅读并同意站内所有协议条款,<a href="#">协议条款</a>',
DOWNLOAD_TORRENT: '下载种子',
LOADING_TOP: '正在推荐资源,请稍候...',
//footer view
MIT_PROTOCOL: '本项目源码受 <a href="https://github.com/twbs/bootstrap/blob/master/LICENSE" target="_blank">MIT</a> 开源协议保护',

View File

@@ -55,6 +55,7 @@
],
//HomeController & home views
LOADING_TOP: 'Loading recommended info, please waiting...',
TOP_MOVIE_INFO_ERROR: 'Get movie top info faild',
TITLE_SEEDS: 'Seeds users',
TITLE_LEECHERS: 'Leechers users',
@@ -83,7 +84,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',
LOADING_TOP: 'Loading recommended info, please waiting...',
//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',

View File

@@ -60,11 +60,18 @@
}
.post-info-img {
cursor: pointer;
&:hover {
background-color: rgba(224, 224, 224, .3);
}
> img {
opacity: 0.8;
&:hover {
cursor: pointer;
opacity: 1;
+ .torrent-user-info {
opacity: 1;
color: #fff;
}
}
}
.caption {
@@ -73,14 +80,45 @@
margin-bottom: 0;
}
}
.star-votes {
color: #FF6600;
+ span {
color: #FF6600;
}
}
.release-date {
color: #FF6600;
color: #000;
}
}
.torrent-votes {
color: #FF6600;
> kbd {
background-color: #FF6600;
}
}
.torrent-user-info {
display: table-cell;
position: absolute;
top: 4px;
left: 20px;
right: 20px;
padding: 8px 0;
background-color: #2a2730;
background-color: rgba(0, 0, 0, .8);
color: #ddd;
opacity: 0.8;
&:hover {
opacity: 1;
color: #fff;
}
> ul {
margin-left: 0;
margin-bottom: 0;
}
.torrent-up {
color: #33CC00;
}
.torrent-down {
color: #FF3300;
}
.torrent-finished {
color: #33FFFF;
}
}

View File

@@ -50,7 +50,7 @@
<!--<dd class="h-line">${{vm.movieinfo.revenue}}</dd>-->
<dt class="h-line">{{ 'TMDB_FIELDS.VOTE_AVERAGE' | translate}}</dt>
<dd class="h-line">{{vm.movieinfo.vote_average}} / {{vm.movieinfo.vote_count}} {{ 'TMDB_FIELDS.VOTE_UNIT' | translate}}</dd>
<dd class="h-line"><span class="torrent-votes"><kbd>IMDB</kbd></span> {{vm.movieinfo.vote_average}} / {{vm.movieinfo.vote_count}} {{ 'TMDB_FIELDS.VOTE_UNIT' | translate}}</dd>
<!--<dt class="h-line">{{ 'TMDB_FIELDS.IMDB_LINK' | translate}}</dt>-->
<!--<dd class="h-line"><a href="https://www.themoviedb.org/movie/{{vm.movieinfo.imdb_id}}"-->
@@ -137,12 +137,21 @@
<img ng-src="{{vm.tmdbConfig.poster_img_base_url}}{{item.torrent_img}}" alt="{{item.torrent_title}}"
class="img-responsive">
<div class="torrent-user-info">
<ul class="list-unstyled list-inline">
<li title="{{ 'TITLE_SEEDS' | translate}}"><span class="glyphicon glyphicon-arrow-up torrent-up"></span><span>356</span></li>
<li title="{{ 'TITLE_LEECHERS' | translate}}"><span class="glyphicon glyphicon-arrow-down torrent-down"></span><span>24</span></li>
<li title="{{ 'TITLE_FINISHED' | translate}}" class="pull-right"><span
class="glyphicon glyphicon-ok torrent-finished"></span><span>1622</span></li>
</ul>
</div>
<div class="caption">
<ul class="list-unstyled">
</li>
<li style="white-space: nowrap; overflow:hidden; text-overflow: ellipsis;">
<strong>{{item.torrent_title}}</strong>
<li><span class="glyphicon glyphicon-star star-votes"></span><span>{{item.torrent_imdb_votes}}</span><span class="pull-right release-date">{{item.torrent_release}}</span></li>
<li><span class="release-date">{{item.torrent_release}}</span><span title="{{ 'TITLE_IMDB_VOTES' | translate}}"
class="pull-right torrent-votes"><kbd>IMDB</kbd> {{item.torrent_imdb_votes}}</span></li>
</ul>
</div>
</div>

View File

@@ -88,6 +88,17 @@ var TorrentSchema = new Schema({
default: '2017',
trim: true
},
torrent_status: {
type: [{
type: String,
enum: ['new', 'reviewed', 'deleted']
}],
default: ['newer']
},
torrent_recommended: {
type: Number,
default: 0
},
last_scrape: {
type: Date,
default: Date.now