diff --git a/README.md b/README.md index 51e7c5df..2e64b5c4 100644 --- a/README.md +++ b/README.md @@ -202,15 +202,15 @@ such as: ```javascript announce: { url: 'http://chd.im/announce', - announce_prefix: '[CHD.im].', + announcePrefix: '[CHD.im].', admin: 'admin@chd.im', - base_url: 'http://chd.im', - client_black_list_url: 'http://chd.im/client_black_list', - private_torrent_cms: true + baseUrl: 'http://chd.im', + clientBlackListUrl: 'http://chd.im/client_black_list', + privateTorrentCmsMode: true }, ``` meanTorrent tracker is private, please set the `announce.url` to your server url, then when user to upload torrent file, It will autocheck the torrent announce url whether matching as `announce.url`. -But, meanTorrent support public tracker torrents CMS mode with `private_torrent_cms` set to `false`, in `public` mode, user can upload and download public tracker torrent files, but these torrent files is can not +But, meanTorrent support public tracker torrents CMS mode with `privateTorrentCmsMode` set to `false`, in `public` mode, user can upload and download public tracker torrent files, but these torrent files is can not used by meanTorrent tracker server. ```javascript @@ -245,20 +245,20 @@ And you can make a list page to tell users witch clients are unpopular. ```javascript sign: { - open_signup: true, - allow_social_sign: true + openSignup: true, + allowSocialSignin: true }, ``` ```javascript invite: { - open_invite: true, - score_exchange: 10000, + openInvite: true, + scoreExchange: 10000, expires: 60 * 60 * 1000 * 24 }, ``` -If your site do not accept user free register, please set `open_signup` to `false`, then user only can register through friend invitation or system(admin/oper) invitation. -if you set `open_invite` to `true`, the normal user can invite friends to join, if `false` only oper/admin can invite users. +If your site do not accept user free register, please set `openSignup` to `false`, then user only can register through friend invitation or system(admin/oper) invitation. +if you set `openInvite` to `true`, the normal user can invite friends to join, if `false` only oper/admin can invite users. ```javascript ircAnnounce: { @@ -270,7 +270,6 @@ if you set `open_invite` to `true`, the normal user can invite friends to join, userName: 'meanTorrent', realName: 'IRC announce client', channel: '#chdAnnounce', - msg_format: '%s upload torrent %s at %s', showErrors: true, autoRejoin: true, autoConnect: true, @@ -283,13 +282,13 @@ Now, IRC announce support [Node-irc](https://github.com/martynsmith/node-irc), t ```javascript app: { - show_demo_warning_popup: true + showDemoWarningPopup: true }, sign: { - show_demo_sign_message: true + showDemoSignMessage: true }, ``` -If you started meanTorrent at `production` env, please set `show_demo_warning_popup` and `show_demo_sign_message` to `false`, this will not show demo message any where. +If you started meanTorrent at `production` env, please set `showDemoWarningPopup` and `showDemoSignMessage` to `false`, this will not show demo message any where. There is not much comment of `config/env/torrent.js`, because the development time is limited, I'll add more comment in my free time, If you has any question, please post an [issue](https://github.com/taobataoma/meanTorrent/issues), and i will focus it. diff --git a/config/env/torrents.js b/config/env/torrents.js index 425c14ca..6e6bc156 100644 --- a/config/env/torrents.js +++ b/config/env/torrents.js @@ -4,7 +4,7 @@ module.exports = { meanTorrentConfig: { app: { domain: 'http://chd.im:3000', - show_demo_warning_popup: true + showDemoWarningPopup: true }, language: [ {name: 'en', index: 0, class: 'flag-icon-gb', title: 'English'}, @@ -13,12 +13,12 @@ module.exports = { announce: { url: 'http://chd.im:3000/announce', comment: 'meanTorrent group', - announce_interval: 60 * 1000, - announce_prefix: '{CHD.im}.', + announceInterval: 60 * 1000, + announcePrefix: '{CHD.im}.', admin: 'admin@chd.im', - base_url: 'http://chd.im:3000', - client_black_list_url: 'http://chd.im:3000/client_black_list', - private_torrent_cms: true + baseUrl: 'http://chd.im:3000', + clientBlackListUrl: 'http://chd.im:3000/client_black_list', + privateTorrentCmsMode: true }, ircAnnounce: { enable: true, @@ -29,8 +29,8 @@ module.exports = { userName: 'meanTorrent', realName: 'IRC announce client', channel: '#chdAnnounce', - default_msg_format: '%s upload - torrent: %s, type: %s, size: %d, sale: %s, at %s', - tvserial_msg_format: '%s upload - torrent: %s, type: %s, size: %d, seasons: %d, episodes: %s, sale: %s, at %s', + defaultMsgFormat: '%s upload - torrent: %s, type: %s, size: %d, sale: %s, at %s', + tvserialMsgFormat: '%s upload - torrent: %s, type: %s, size: %d, seasons: %d, episodes: %s, sale: %s, at %s', showErrors: true, autoRejoin: true, autoConnect: true, @@ -39,17 +39,17 @@ module.exports = { encoding: 'UTF-8' }, sign: { - open_signup: true, - allow_social_sign: false, - show_demo_sign_message: true + openSignup: true, + allowSocialSignin: false, + showDemoSignMessage: true }, invite: { - open_invite: true, - score_exchange: 10000, + openInvite: true, + scoreExchange: 10000, expires: 60 * 60 * 1000 * 24 }, score: { - level_step: 500, + levelStep: 500, action: { signEveryday: {name: 'signEveryday', value: 10, enable: true}, uploadTorrent: {name: 'uploadTorrent', value: 50, enable: true}, @@ -186,19 +186,19 @@ module.exports = { } }, tmdbConfig: { - tmdb_home: 'https://www.themoviedb.org', - tmdb_movie_link_url: 'https://www.themoviedb.org/movie/', - tmdb_tv_link_url: 'https://www.themoviedb.org/tv/', + tmdbHome: 'https://www.themoviedb.org', + tmdbMovieLinkUrl: 'https://www.themoviedb.org/movie/', + tmdbTvserialLinkUrl: 'https://www.themoviedb.org/tv/', //please change it to your api key from themoviedb.org key: '7888f0042a366f63289ff571b68b7ce0', - backdrop_img_base_url: 'http://image.tmdb.org/t/p/w1280', - backdrop_img_base_url_300: 'http://image.tmdb.org/t/p/w300', - poster_img_base_url: 'http://image.tmdb.org/t/p/w500', - poster_list_base_url: 'http://image.tmdb.org/t/p/w92', - cast_img_base_url: 'http://image.tmdb.org/t/p/w132_and_h132_bestv2' + backdropImgBaseUrl: 'http://image.tmdb.org/t/p/w1280', + backdropImgBaseUrl_300: 'http://image.tmdb.org/t/p/w300', + posterImgBaseUrl: 'http://image.tmdb.org/t/p/w500', + posterListBaseUrl: 'http://image.tmdb.org/t/p/w92', + castImgBaseUrl: 'http://image.tmdb.org/t/p/w132_and_h132_bestv2' }, imdbConfig: { - imdb_link_url: 'http://www.imdb.com/title/' + imdbLinkUrl: 'http://www.imdb.com/title/' }, forumsConfig: { category: [ @@ -206,15 +206,15 @@ module.exports = { {name: 'DISCUSS', value: 'discuss', index: 1}, {name: 'BUSINESS', value: 'business', index: 2} ], - show_thumbs_up_user_list: true + showThumbsUpUserList: true }, itemsPerPage: { - topics_per_page: 10, - replies_per_page: 10, - topics_search_per_page: 10, - torrents_per_page: 15, - torrents_comments_per_page: 10, - traces_per_page: 30 + topicsPerPage: 10, + repliesPerPage: 10, + topicsSearchPerPage: 10, + torrentsPerPage: 15, + torrentsCommentsPerPage: 10, + tracesPerPage: 30 }, resourcesTags: { radio: [ diff --git a/modules/announce/server/controllers/announces.server.controller.js b/modules/announce/server/controllers/announces.server.controller.js index ad7b463f..999638b6 100644 --- a/modules/announce/server/controllers/announces.server.controller.js +++ b/modules/announce/server/controllers/announces.server.controller.js @@ -31,7 +31,7 @@ const FAILURE_REASONS = { 151: 'Invalid peerid: peerid is not 20 bytes long', 152: 'Invalid numwant. Client requested more peers than allowed by tracker', 153: 'Passkey length error (length=32)', - 154: 'Invalid passkey, if you changed you passkey, please re-download the torrent file from ' + config.meanTorrentConfig.announce.base_url, + 154: 'Invalid passkey, if you changed you passkey, please re-download the torrent file from ' + config.meanTorrentConfig.announce.baseUrl, 160: 'Invalid torrent info_hash', 161: 'No torrent with that info_hash has been found', @@ -39,7 +39,7 @@ const FAILURE_REASONS = { 170: 'your account is banned', 171: 'your account is sealed', - 172: 'your client is not allowed, here is the blacklist: ' + config.meanTorrentConfig.announce.client_black_list_url, + 172: 'your client is not allowed, here is the blacklist: ' + config.meanTorrentConfig.announce.clientBlackListUrl, 180: 'You already are downloading the same torrent. You may only leech from one location at a time', 181: 'You cannot seed the same torrent from more than 3 locations', @@ -62,7 +62,7 @@ const PEERSTATE_SEEDER = 'seeder'; const PEERSTATE_LEECHER = 'leecher'; const PEER_COMPACT_SIZE = 6; -const ANNOUNCE_INTERVAL = Math.floor(config.meanTorrentConfig.announce.announce_interval / 1000); +const ANNOUNCE_INTERVAL = Math.floor(config.meanTorrentConfig.announce.announceInterval / 1000); const ANNOUNCE_GHOST = 2; const PARAMS_INTEGER = [ diff --git a/modules/core/client/controllers/home.client.controller.js b/modules/core/client/controllers/home.client.controller.js index 65085f4c..9b92c8c4 100644 --- a/modules/core/client/controllers/home.client.controller.js +++ b/modules/core/client/controllers/home.client.controller.js @@ -47,7 +47,7 @@ */ vm.initTopOneMovieInfo = function () { if (vm.movieTopOne.resource_detail_info.backdrop_path) { - $('.movie-backdrop').css('backgroundImage', 'url(' + vm.tmdbConfig.backdrop_img_base_url + vm.movieTopOne.resource_detail_info.backdrop_path + ')'); + $('.movie-backdrop').css('backgroundImage', 'url(' + vm.tmdbConfig.backdropImgBaseUrl + vm.movieTopOne.resource_detail_info.backdrop_path + ')'); } }; @@ -56,7 +56,7 @@ */ vm.initTopOneTVInfo = function () { if (vm.TVTopOne.resource_detail_info.backdrop_path) { - $('.tv-backdrop').css('backgroundImage', 'url(' + vm.tmdbConfig.backdrop_img_base_url + vm.TVTopOne.resource_detail_info.backdrop_path + ')'); + $('.tv-backdrop').css('backgroundImage', 'url(' + vm.tmdbConfig.backdropImgBaseUrl + vm.TVTopOne.resource_detail_info.backdrop_path + ')'); } }; @@ -68,7 +68,7 @@ vm.getTVTopInfo(); var sw = localStorageService.get('showed_warning'); - if (vm.appConfig.show_demo_warning_popup && !sw) { + if (vm.appConfig.showDemoWarningPopup && !sw) { $timeout(function () { $('#warning_popup').popup('show'); //$('.warning_popup_open').trigger('click'); diff --git a/modules/core/client/views/footer.client.view.html b/modules/core/client/views/footer.client.view.html index c8c9b16a..d71a631d 100644 --- a/modules/core/client/views/footer.client.view.html +++ b/modules/core/client/views/footer.client.view.html @@ -8,8 +8,8 @@
{{'TOTAL_TORRENTSSIZE' | translate}}: {{vm.siteInfo.totalTorrentsSize | bytes}}
{{'TOTAL_SEEDERS' | translate}}: {{vm.siteInfo.totalSeeders}}
{{'TOTAL_LEECHERS' | translate}}: {{vm.siteInfo.totalLeechers}}
-
{{'TOTAL_UPLOADED' | translate}}: {{vm.siteInfo.totalUploaded | bytes}}
-
{{'TOTAL_DOWNLOADED' | translate}}: {{vm.siteInfo.totalDownloaded | bytes}}
+
{{'TOTAL_UPLOADED' | translate}}: {{vm.siteInfo.totalUploaded | bytes}}
+
{{'TOTAL_DOWNLOADED' | translate}}: {{vm.siteInfo.totalDownloaded | bytes}}
{{'TOTAL_FORUMTOPICS' | translate}}: {{vm.siteInfo.totalForumTopics}}
{{'TOTAL_FORUMREPLIES' | translate}}: {{vm.siteInfo.totalForumReplies}}
diff --git a/modules/core/client/views/header.client.view.html b/modules/core/client/views/header.client.view.html index 9e1e70c8..ddd50190 100644 --- a/modules/core/client/views/header.client.view.html +++ b/modules/core/client/views/header.client.view.html @@ -58,7 +58,7 @@
  • -
  • +
  • diff --git a/modules/core/client/views/home.client.view.html b/modules/core/client/views/home.client.view.html index 568202aa..1fa598fb 100644 --- a/modules/core/client/views/home.client.view.html +++ b/modules/core/client/views/home.client.view.html @@ -5,7 +5,7 @@
    - @@ -76,7 +76,7 @@
    - {{cast.name}} @@ -99,7 +99,7 @@