feat: 接入景区空境库真实素材并统一交付入口
接通场次详情、分页、视频时长与大小,修复日期筛选越界并增加脱敏日志。统一订单与素材库交付方式弹窗,保留任务预选和上传批次,补充模拟器回归测试与接口记录。
This commit is contained in:
@@ -62,11 +62,11 @@ struct ScenicMaterialClip: Hashable, Sendable {
|
||||
let groupID: String
|
||||
/// 组内从 1 开始的片段序号。
|
||||
let ordinal: Int
|
||||
/// 原片段展示时长;本地播放器使用独立演示视频。
|
||||
/// 原片段时长,单位为秒;-1 表示接口没有有效数值。
|
||||
let durationSeconds: Int
|
||||
/// 原片段展示大小,单位为字节。
|
||||
let fileSizeBytes: Int64
|
||||
/// 原片段分辨率展示值。
|
||||
/// 保留原片段分辨率元数据,页面不展示。
|
||||
let resolution: String
|
||||
/// 本地演示封面资源名。
|
||||
let coverAssetName: String
|
||||
@@ -99,11 +99,14 @@ struct ScenicMaterialClip: Hashable, Sendable {
|
||||
self.isRemote = isRemote
|
||||
}
|
||||
|
||||
/// 用于封面与预览信息的分秒时长。
|
||||
/// 用于封面与预览信息的时长;超过一小时显示时分秒,保留后端秒数语义。
|
||||
var durationText: String {
|
||||
guard durationSeconds >= 0 else { return "时长未知" }
|
||||
let value = max(durationSeconds, 0)
|
||||
return String(format: "%02d:%02d", value / 60, value % 60)
|
||||
if value >= 3_600 {
|
||||
return String(format: "%02lld:%02lld:%02lld", Int64(value / 3_600), Int64(value / 60 % 60), Int64(value % 60))
|
||||
}
|
||||
return String(format: "%02lld:%02lld", Int64(value / 60), Int64(value % 60))
|
||||
}
|
||||
|
||||
/// 使用十进制 MB 展示片段大小,避免将原文件与本地示例文件混淆。
|
||||
|
||||
Reference in New Issue
Block a user