Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix&feat: Fixed new video cover old video issue when download video w… #275

Merged
merged 1 commit into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions DarockBili.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CODE_SIGN_ENTITLEMENTS = "MeowBili/MeowBili Vision App.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 817;
CURRENT_PROJECT_VERSION = 833;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -1496,7 +1496,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CODE_SIGN_ENTITLEMENTS = "MeowBili/MeowBili Vision App.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 817;
CURRENT_PROJECT_VERSION = 833;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -1533,7 +1533,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = MeowBili/MeowBili.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 817;
CURRENT_PROJECT_VERSION = 833;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -1580,7 +1580,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = MeowBili/MeowBili.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 817;
CURRENT_PROJECT_VERSION = 833;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -1624,7 +1624,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIconWatch;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 817;
CURRENT_PROJECT_VERSION = 833;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview\\ Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -1660,7 +1660,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIconWatch;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 817;
CURRENT_PROJECT_VERSION = 833;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview\\ Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -1699,7 +1699,7 @@
CODE_SIGN_ENTITLEMENTS = "MeowBili/MeowBili Mac App.entitlements";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 817;
CURRENT_PROJECT_VERSION = 833;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down Expand Up @@ -1732,7 +1732,7 @@
CODE_SIGN_ENTITLEMENTS = "MeowBili/MeowBili Mac App.entitlements";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 817;
CURRENT_PROJECT_VERSION = 833;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down Expand Up @@ -1761,7 +1761,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 817;
CURRENT_PROJECT_VERSION = 833;
DEVELOPMENT_TEAM = B57D8PP775;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
Expand All @@ -1784,7 +1784,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 817;
CURRENT_PROJECT_VERSION = 833;
DEVELOPMENT_TEAM = B57D8PP775;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
Expand Down
61 changes: 58 additions & 3 deletions Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,6 @@
}
}
}
},
"%@ Channel" : {

},
"%@ 人在看" : {
"localizations" : {
Expand Down Expand Up @@ -7951,6 +7948,12 @@
}
}
}
},
"上一小时" : {

},
"下一步" : {

},
"二维码名片" : {
"localizations" : {
Expand Down Expand Up @@ -7983,6 +7986,9 @@
}
}
}
},
"今天" : {

},
"从关注列表中移除" : {

Expand All @@ -8008,6 +8014,9 @@
}
}
}
},
"使用恢复密钥" : {

},
"允许收集使用信息" : {

Expand Down Expand Up @@ -8043,6 +8052,9 @@
}
}
}
},
"分析与改进" : {

},
"动态" : {
"localizations" : {
Expand Down Expand Up @@ -8363,6 +8375,9 @@
},
"完成" : {

},
"密码" : {

},
"将作为动态主体" : {
"localizations" : {
Expand Down Expand Up @@ -8517,6 +8532,9 @@
}
}
}
},
"恢复密钥" : {

},
"您可以更改默认的小尾巴内容, 如果不想添加小尾巴, 请清空上方文本框内容. 您可以随时在设置中更改此内容" : {
"localizations" : {
Expand Down Expand Up @@ -8561,6 +8579,9 @@
}
}
}
},
"所有历史记录" : {

},
"手记建议" : {
"localizations" : {
Expand Down Expand Up @@ -8599,6 +8620,22 @@
},
"搜索" : {

},
"文件保险箱" : {

},
"文件保险箱已启用" : {

},
"文件保险箱通过对喵哩喵哩进行加密来保护 App 内的数据。\n\n警告:你将需要密码或恢复密钥才能访问数据。在此设置过程中,会自动生成恢复密钥。如果同时忘记了密码和恢复密钥,数据将会丢失。\n\n已%@喵哩喵哩的文件保险箱。%@" : {
"localizations" : {
"zh-Hans" : {
"stringUnit" : {
"state" : "new",
"value" : "文件保险箱通过对喵哩喵哩进行加密来保护 App 内的数据。\n\n警告:你将需要密码或恢复密钥才能访问数据。在此设置过程中,会自动生成恢复密钥。如果同时忘记了密码和恢复密钥,数据将会丢失。\n\n已%1$@喵哩喵哩的文件保险箱。%2$@"
}
}
}
},
"文本加载失败" : {
"localizations" : {
Expand All @@ -8618,6 +8655,9 @@
},
"新建反馈" : {

},
"昨天和今天" : {

},
"显示底部弹幕" : {
"localizations" : {
Expand Down Expand Up @@ -8770,6 +8810,12 @@
}
}
}
},
"正在加密..." : {

},
"清除历史记录" : {

},
"清除所有已观看视频" : {
"localizations" : {
Expand All @@ -8792,6 +8838,9 @@
}
}
}
},
"清除时间段" : {

},
"状态" : {

Expand Down Expand Up @@ -9003,6 +9052,9 @@
}
}
}
},
"请将恢复密钥保存到安全的位置" : {

},
"超大" : {
"localizations" : {
Expand Down Expand Up @@ -9035,6 +9087,9 @@
}
}
}
},
"输入错误" : {

},
"选择图片" : {
"localizations" : {
Expand Down
8 changes: 1 addition & 7 deletions MeowBili/InMain/MainView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ struct MainView: View {
@State var userList3: [Any] = []
@State var userList4: [Any] = []
@State var isNewUserPresenting = false
#if os(watchOS)
@State var isSearchPresented = false
#endif
var body: some View {
#if !os(watchOS)
MainViewMain()
Expand All @@ -58,14 +55,11 @@ struct MainView: View {
if #available(watchOS 10, *) {
MainViewMain()
.navigationBarTitleDisplayMode(.large)
.sheet(isPresented: $isSearchPresented, content: { SearchMainView() })
.sheet(isPresented: $isNetworkFixPresented, content: { NetworkFixView() })
.sheet(isPresented: $isLoginPresented, content: { LoginView() })
.toolbar {
ToolbarItem(placement: .topBarLeading) {
Button(action: {
isSearchPresented = true
}, label: {
NavigationLink(destination: { SearchMainView() }, label: {
Image(systemName: "magnifyingglass")
.foregroundColor(.accentColor)
})
Expand Down
6 changes: 4 additions & 2 deletions MeowBili/InMain/SearchView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
var body: some View {
List {
Section {
VStack {
ZStack {
NavigationLink("", destination: SearchView(keyword: searchText), isActive: $isSearchPresented)

Check notice on line 47 in MeowBili/InMain/SearchView.swift

View check run for this annotation

Xcode Cloud / DarockBili | Analysis | Build - iOS

MeowBili/InMain/SearchView.swift#L47

'init(_:destination:isActive:)' was deprecated in iOS 16.0: use NavigationLink(value:label:), or navigationDestination(isPresented:destination:), inside a NavigationStack or NavigationSplitView

Check notice on line 47 in MeowBili/InMain/SearchView.swift

View check run for this annotation

Xcode Cloud / DarockBili | Analysis | Build - iOS

MeowBili/InMain/SearchView.swift#L47

'init(_:destination:isActive:)' was deprecated in watchOS 9.0: use NavigationLink(value:label:), or navigationDestination(isPresented:destination:), inside a NavigationStack or NavigationSplitView
.frame(width: 0, height: 0)
.hidden()
.disabled(true)
TextField("Search.\(Image(systemName: "magnifyingglass"))", text: $searchText)
.submitLabel(.search)
#if !os(watchOS)
Expand Down Expand Up @@ -186,7 +186,7 @@
.clipShape(Circle())
#endif
VStack {
NavigationLink("", isActive: $isUserDetailPresented[i], destination: { UserDetailView(uid: users[i]["ID"]! as! String) })

Check notice on line 189 in MeowBili/InMain/SearchView.swift

View check run for this annotation

Xcode Cloud / DarockBili | Analysis | Build - iOS

MeowBili/InMain/SearchView.swift#L189

'init(_:isActive:destination:)' was deprecated in iOS 16.0: use NavigationLink(value:label:), or navigationDestination(isPresented:destination:), inside a NavigationStack or NavigationSplitView

Check notice on line 189 in MeowBili/InMain/SearchView.swift

View check run for this annotation

Xcode Cloud / DarockBili | Analysis | Build - iOS

MeowBili/InMain/SearchView.swift#L189

'init(_:isActive:destination:)' was deprecated in watchOS 9.0: use NavigationLink(value:label:), or navigationDestination(isPresented:destination:), inside a NavigationStack or NavigationSplitView
.frame(width: 0, height: 0)
HStack {
Text(users[i]["Name"]! as! String)
Expand Down Expand Up @@ -286,7 +286,9 @@
}
}
}
#if !os(watchOS)
.padding(.horizontal)
#endif
if videos.isEmpty && users.isEmpty && articles.isEmpty && bangumis.isEmpty && liverooms.isEmpty && !isNoResult {
ProgressView()
}
Expand Down
43 changes: 41 additions & 2 deletions MeowBili/MeowBiliApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,54 @@ struct DarockBili_Watch_AppApp: App {
// Handoff
@State var handoffVideoDetails = [String: String]()
@State var shouldPushVideoView = false
// FileLocker
@State var fileLockerPwd = UserDefaults.standard.string(forKey: "FileLockerPassword") ?? ""
@State var fileLockerRecoverCode = UserDefaults.standard.string(forKey: "FileLockerRecoverCode") ?? ""
@State var fileLockerRetryCount = 0
@State var fileLockerInput = ""
@State var recoveryCodeInput = ""
#if os(watchOS)
@State var isMemoryWarningPresented = false
#else
@State var shouldShowAppName = false
#endif
var body: some SwiftUI.Scene {
WindowGroup {
if UserDefaults.standard.string(forKey: "NewSignalError") ?? "" != "" {
SignalErrorView()
if fileLockerPwd != "" {
List {
Section {
Text(fileLockerRetryCount == 0 ? "文件保险箱已启用" : "输入错误")
.font(.title3)
.bold()
.listRowBackground(Color.clear)
}
Section {
TextField("密码", text: $fileLockerInput)
.submitLabel(.continue)
.onSubmit {
if fileLockerInput == fileLockerPwd {
fileLockerPwd = ""
} else {
fileLockerInput = ""
fileLockerRetryCount++
}
}
}
if fileLockerRetryCount >= 3 {
Section {
TextField("使用恢复密钥", text: $recoveryCodeInput)
.submitLabel(.continue)
.onSubmit {
if recoveryCodeInput == fileLockerRecoverCode {
fileLockerPwd = ""
} else {
recoveryCodeInput = ""
fileLockerRetryCount++
}
}
}
}
}
} else {
ZStack {
#if !os(visionOS)
Expand Down
Loading