From 11ee20f2fcc8b016b86ec9fdbe0985895e01d06a Mon Sep 17 00:00:00 2001 From: xjbeta Date: Fri, 24 May 2024 13:25:59 +0800 Subject: [PATCH 1/4] other login url --- IINA+/Views/Preferences/BilibiliLoginViewController.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/IINA+/Views/Preferences/BilibiliLoginViewController.swift b/IINA+/Views/Preferences/BilibiliLoginViewController.swift index f0cc49b6..ec86fd1f 100644 --- a/IINA+/Views/Preferences/BilibiliLoginViewController.swift +++ b/IINA+/Views/Preferences/BilibiliLoginViewController.swift @@ -55,6 +55,7 @@ class BilibiliLoginViewController: NSViewController { func loadWebView() { tabView.selectTabViewItem(at: 0) + // https://passport.bilibili.com/ajax/miniLogin/minilogin let url = URL(string: "https://passport.bilibili.com/login") let script = """ document.getElementsByClassName("v-navbar__back")[0].remove(); From ee5254155a57f2b91d6e22feb2a079e26570311b Mon Sep 17 00:00:00 2001 From: xjbeta Date: Sun, 26 May 2024 13:48:01 +0800 Subject: [PATCH 2/4] fix bililive event #223 --- IINA+/Utils/VideoDecoder/BiliLive.swift | 47 +++++++++++++++++++------ 1 file changed, 36 insertions(+), 11 deletions(-) diff --git a/IINA+/Utils/VideoDecoder/BiliLive.swift b/IINA+/Utils/VideoDecoder/BiliLive.swift index f4f02a3d..11740c4f 100644 --- a/IINA+/Utils/VideoDecoder/BiliLive.swift +++ b/IINA+/Utils/VideoDecoder/BiliLive.swift @@ -123,17 +123,26 @@ class BiliLive: NSObject, SupportSiteProtocol { guard let data = s.data(using: .utf8), let json: JSONObject = try? JSONParser.JSONObjectWithData(data) else { return [] } - let list: [BiliLiveRoomList] = try json.value(for: "live-non-revenue-player") - - re = list.first?.roomList.enumerated().map { - BiliLiveVideoSelector( - id: $0.element.roomId, - sid: "", - index: $0.offset, - title: $0.element.tabText, - url: "") - } ?? [] - return re + if let list: [BiliLiveRoomList] = try? json.value(for: "live-non-revenue-player") { + re = list.first?.roomList.enumerated().map { + BiliLiveVideoSelector( + id: $0.element.roomId, + sid: "", + index: $0.offset, + title: $0.element.tabText, + url: "") + } ?? [] + } else { + re = self.findAllRoomIds(s).enumerated().map { + BiliLiveVideoSelector( + id: $0.element, + sid: "", + index: $0.offset, + title: "", + url: "") + } + } + return re }.then { self.liveInfos($0.compactMap({ Int($0.id) })) }.map { @@ -172,6 +181,22 @@ class BiliLive: NSObject, SupportSiteProtocol { return AF.request(u).responseData().map({ $0.data }) } + + private func findAllRoomIds(_ str: String) -> [String] { + let key = #""roomId":""# + var re = [String]() + + var ss = str + while ss.contains(key) { + ss = ss.subString(from: key) + let rid = ss.subString(to: "\"") + if let _ = Int(rid) { + re.append(rid) + } + } + + return re + } } struct BiliLiveInfo: Unmarshaling, LiveInfo { From 143f4bf8cdd0c3672ec60e64b34358901b7a4141 Mon Sep 17 00:00:00 2001 From: xjbeta Date: Sun, 26 May 2024 13:50:14 +0800 Subject: [PATCH 3/4] Bump Version to 0.7.27. --- IINA+.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IINA+.xcodeproj/project.pbxproj b/IINA+.xcodeproj/project.pbxproj index 863064c2..70aff4f1 100644 --- a/IINA+.xcodeproj/project.pbxproj +++ b/IINA+.xcodeproj/project.pbxproj @@ -1037,7 +1037,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 0.7.26; + MARKETING_VERSION = 0.7.27; PRODUCT_BUNDLE_IDENTIFIER = "com.xjbeta.iina-plus"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1064,7 +1064,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 0.7.26; + MARKETING_VERSION = 0.7.27; PRODUCT_BUNDLE_IDENTIFIER = "com.xjbeta.iina-plus"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; From c55bdab3fc84df40badccbb28e23dc66d43eb604 Mon Sep 17 00:00:00 2001 From: xjbeta Date: Sun, 26 May 2024 13:53:46 +0800 Subject: [PATCH 4/4] fix separator --- IINA+/Views/Base.lproj/Main.storyboard | 46 +++++++++---------- .../Views/MainWindow/MainViewController.swift | 2 +- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/IINA+/Views/Base.lproj/Main.storyboard b/IINA+/Views/Base.lproj/Main.storyboard index b823bbf1..8166ec24 100644 --- a/IINA+/Views/Base.lproj/Main.storyboard +++ b/IINA+/Views/Base.lproj/Main.storyboard @@ -323,19 +323,19 @@ - + - + - + - + @@ -447,10 +447,10 @@ - + - + @@ -467,10 +467,10 @@ - + - + @@ -492,7 +492,7 @@ - + @@ -516,7 +516,7 @@ - + @@ -527,7 +527,7 @@ - + @@ -538,7 +538,7 @@ - + @@ -591,7 +591,7 @@ - + @@ -643,7 +643,7 @@ - + @@ -686,7 +686,7 @@ - + @@ -763,7 +763,7 @@ - + @@ -774,7 +774,7 @@ - + @@ -788,7 +788,7 @@ - + @@ -815,7 +815,7 @@ - + @@ -912,7 +912,7 @@ - + @@ -955,7 +955,7 @@ - + @@ -989,7 +989,7 @@ - + @@ -1222,7 +1222,7 @@ Gw - + diff --git a/IINA+/Views/MainWindow/MainViewController.swift b/IINA+/Views/MainWindow/MainViewController.swift index 02750504..dd0d81fc 100644 --- a/IINA+/Views/MainWindow/MainViewController.swift +++ b/IINA+/Views/MainWindow/MainViewController.swift @@ -944,7 +944,7 @@ extension MainViewController: NSTableViewDelegate, NSTableViewDataSource { case .unsupported: return 23 default: - return 55 + return 57 } case bilibiliTableView: return tableView.rowHeight