@@ -110,6 +110,8 @@ struct StreamStats: Codable, Sendable {
110 self.size = s
110 self.size = s
111 } else if let n = try? container.decode(Int.self, forKey: .size) {
111 } else if let n = try? container.decode(Int.self, forKey: .size) {
112 self.size = ByteCountFormatter.string(fromByteCount: Int64(n), countStyle: .file)
112 self.size = ByteCountFormatter.string(fromByteCount: Int64(n), countStyle: .file)
113+ } else if let d = try? container.decode(Double.self, forKey: .size) {
114+ self.size = ByteCountFormatter.string(fromByteCount: Int64(d), countStyle: .file)
114 self.size = nil
116 self.size = nil
@@ -117,6 +119,8 @@ struct StreamStats: Codable, Sendable {
117 self.lifetime_size = s
119 self.lifetime_size = s
118 } else if let n = try? container.decode(Int.self, forKey: .lifetime_size) {
120 } else if let n = try? container.decode(Int.self, forKey: .lifetime_size) {
119 self.lifetime_size = ByteCountFormatter.string(fromByteCount: Int64(n), countStyle: .file)
121 self.lifetime_size = ByteCountFormatter.string(fromByteCount: Int64(n), countStyle: .file)
122+ } else if let d = try? container.decode(Double.self, forKey: .lifetime_size) {
123+ self.lifetime_size = ByteCountFormatter.string(fromByteCount: Int64(d), countStyle: .file)
121 self.lifetime_size = nil
125 self.lifetime_size = nil
@@ -139,6 +143,8 @@ struct StreamStats: Codable, Sendable {
139 self.size = s
143 self.size = s
140 } else if let n = try? container.decode(Int.self, forKey: .size) {
144 } else if let n = try? container.decode(Int.self, forKey: .size) {
141 self.size = ByteCountFormatter.string(fromByteCount: Int64(n), countStyle: .file)
145 self.size = ByteCountFormatter.string(fromByteCount: Int64(n), countStyle: .file)
146+ } else if let d = try? container.decode(Double.self, forKey: .size) {
147+ self.size = ByteCountFormatter.string(fromByteCount: Int64(d), countStyle: .file)
143 self.size = nil
149 self.size = nil
@@ -146,6 +152,8 @@ struct StreamStats: Codable, Sendable {
146 self.lifetime_size = s
152 self.lifetime_size = s
147 } else if let n = try? container.decode(Int.self, forKey: .lifetime_size) {
153 } else if let n = try? container.decode(Int.self, forKey: .lifetime_size) {
148 self.lifetime_size = ByteCountFormatter.string(fromByteCount: Int64(n), countStyle: .file)
154 self.lifetime_size = ByteCountFormatter.string(fromByteCount: Int64(n), countStyle: .file)
155+ } else if let d = try? container.decode(Double.self, forKey: .lifetime_size) {
156+ self.lifetime_size = ByteCountFormatter.string(fromByteCount: Int64(d), countStyle: .file)
150 self.lifetime_size = nil
158 self.lifetime_size = nil