Skip to content

Commit

Permalink
Hotfix of zero speed limit
Browse files Browse the repository at this point in the history
  • Loading branch information
XITRIX committed Mar 19, 2020
1 parent 398e6da commit 349e41a
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 11 deletions.
8 changes: 4 additions & 4 deletions iTorrent.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 15.0;
CURRENT_PROJECT_VERSION = 16.0;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = D5UQ7XT49T;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -885,7 +885,7 @@
"$(inherited)",
"$(PROJECT_DIR)",
);
MARKETING_VERSION = 1.7.4;
MARKETING_VERSION = 1.7.4.1;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "$(inherited)";
Expand Down Expand Up @@ -914,7 +914,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 15.0;
CURRENT_PROJECT_VERSION = 16.0;
DEVELOPMENT_TEAM = D5UQ7XT49T;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -941,7 +941,7 @@
"$(inherited)",
"$(PROJECT_DIR)",
);
MARKETING_VERSION = 1.7.4;
MARKETING_VERSION = 1.7.4.1;
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = ru.nonamedude.iTorrent;
Expand Down
7 changes: 5 additions & 2 deletions iTorrent/System/BackgroundTask.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class BackgroundTask {
}

static func getBackgroundConditions(_ status: TorrentStatus) -> Bool {
// state conditions
(status.displayState == Utils.TorrentStates.downloading.rawValue ||
status.displayState == Utils.TorrentStates.metadata.rawValue ||
status.displayState == Utils.TorrentStates.hashing.rawValue ||
Expand All @@ -73,7 +74,9 @@ class BackgroundTask {
status.seedMode) ||
(UserPreferences.ftpKey.value &&
UserPreferences.ftpBackgroundKey.value)) &&
(UserPreferences.zeroSpeedLimit.value > 0 &&
Manager.managerSaves[status.hash]?.zeroSpeedTimeCounter ?? 0 < UserPreferences.zeroSpeedLimit.value)
// zero speed limit conditions
((UserPreferences.zeroSpeedLimit.value > 0 &&
Manager.managerSaves[status.hash]?.zeroSpeedTimeCounter ?? 0 < UserPreferences.zeroSpeedLimit.value) ||
UserPreferences.zeroSpeedLimit.value == 0)
}
}
2 changes: 1 addition & 1 deletion iTorrent/Utils/TorrentStatus.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class TorrentStatus {
}

if manager.zeroSpeedTimeCounter == UserPreferences.zeroSpeedLimit.value,
manager.zeroSpeedTimeCounter != 0 {
UserPreferences.zeroSpeedLimit.value != 0 {
NotificationHelper.showNotification(
title: Localize.get("BackgroundTask.LowSpeed.Title") + "(\(Utils.getSizeText(size: Int64(downloadRate)))/s)",
body: title + Localize.get("BackgroundTask.LowSpeed.Message"),
Expand Down
2 changes: 1 addition & 1 deletion iTorrent/Version.ver
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.4
1.7.4(Hotfix)
2 changes: 1 addition & 1 deletion iTorrent/ViewControllers/TorrentFilesController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ class TorrentFilesController: ThemedUIViewController {
tableViewEditMode = false

navigationItem.setLeftBarButton(nil, animated: true)
navigationItem.rightBarButtonItem?.title = NSLocalizedString("Select", comment: "")
navigationItem.rightBarButtonItem?.title = Localize.get("TorrentFilesController.Select")
navigationItem.rightBarButtonItem?.style = .plain

setToolbarItems(defaultToolBarItems, animated: true)
Expand Down
2 changes: 1 addition & 1 deletion iTorrent/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,4 @@

//Version Info
"info" = " Update info";
"UpdateText" = "- Added https protocol support for trackers!\n- FTP server replaced by WebDAV, file sharing is now possible through a web browser\n- Added background stop when downloading at zero speed\n- Clicking on a notification now opens a specific window\n- UI improvements";
"UpdateText" = "- Zero speed limit disable state fixed\n----- 1.7.4 -----\n- Added https protocol support for trackers!\n- FTP server replaced by WebDAV, file sharing is now possible through a web browser\n- Added background stop when downloading at zero speed\n- Clicking on a notification now opens a specific window\n- UI improvements";
2 changes: 1 addition & 1 deletion iTorrent/ru.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,4 @@

//Version Info
"info" = " Изменения";
"UpdateText" = "- Добавлена поддержка протокола https для трекеров!\n- FTP сервер был заменён на WebDAV, теперь обмен файлами возможен через браузер\n- Добавлена остановка фонового режима при скачивании с нулевой скоростью\n- Нажатие на оповещение теперь открывает конкретное окно\n- Улучшения в интерфейсе";
"UpdateText" = "- Исправлено отключение лимита нулевой скорости\n----- 1.7.4 -----\n- Добавлена поддержка протокола https для трекеров!\n- FTP сервер был заменён на WebDAV, теперь обмен файлами возможен через браузер\n- Добавлена остановка фонового режима при скачивании с нулевой скоростью\n- Нажатие на оповещение теперь открывает конкретное окно\n- Улучшения в интерфейсе";

0 comments on commit 349e41a

Please sign in to comment.