mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-05-06 10:26:05 +02:00
fix(torrents): fixed torrent tags filter issue
This commit is contained in:
@@ -313,7 +313,7 @@
|
||||
skip: (p - 1) * vm.itemsPerPage,
|
||||
limit: vm.itemsPerPage,
|
||||
sort: vm.sort,
|
||||
torrent_type: (vm.filterType !== 'aggregate') ? vm.filterType : (vm.torrentType === 'aggregate' ? 'all' : vm.torrentType),
|
||||
torrent_type: (vm.filterType && vm.filterType !== 'aggregate') ? vm.filterType : (vm.torrentType === 'aggregate' ? 'all' : vm.torrentType),
|
||||
torrent_status: 'reviewed',
|
||||
maker: vm.maker._id,
|
||||
keys: vm.searchKey,
|
||||
|
||||
@@ -119,9 +119,9 @@
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row filter-tags text-center"
|
||||
ng-if="vm.filterType!='aggregate' || vm.releaseYear || vm.torrentRLevel != 'level0' || vm.filterSale || vm.filterHnR || vm.filterTop || vm.filterUnique || vm.searchTags.length>0">
|
||||
ng-if="(vm.filterType && vm.filterType!='aggregate') || vm.releaseYear || vm.torrentRLevel != 'level0' || vm.filterSale || vm.filterHnR || vm.filterTop || vm.filterUnique || vm.searchTags.length>0">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<span class="filter-tag-item label-tag" ng-if="vm.filterType!='aggregate'">{{'TORRENT_TYPE_LABEL.' + vm.filterType.toUpperCase() | translate}}
|
||||
<span class="filter-tag-item label-tag" ng-if="vm.filterType && vm.filterType!='aggregate'">{{'TORRENT_TYPE_LABEL.' + vm.filterType.toUpperCase() | translate}}
|
||||
<i class="fa fa-times-circle-o"
|
||||
ng-click="vm.onTorrentTypeClicked(vm.filterType);">
|
||||
</i>
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
} else {
|
||||
vm.filterType = vm.torrentType;
|
||||
}
|
||||
console.log('vm.filterType = ' + vm.filterType);
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -311,6 +312,9 @@
|
||||
//if searchKey or searchTags has value, the skip=0
|
||||
var skip = 0;
|
||||
|
||||
console.log(vm.filterType);
|
||||
console.log(vm.torrentType);
|
||||
|
||||
TorrentsService.get({
|
||||
skip: (p - 1) * vm.torrentItemsPerPage + skip,
|
||||
limit: vm.torrentItemsPerPage,
|
||||
@@ -318,7 +322,7 @@
|
||||
keys: vm.searchKey.trim(),
|
||||
torrent_status: 'reviewed',
|
||||
torrent_rlevel: vm.torrentRLevel,
|
||||
torrent_type: (vm.filterType !== 'aggregate') ? vm.filterType : (vm.torrentType === 'aggregate' ? 'all' : vm.torrentType),
|
||||
torrent_type: (vm.filterType && vm.filterType !== 'aggregate') ? vm.filterType : (vm.torrentType === 'aggregate' ? 'all' : vm.torrentType),
|
||||
torrent_vip: false,
|
||||
torrent_release: vm.releaseYear,
|
||||
torrent_tags: vm.searchTags,
|
||||
@@ -350,7 +354,7 @@
|
||||
vm.rssUrl += '?language=' + vm.lang;
|
||||
vm.rssUrl += '&limit=' + vm.rssConfig.pageItemsNumber;
|
||||
vm.rssUrl += vm.searchKey.trim() ? '&keys=' + vm.searchKey.trim() : '';
|
||||
vm.rssUrl += '&torrent_type=' + ((vm.filterType !== 'aggregate') ? vm.filterType : (vm.torrentType === 'aggregate' ? 'all' : vm.torrentType));
|
||||
vm.rssUrl += '&torrent_type=' + ((vm.filterType && vm.filterType !== 'aggregate') ? vm.filterType : (vm.torrentType === 'aggregate' ? 'all' : vm.torrentType));
|
||||
vm.rssUrl += vm.releaseYear ? '&torrent_release=' + vm.releaseYear : '';
|
||||
vm.rssUrl += vm.searchTags.length ? '&torrent_tags=' + vm.searchTags : '';
|
||||
vm.rssUrl += '&torrent_hnr=' + vm.filterHnR;
|
||||
|
||||
@@ -72,9 +72,9 @@
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row filter-tags text-center"
|
||||
ng-if="(vm.filterType!='aggregate' && vm.filterType!=vm.torrentType) || vm.releaseYear || vm.torrentRLevel != 'level0' || vm.filterSale || vm.filterHnR || vm.filterTop || vm.filterUnique || vm.searchTags.length>0">
|
||||
ng-if="(vm.filterType && vm.filterType!='aggregate' && vm.filterType!=vm.torrentType) || vm.releaseYear || vm.torrentRLevel != 'level0' || vm.filterSale || vm.filterHnR || vm.filterTop || vm.filterUnique || vm.searchTags.length>0">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<span class="filter-tag-item label-tag" ng-if="vm.filterType!='aggregate' && vm.filterType!=vm.torrentType">{{'TORRENT_TYPE_LABEL.' + vm.filterType.toUpperCase() | translate}}
|
||||
<span class="filter-tag-item label-tag" ng-if="vm.filterType && vm.filterType!='aggregate' && vm.filterType!=vm.torrentType">{{'TORRENT_TYPE_LABEL.' + vm.filterType.toUpperCase() | translate}}
|
||||
<i class="fa fa-times-circle-o"
|
||||
ng-click="vm.onTorrentTypeClicked(vm.filterType);">
|
||||
</i>
|
||||
|
||||
@@ -277,7 +277,7 @@
|
||||
skip: (p - 1) * vm.itemsPerPage,
|
||||
limit: vm.itemsPerPage,
|
||||
sort: vm.sort,
|
||||
torrent_type: (vm.filterType !== 'aggregate') ? vm.filterType : (vm.torrentType === 'aggregate' ? 'all' : vm.torrentType),
|
||||
torrent_type: (vm.filterType && vm.filterType !== 'aggregate') ? vm.filterType : (vm.torrentType === 'aggregate' ? 'all' : vm.torrentType),
|
||||
torrent_status: 'reviewed',
|
||||
torrent_vip: true,
|
||||
keys: vm.searchKey.trim(),
|
||||
@@ -305,7 +305,7 @@
|
||||
vm.rssUrl += '?language=' + localStorageService.get('storage_user_lang');
|
||||
vm.rssUrl += '&limit=' + vm.rssConfig.pageItemsNumber;
|
||||
vm.rssUrl += vm.searchKey.trim() ? '&keys=' + vm.searchKey.trim() : '';
|
||||
vm.rssUrl += '&torrent_type=' + ((vm.filterType !== 'aggregate') ? vm.filterType : (vm.torrentType === 'aggregate' ? 'all' : vm.torrentType));
|
||||
vm.rssUrl += '&torrent_type=' + ((vm.filterType && vm.filterType !== 'aggregate') ? vm.filterType : (vm.torrentType === 'aggregate' ? 'all' : vm.torrentType));
|
||||
vm.rssUrl += vm.releaseYear ? '&torrent_release=' + vm.releaseYear : '';
|
||||
vm.rssUrl += vm.searchTags.length ? '&torrent_tags=' + vm.searchTags : '';
|
||||
vm.rssUrl += '&torrent_hnr=' + vm.filterHnR;
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row filter-tags text-center"
|
||||
ng-if="vm.filterType!='aggregate' || vm.releaseYear || vm.torrentRLevel != 'level0' || vm.filterSale || vm.filterHnR || vm.filterTop || vm.filterUnique || vm.searchTags.length>0">
|
||||
ng-if="(vm.filterType && vm.filterType!='aggregate') || vm.releaseYear || vm.torrentRLevel != 'level0' || vm.filterSale || vm.filterHnR || vm.filterTop || vm.filterUnique || vm.searchTags.length>0">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<span class="filter-tag-item label-tag" ng-if="vm.filterType!='aggregate'">{{'TORRENT_TYPE_LABEL.' + vm.filterType.toUpperCase() | translate}}
|
||||
<span class="filter-tag-item label-tag" ng-if="vm.filterType && vm.filterType!='aggregate'">{{'TORRENT_TYPE_LABEL.' + vm.filterType.toUpperCase() | translate}}
|
||||
<i class="fa fa-times-circle-o"
|
||||
ng-click="vm.onTorrentTypeClicked(vm.filterType);">
|
||||
</i>
|
||||
|
||||
Reference in New Issue
Block a user