From cbfcba4cbcefda6f35372a15f197a8a6268d2d55 Mon Sep 17 00:00:00 2001 From: deranjer Date: Sun, 27 May 2018 17:45:29 -0400 Subject: [PATCH] Adding a few settings to webui, cleanup of unneeded func --- engine/engine.go | 6 ------ .../SettingsModalContentTabs/clientSettingsTab.js | 1 + .../SettingsModalContentTabs/loggingSettingsTab.js | 2 +- public/static/js/bundle.js | 14 +++++++++++++- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/engine/engine.go b/engine/engine.go index 7d076dee..09d13e7d 100644 --- a/engine/engine.go +++ b/engine/engine.go @@ -129,11 +129,6 @@ func readTorrentFileFromDB(element *Storage.TorrentLocal, tclient *torrent.Clien return singleTorrent, nil } -//StartTorrents attempts to start torrents by adding them to the active torrents, then the queue, and by increasing their connections (if they were stopped) -func StartTorrents(clientTorrent *torrent.Client, torrentHashes []string, torrentQueues Storage.TorrentQueues) { - -} - //AddTorrent creates the storage.db entry and starts A NEW TORRENT and adds to the running torrent array func AddTorrent(clientTorrent *torrent.Torrent, torrentLocalStorage Storage.TorrentLocal, db *storm.DB, torrentType, torrentFilePathAbs, torrentStoragePath, labelValue string, config Settings.FullClientSettings) { timedOut := timeOutInfo(clientTorrent, 45) //seeing if adding the torrent times out (giving 45 seconds) @@ -233,7 +228,6 @@ func CreateInitialTorrentArray(tclient *torrent.Client, TorrentLocalArray []*Sto AddTorrentToQueue(singleTorrentFromStorage, singleTorrent, db) } } else { //If we already have a queue set up then assign torrents to queue - Logger.Info("Existing Queue found in database, reading it in") if singleTorrentFromStorage.TorrentStatus == "Queued" { AddTorrentToQueue(singleTorrentFromStorage, singleTorrent, db) } else { diff --git a/goTorrentWebUI/src/TopMenu/Modals/SettingsModal/SettingsModalContentTabs/clientSettingsTab.js b/goTorrentWebUI/src/TopMenu/Modals/SettingsModal/SettingsModalContentTabs/clientSettingsTab.js index c0d5fda0..825ac6da 100644 --- a/goTorrentWebUI/src/TopMenu/Modals/SettingsModal/SettingsModalContentTabs/clientSettingsTab.js +++ b/goTorrentWebUI/src/TopMenu/Modals/SettingsModal/SettingsModalContentTabs/clientSettingsTab.js @@ -35,6 +35,7 @@ class ClientSettingsTab extends React.PureComponent { HTTP Port: {this.props.settingsFile["HTTPAddr"]} Use Proxy: {String(this.props.settingsFile["UseProxy"])} Base URL: {this.props.settingsFile["BaseURL"]} + Max Active Torrents: {this.props.settingsFile["MaxActiveTorrents"]} diff --git a/goTorrentWebUI/src/TopMenu/Modals/SettingsModal/SettingsModalContentTabs/loggingSettingsTab.js b/goTorrentWebUI/src/TopMenu/Modals/SettingsModal/SettingsModalContentTabs/loggingSettingsTab.js index 6914c12d..2547aa9a 100644 --- a/goTorrentWebUI/src/TopMenu/Modals/SettingsModal/SettingsModalContentTabs/loggingSettingsTab.js +++ b/goTorrentWebUI/src/TopMenu/Modals/SettingsModal/SettingsModalContentTabs/loggingSettingsTab.js @@ -53,7 +53,7 @@ class LoggingSettingsTab extends React.Component { Logging Output: {this.props.settingsFile["LoggingOutput"]} - Logging Level: {logLevel} + Logging Level: {this.props.settingsFile["LoggingLevel"]} diff --git a/public/static/js/bundle.js b/public/static/js/bundle.js index 3107849c..5a9c6cf9 100644 --- a/public/static/js/bundle.js +++ b/public/static/js/bundle.js @@ -109784,6 +109784,18 @@ var ClientSettingsTab = function (_React$PureComponent) { ' ' ), ' ' + ), + _react2.default.createElement( + _Paper2.default, + { className: classes.paper }, + 'Max Active Torrents: ', + _react2.default.createElement( + 'span', + { className: classes.floatRight }, + this.props.settingsFile["MaxActiveTorrents"], + ' ' + ), + ' ' ) ), _react2.default.createElement( @@ -109955,7 +109967,7 @@ var LoggingSettingsTab = function (_React$Component) { _react2.default.createElement( 'span', { className: classes.floatRight }, - logLevel, + this.props.settingsFile["LoggingLevel"], ' ' ), ' '