mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
Apply coding styles
This commit is contained in:
@@ -167,9 +167,9 @@ bool TorrentSynchronization::hasSyncFile() {
|
||||
void TorrentSynchronization::createSyncFile() {
|
||||
std::string directoryName = directory();
|
||||
std::string filepath = directoryName + ".ossync";
|
||||
|
||||
|
||||
FileSys.createDirectory(directoryName, ghoul::filesystem::Directory::Recursive::Yes);
|
||||
|
||||
|
||||
std::ofstream syncFile(filepath, std::ofstream::out);
|
||||
syncFile << "Synchronized";
|
||||
syncFile.close();
|
||||
|
||||
@@ -85,7 +85,7 @@ void TorrentClient::initialize() {
|
||||
settings.set_int(libtorrent::settings_pack::active_downloads, -1);
|
||||
settings.set_int(libtorrent::settings_pack::active_seeds, -1);
|
||||
settings.set_int(libtorrent::settings_pack::active_limit, 30);
|
||||
|
||||
|
||||
settings.set_str(
|
||||
libtorrent::settings_pack::dht_bootstrap_nodes,
|
||||
"router.utorrent.com,dht.transmissionbt.com,router.bittorrent.com,\
|
||||
@@ -146,7 +146,7 @@ void TorrentClient::deinitialize() {
|
||||
void TorrentClient::pollAlerts() {
|
||||
#ifdef SYNC_USE_LIBTORRENT
|
||||
// Libtorrent does not seem to reliably generate alerts for all added torrents.
|
||||
// To make sure that the program does not keep waiting for already finished
|
||||
// To make sure that the program does not keep waiting for already finished
|
||||
// downsloads, we go through the whole list of torrents when polling.
|
||||
// However, in theory, the commented code below should be more efficient:
|
||||
/*
|
||||
|
||||
@@ -97,7 +97,7 @@ public:
|
||||
TorrentProgressCallback cb);
|
||||
|
||||
void removeTorrent(TorrentId id);
|
||||
|
||||
|
||||
private:
|
||||
struct Torrent {
|
||||
TorrentId id;
|
||||
|
||||
Reference in New Issue
Block a user