Skip to content

Commit

Permalink
change recommend level all=>none,it can let`s level1 is the highest l…
Browse files Browse the repository at this point in the history
…evel
  • Loading branch information
taobataoma committed May 15, 2017
1 parent 1088b4a commit 1d31996
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion config/env/torrents.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = {
torrentRecommendLevel: {
name: 'RECOMMENDLEVEL',
value: [
{name: 'LEVEL0', value: 'all'},
{name: 'LEVEL0', value: 'none'},
{name: 'LEVEL1', value: 'level1'},
{name: 'LEVEL2', value: 'level2'},
{name: 'LEVEL3', value: 'level3'}
Expand Down
2 changes: 1 addition & 1 deletion modules/core/client/app/trans-string-en.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@
TORRENT_STATUS_ALL: 'ALL',
TORRENT_RECOMMEND_LEVEL: 'Recommend Level',
TORRENT_RECOMMEND_LEVEL_ITEM: {
LEVEL0: 'ALL',
LEVEL0: 'NONE',
LEVEL1: 'LEVEL1',
LEVEL2: 'LEVEL2',
LEVEL3: 'LEVEL3'
Expand Down
2 changes: 1 addition & 1 deletion modules/core/client/app/trans-string-zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
TORRENT_STATUS_ALL: '全部',
TORRENT_RECOMMEND_LEVEL: '推荐级别',
TORRENT_RECOMMEND_LEVEL_ITEM: {
LEVEL0: '全部',
LEVEL0: '',
LEVEL1: '一级推荐',
LEVEL2: '二级推荐',
LEVEL3: '三级推荐'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
vm.searchKey = '';
vm.releaseYear = undefined;
vm.torrentStatus = 'reviewed';
vm.torrentRLevel = 'all';
vm.torrentRLevel = 'none';

/**
* If user is not signed in then redirect back home
Expand Down Expand Up @@ -102,7 +102,7 @@
var e = angular.element(event.currentTarget);

if (vm.torrentRLevel === l) {
vm.torrentRLevel = 'all';
vm.torrentRLevel = 'none';
} else {
vm.torrentRLevel = l;
}
Expand Down Expand Up @@ -261,7 +261,7 @@
*/
vm.onRLevelClicked = function (l) {
if (vm.torrentRLevel === l) {
vm.torrentRLevel = 'all';
vm.torrentRLevel = 'none';
} else {
vm.torrentRLevel = l;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ <h5 class="media-heading">{{item.torrent_original_title}}
</span>
<span class="label label-rlevel label-danger"
ng-click="vm.onRLevelClicked(item.torrent_recommended); $event.stopPropagation();"
ng-show="item.torrent_recommended != 'all'">
ng-show="item.torrent_recommended != 'none'">
{{ 'TORRENT_RECOMMEND_LEVEL_ITEM.' + item.torrent_recommended.toUpperCase() | translate}}
</span>
<span class="label label-sale" ng-if="item.isSaling"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ exports.list = function (req, res) {
var skip = 0;
var limit = 0;
var status = 'reviewed';
var rlevel = 'all';
var rlevel = 'none';
var stype = 'movie';
var release = undefined;
var tagsA = [];
Expand Down Expand Up @@ -456,7 +456,7 @@ exports.list = function (req, res) {
if (status !== 'all') {
condition.torrent_status = status;
}
if (rlevel !== 'all') {
if (rlevel !== 'none') {
condition.torrent_recommended = rlevel;
}
if (stype !== 'all') {
Expand Down Expand Up @@ -492,7 +492,7 @@ exports.list = function (req, res) {

var findQuery = function (callback) {
Torrent.find(condition)
.sort('-torrent_recommended -createdat')
.sort('torrent_recommended -createdat')
.populate('user', 'displayName')
.skip(skip)
.limit(limit)
Expand Down
2 changes: 1 addition & 1 deletion modules/torrents/server/models/torrent.server.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ var TorrentSchema = new Schema({
},
torrent_recommended: {
type: String,
default: 'all'
default: 'none'
},
_subtitles: [{
type: Schema.Types.ObjectId,
Expand Down

0 comments on commit 1d31996

Please sign in to comment.