Skip to content

Commit 073b1e3

Browse files
committed
Switch payload_upload_rate to Double
1 parent 2a7d373 commit 073b1e3

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

Deluge Remote.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@
608608
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
609609
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
610610
LIBRARY_SEARCH_PATHS = "";
611-
MARKETING_VERSION = 1.3.3;
611+
MARKETING_VERSION = 1.3.3.1;
612612
PRODUCT_BUNDLE_IDENTIFIER = "io.rudybermudez.Deluge-Remote";
613613
PRODUCT_NAME = "$(TARGET_NAME)";
614614
SUPPORTS_MACCATALYST = NO;
@@ -634,7 +634,7 @@
634634
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
635635
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
636636
LIBRARY_SEARCH_PATHS = "";
637-
MARKETING_VERSION = 1.3.3;
637+
MARKETING_VERSION = 1.3.3.1;
638638
PRODUCT_BUNDLE_IDENTIFIER = "io.rudybermudez.Deluge-Remote";
639639
PRODUCT_NAME = "$(TARGET_NAME)";
640640
SUPPORTS_MACCATALYST = NO;

Deluge Remote/Sources/Extensions/Int.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,14 @@ extension Int {
1717
return ByteCountFormatter.string(fromByteCount: Int64(self), countStyle: ByteCountFormatter.CountStyle.memory)
1818
}
1919
}
20+
21+
extension Double
22+
{
23+
func transferRateString() -> String {
24+
return sizeString() + "/s"
25+
}
26+
27+
func sizeString() -> String {
28+
return ByteCountFormatter.string(fromByteCount: Int64(self), countStyle: ByteCountFormatter.CountStyle.memory)
29+
}
30+
}

Deluge Remote/Sources/Models/Deluge/SessionStatus.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct SessionStatus: Decodable {
3030
let upload_rate: Double
3131

3232
/// payload_upload_rate is the rate of the payload down- and upload only.
33-
let payload_upload_rate: Int
33+
let payload_upload_rate: Double
3434

3535
/// num_peers is the total number of peer connections this session has.
3636
/// This includes incoming connections that still hasn't sent their handshake or
@@ -89,7 +89,7 @@ struct SessionStatus: Decodable {
8989
let allowed_upload_slots: Int
9090

9191
/// payload_download_rate is the rate of the payload down- and upload only.
92-
let payload_download_rate: Int
92+
let payload_download_rate: Double
9393

9494
let total_download: Int
9595

0 commit comments

Comments
 (0)