From 3542be7d8b24d2ab6daabc30e4538bc0899ca3a4 Mon Sep 17 00:00:00 2001 From: xjbeta Date: Thu, 6 Jun 2024 17:14:13 +0800 Subject: [PATCH 1/2] fix huya rid --- IINA+/Utils/VideoDecoder/Huya.swift | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/IINA+/Utils/VideoDecoder/Huya.swift b/IINA+/Utils/VideoDecoder/Huya.swift index 26f04dce..a33d22a0 100644 --- a/IINA+/Utils/VideoDecoder/Huya.swift +++ b/IINA+/Utils/VideoDecoder/Huya.swift @@ -141,7 +141,17 @@ class Huya: NSObject, SupportSiteProtocol { } let rid = ucs[2] - return pSession.request("https://mp.huya.com/cache.php?m=Live&do=profileRoom&roomid=\(rid)").responseData().map { + if let rid = Int(rid) { + return getHuyaInfoMP(rid) + } else { + return getHuyaInfo(url).then { + self.getHuyaInfoMP($0.rid) + } + } + } + + func getHuyaInfoMP(_ rid: Int) -> Promise { + pSession.request("https://mp.huya.com/cache.php?m=Live&do=profileRoom&roomid=\(rid)").responseData().map { let jsonObj: JSONObject = try JSONParser.JSONObjectWithData($0.data) return try HuyaInfoMP(object: jsonObj) } From b45547ba768989c10e63256341f14f21c72deb18 Mon Sep 17 00:00:00 2001 From: xjbeta Date: Thu, 6 Jun 2024 17:14:45 +0800 Subject: [PATCH 2/2] Bump Version to 0.7.30. --- 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 976c44d0..e655e6d4 100644 --- a/IINA+.xcodeproj/project.pbxproj +++ b/IINA+.xcodeproj/project.pbxproj @@ -1041,7 +1041,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 0.7.29; + MARKETING_VERSION = 0.7.30; PRODUCT_BUNDLE_IDENTIFIER = "com.xjbeta.iina-plus"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -1068,7 +1068,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 0.7.29; + MARKETING_VERSION = 0.7.30; PRODUCT_BUNDLE_IDENTIFIER = "com.xjbeta.iina-plus"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "";