diff --git a/DarockBili.xcodeproj/project.pbxproj b/DarockBili.xcodeproj/project.pbxproj index 525a90999..0527b947c 100644 --- a/DarockBili.xcodeproj/project.pbxproj +++ b/DarockBili.xcodeproj/project.pbxproj @@ -1214,7 +1214,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1261; + CURRENT_PROJECT_VERSION = 1262; DEVELOPMENT_TEAM = B57D8PP775; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = SafariExtension/Info.plist; @@ -1245,7 +1245,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1261; + CURRENT_PROJECT_VERSION = 1262; DEVELOPMENT_TEAM = B57D8PP775; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = SafariExtension/Info.plist; @@ -1342,7 +1342,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = MeowBili/MeowBiliAlternative.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1261; + CURRENT_PROJECT_VERSION = 1262; DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\""; DEVELOPMENT_TEAM = B38QUJMY47; ENABLE_PREVIEWS = YES; @@ -1387,7 +1387,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIconWatch; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1261; + CURRENT_PROJECT_VERSION = 1262; DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview\\ Content\""; DEVELOPMENT_TEAM = B38QUJMY47; ENABLE_PREVIEWS = YES; @@ -1423,7 +1423,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1261; + CURRENT_PROJECT_VERSION = 1262; DEVELOPMENT_TEAM = B57D8PP775; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 16.0; @@ -1447,7 +1447,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1261; + CURRENT_PROJECT_VERSION = 1262; DEVELOPMENT_TEAM = B38QUJMY47; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = SafariExtension/Info.plist; @@ -1515,7 +1515,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = MeowBili/MeowBili.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1261; + CURRENT_PROJECT_VERSION = 1262; DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\""; DEVELOPMENT_TEAM = B57D8PP775; ENABLE_PREVIEWS = YES; @@ -1562,7 +1562,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = MeowBili/MeowBili.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1261; + CURRENT_PROJECT_VERSION = 1262; DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\""; DEVELOPMENT_TEAM = B57D8PP775; ENABLE_PREVIEWS = YES; @@ -1607,7 +1607,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIconWatch; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1261; + CURRENT_PROJECT_VERSION = 1262; DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview\\ Content\""; DEVELOPMENT_TEAM = B57D8PP775; ENABLE_PREVIEWS = YES; @@ -1643,7 +1643,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIconWatch; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1261; + CURRENT_PROJECT_VERSION = 1262; DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview\\ Content\""; DEVELOPMENT_TEAM = B57D8PP775; ENABLE_PREVIEWS = YES; @@ -1679,7 +1679,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1261; + CURRENT_PROJECT_VERSION = 1262; DEVELOPMENT_TEAM = B57D8PP775; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 16.0; @@ -1702,7 +1702,7 @@ isa = XCBuildConfiguration; buildSettings = { CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1261; + CURRENT_PROJECT_VERSION = 1262; DEVELOPMENT_TEAM = B57D8PP775; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 16.0; diff --git a/DarockBili.xcodeproj/xcshareddata/xcschemes/MeowBili Watch App.xcscheme b/DarockBili.xcodeproj/xcshareddata/xcschemes/MeowBili Watch App.xcscheme index b0ddc571d..2be1ee1d0 100644 --- a/DarockBili.xcodeproj/xcshareddata/xcschemes/MeowBili Watch App.xcscheme +++ b/DarockBili.xcodeproj/xcshareddata/xcschemes/MeowBili Watch App.xcscheme @@ -90,12 +90,14 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "zh-Hans" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" debugServiceExtension = "internal" - allowLocationSimulation = "YES"> + allowLocationSimulation = "YES" + notificationPayloadFile = "PushNotificationPayload.apns"> ")[1].split(separator: "")[0] - let danmakuSpd = danmakuOnly.split(separator: "") - for singleDanmaku in danmakuSpd { - let p = singleDanmaku.split(separator: "").count < 2 { - return - } - let danmakuText = String(singleDanmaku.split(separator: "\">")[1].split(separator: "")[0]) - if stredSpdP[5] == "0" { - showDanmakus.append(["Appear": stredSpdP[0], "Type": stredSpdP[1], "Size": stredSpdP[2], "Color": stredSpdP[3], "Text": danmakuText]) - } - } - showDanmakus.sort { dict1, dict2 in - if let time1 = dict1["Appear"], let time2 = dict2["Appear"] { - return Double(time1)! < Double(time2)! - } - return false - } - var removedCount = 0 - for i in 1..")[1].split(separator: "")[0] + let danmakuSpd = danmakuOnly.split(separator: "") + for singleDanmaku in danmakuSpd { + let p = singleDanmaku.split(separator: "").count < 2 { + return + } + let danmakuText = String(singleDanmaku.split(separator: "\">")[1].split(separator: "")[0]) + if stredSpdP[5] == "0" { + showDanmakus.append(["Appear": stredSpdP[0], "Type": stredSpdP[1], "Size": stredSpdP[2], "Color": stredSpdP[3], "Text": danmakuText]) + } } - if (Double(showDanmakus[i]["Appear"]!)! - Double(showDanmakus[i - 1]["Appear"]!)!) < 1 { - showDanmakus.remove(at: i) - removedCount++ + showDanmakus.sort { dict1, dict2 in + if let time1 = dict1["Appear"], let time2 = dict2["Appear"] { + return Double(time1)! < Double(time2)! + } + return false } - } - removedCount = 0 - var previousTopDanmakuIndex: Int? - var previousBottomDanmakuIndex: Int? - for i in 1.. UnsafeMutablePointer in if type == "5" { &&previousTopDanmakuIndex } else { &&previousBottomDanmakuIndex } }().pointee = i } - { () -> UnsafeMutablePointer in if type == "5" { &&previousTopDanmakuIndex } else { &&previousBottomDanmakuIndex } }().pointee = i } - } - #if !os(watchOS) - if showDanmakus.count > 500 { - for _ in 1...5000 { - if showDanmakus.count <= 500 { - break +#if !os(watchOS) + if showDanmakus.count > 500 { + for _ in 1...5000 { + if showDanmakus.count <= 500 { + break + } + showDanmakus.remove(at: Int.random(in: 0.. 200 { - for _ in 1...5000 { - if showDanmakus.count <= 200 { - break +#else + // Less danmakus for watch + if showDanmakus.count > 200 { + for _ in 1...5000 { + if showDanmakus.count <= 200 { + break + } + showDanmakus.remove(at: Int.random(in: 0..