From c93ff903bf7f5edb8a42bfd9c5db3b9d6e9e593e Mon Sep 17 00:00:00 2001 From: OldHawk Date: Thu, 7 Dec 2017 11:45:58 +0800 Subject: [PATCH] fix(vip): Reorganize vip torrents show/hide show in user status uploaded torrents list show in uploaded list at admin user page show in all newest torrents list at admin manage page --- .../controllers/home.client.controller.js | 18 ++++++++++++++++++ .../admin/admin-list.client.controller.js | 2 +- .../controllers/torrents.client.controller.js | 4 +++- .../views/admin/admin-list.client.view.html | 2 +- .../views/list-torrents.client.view.html | 7 +++++-- .../controllers/torrents.server.controller.js | 12 +++++++----- .../admin/user-uploaded.client.controller.js | 3 +-- .../status/uploaded.client.controller.js | 3 +-- 8 files changed, 37 insertions(+), 14 deletions(-) diff --git a/modules/core/client/controllers/home.client.controller.js b/modules/core/client/controllers/home.client.controller.js index 174d5d94..a325529c 100644 --- a/modules/core/client/controllers/home.client.controller.js +++ b/modules/core/client/controllers/home.client.controller.js @@ -162,6 +162,7 @@ vm.moviesInfo = TorrentsService.get({ torrent_status: 'reviewed', torrent_type: 'movie', + torrent_vip: false, limit: 9 }, function (items) { if (items.rows.length > 0) { @@ -185,6 +186,7 @@ vm.moviesInfo = TorrentsService.get({ torrent_status: 'reviewed', torrent_type: 'movie', + torrent_vip: false, newest: true, limit: 14 }, function (items) { @@ -209,6 +211,7 @@ vm.tvsInfo = TorrentsService.get({ torrent_status: 'reviewed', torrent_type: 'tvserial', + torrent_vip: false, limit: 9 }, function (items) { if (items.rows.length > 0) { @@ -228,6 +231,7 @@ vm.tvsInfo = TorrentsService.get({ torrent_status: 'reviewed', torrent_type: 'tvserial', + torrent_vip: false, newest: true, limit: 14 }, function (items) { @@ -248,6 +252,7 @@ vm.musicInfo = TorrentsService.get({ torrent_status: 'reviewed', torrent_type: 'music', + torrent_vip: false, limit: 9 }, function (items) { if (items.rows.length > 0) { @@ -267,6 +272,7 @@ vm.musicInfo = TorrentsService.get({ torrent_status: 'reviewed', torrent_type: 'music', + torrent_vip: false, newest: true, limit: 13 }, function (items) { @@ -287,6 +293,7 @@ vm.sportsInfo = TorrentsService.get({ torrent_status: 'reviewed', torrent_type: 'sports', + torrent_vip: false, limit: 9 }, function (items) { if (items.rows.length > 0) { @@ -306,6 +313,7 @@ vm.sportsInfo = TorrentsService.get({ torrent_status: 'reviewed', torrent_type: 'sports', + torrent_vip: false, newest: true, limit: 14 }, function (items) { @@ -326,6 +334,7 @@ vm.varietyInfo = TorrentsService.get({ torrent_status: 'reviewed', torrent_type: 'variety', + torrent_vip: false, limit: 9 }, function (items) { if (items.rows.length > 0) { @@ -345,6 +354,7 @@ vm.varietyInfo = TorrentsService.get({ torrent_status: 'reviewed', torrent_type: 'variety', + torrent_vip: false, newest: true, limit: 14 }, function (items) { @@ -365,6 +375,7 @@ vm.pictureInfo = TorrentsService.get({ torrent_status: 'reviewed', torrent_type: 'picture', + torrent_vip: false, limit: 9 }, function (items) { if (items.rows.length > 0) { @@ -384,6 +395,7 @@ vm.pictureInfo = TorrentsService.get({ torrent_status: 'reviewed', torrent_type: 'picture', + torrent_vip: false, newest: true, limit: 14 }, function (items) { @@ -404,6 +416,7 @@ vm.gameInfo = TorrentsService.get({ torrent_status: 'reviewed', torrent_type: 'game', + torrent_vip: false, limit: 9 }, function (items) { if (items.rows.length > 0) { @@ -423,6 +436,7 @@ vm.gameInfo = TorrentsService.get({ torrent_status: 'reviewed', torrent_type: 'game', + torrent_vip: false, newest: true, limit: 14 }, function (items) { @@ -443,6 +457,7 @@ vm.softwareInfo = TorrentsService.get({ torrent_status: 'reviewed', torrent_type: 'software', + torrent_vip: false, limit: 9 }, function (items) { if (items.rows.length > 0) { @@ -462,6 +477,7 @@ vm.softwareInfo = TorrentsService.get({ torrent_status: 'reviewed', torrent_type: 'software', + torrent_vip: false, newest: true, limit: 14 }, function (items) { @@ -482,6 +498,7 @@ vm.ebookInfo = TorrentsService.get({ torrent_status: 'reviewed', torrent_type: 'ebook', + torrent_vip: false, limit: 9 }, function (items) { if (items.rows.length > 0) { @@ -501,6 +518,7 @@ vm.ebookInfo = TorrentsService.get({ torrent_status: 'reviewed', torrent_type: 'ebook', + torrent_vip: false, newest: true, limit: 14 }, function (items) { diff --git a/modules/torrents/client/controllers/admin/admin-list.client.controller.js b/modules/torrents/client/controllers/admin/admin-list.client.controller.js index da06dcfc..1d611ce8 100644 --- a/modules/torrents/client/controllers/admin/admin-list.client.controller.js +++ b/modules/torrents/client/controllers/admin/admin-list.client.controller.js @@ -207,7 +207,7 @@ torrent_release: vm.releaseYear, torrent_tags: vm.searchTags, torrent_hnr: vm.filterHnR, - torrent_vip: vm.filterVIP, + torrent_vip: vm.filterVIP ? vm.filterVIP : undefined, torrent_sale: vm.filterSale }, function (items) { if (items.length === 0) { diff --git a/modules/torrents/client/controllers/torrents.client.controller.js b/modules/torrents/client/controllers/torrents.client.controller.js index aa98cc5d..1b49099f 100644 --- a/modules/torrents/client/controllers/torrents.client.controller.js +++ b/modules/torrents/client/controllers/torrents.client.controller.js @@ -82,7 +82,8 @@ TorrentsService.get({ limit: vm.topItems, torrent_status: 'reviewed', - torrent_type: vm.torrentType + torrent_type: vm.torrentType, + torrent_vip: false }, function (items) { mtDebug.info(items); vm.listTopInfo = items.rows; @@ -295,6 +296,7 @@ keys: vm.searchKey.trim(), torrent_status: 'reviewed', torrent_type: vm.torrentType, + torrent_vip: false, torrent_release: vm.releaseYear, torrent_tags: vm.searchTags, torrent_hnr: vm.filterHnR, diff --git a/modules/torrents/client/views/admin/admin-list.client.view.html b/modules/torrents/client/views/admin/admin-list.client.view.html index 272a5490..6feb9af8 100644 --- a/modules/torrents/client/views/admin/admin-list.client.view.html +++ b/modules/torrents/client/views/admin/admin-list.client.view.html @@ -189,7 +189,7 @@
{{vm.TGI.getTorrentDoubleTitle(item)}} (By: - ) + )
diff --git a/modules/torrents/client/views/list-torrents.client.view.html b/modules/torrents/client/views/list-torrents.client.view.html index 4092e9e5..f9c3babf 100644 --- a/modules/torrents/client/views/list-torrents.client.view.html +++ b/modules/torrents/client/views/list-torrents.client.view.html @@ -233,11 +233,14 @@ {{item.torrent_sale_status}} {{item.torrent_sale_expires | unlife}} + S{{item.torrent_seasons}}E{{item.torrent_episodes}} + H&R - S{{item.torrent_seasons}}E{{item.torrent_episodes}} + VIP 0) { diff --git a/modules/users/client/controllers/admin/user-uploaded.client.controller.js b/modules/users/client/controllers/admin/user-uploaded.client.controller.js index eb5700d7..b953f523 100644 --- a/modules/users/client/controllers/admin/user-uploaded.client.controller.js +++ b/modules/users/client/controllers/admin/user-uploaded.client.controller.js @@ -69,8 +69,7 @@ TorrentsService.get({ userid: $state.params.userId, torrent_type: 'all', - torrent_status: 'all', - torrent_vip: false + torrent_status: 'all' }, function (items) { vm.userUploadedList = items.rows; vm.buildPager(); diff --git a/modules/users/client/controllers/status/uploaded.client.controller.js b/modules/users/client/controllers/status/uploaded.client.controller.js index fd2a2b52..ac11e959 100644 --- a/modules/users/client/controllers/status/uploaded.client.controller.js +++ b/modules/users/client/controllers/status/uploaded.client.controller.js @@ -69,8 +69,7 @@ TorrentsService.get({ userid: vm.user._id, torrent_type: 'all', - torrent_status: 'all', - torrent_vip: false + torrent_status: 'all' }, function (items) { vm.uploadedList = items.rows; mtDebug.info(items);