Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
xjbeta committed Jul 17, 2023
2 parents 910fed2 + 864ba1e commit 706e409
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 19 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
mkdir Sparkle
tar -xf Sparkle*.tar.xz -C Sparkle
- uses: apple-actions/import-codesign-certs@v1
- uses: apple-actions/import-codesign-certs@v2
with:
p12-file-base64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
p12-password: ${{ secrets.P12_PASSWORD }}
Expand All @@ -44,8 +44,18 @@ jobs:
- name: Prepare create-dmg
run: npm install --global create-dmg

- name: Prepare Dependencies
run: bash InstallDeps.sh
- name: Prepare WebFiles Dependencies
run: |
cd IINA+/WebFiles/
npm install
- name: Download Plugin
uses: robinraju/release-downloader@v1.8
with:
repository: 'xjbeta/iina-plugin-danmaku'
tag: "0.1.7"
fileName: "iina-plugin-danmaku.iinaplgz"
out-file-path: "IINA+"

- name: SPM
run: xcodebuild -resolvePackageDependencies
Expand Down
4 changes: 2 additions & 2 deletions IINA+.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 0.7.0;
MARKETING_VERSION = 0.7.1;
PRODUCT_BUNDLE_IDENTIFIER = "com.xjbeta.iina-plus";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -1018,7 +1018,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.14;
MARKETING_VERSION = 0.7.0;
MARKETING_VERSION = 0.7.1;
PRODUCT_BUNDLE_IDENTIFIER = "com.xjbeta.iina-plus";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
7 changes: 6 additions & 1 deletion IINA+/Utils/IINAApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,13 @@ class IINAApp: NSObject {

func pluginFolder() throws -> String {
// /Users/xxx/Library/Application Support/com.colliderli.iina/plugins
let url = try FileManager.default.url(for: .applicationSupportDirectory, in: .userDomainMask, appropriateFor: nil, create: false)
let fm = FileManager.default
let url = try fm.url(for: .applicationSupportDirectory, in: .userDomainMask, appropriateFor: nil, create: false)
let path = url.path + "/com.colliderli.iina/plugins/"

if !fm.fileExists(atPath: path) {
try fm.createDirectory(atPath: path, withIntermediateDirectories: true)
}
return path
}

Expand Down
6 changes: 4 additions & 2 deletions IINA+/Utils/VideoDecoder/Huya.swift
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,10 @@ struct HuyaInfoM: Unmarshaling, LiveInfo {
let bitRateInfos: [BitRateInfo] = try object.value(for: "roomInfo.tLiveInfo.tLiveStreamInfo.vBitRateInfo.value")

let urls = streamInfos.sorted { i1, i2 -> Bool in
i1.sCdnType == defaultCDN
}.compactMap {
i1.sCdnType == defaultCDN
}.sorted { i1, i2 -> Bool in
!i1.sFlvUrl.contains("txdirect.flv.huya.com")
}.compactMap {
$0.url
}

Expand Down
25 changes: 15 additions & 10 deletions IINA+/Views/Preferences/GereralViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,21 @@ class GereralViewController: NSViewController, NSMenuDelegate {
}

override func prepare(for segue: NSStoryboardSegue, sender: Any?) {
guard let vc = segue.destinationController as? FontSelectorViewController else { return }
checkFontWeight()

let name = pref.danmukuFontFamilyName
vc.delegate = self
vc.families = NSFontManager.shared.availableFontFamilies
vc.family = name
vc.styles = fontWeights(ofFontFamily: name)
vc.style = pref.danmukuFontWeight
vc.size = pref.danmukuFontSize
if let vc = segue.destinationController as? FontSelectorViewController {
checkFontWeight()

let name = pref.danmukuFontFamilyName
vc.delegate = self
vc.families = NSFontManager.shared.availableFontFamilies
vc.family = name
vc.styles = fontWeights(ofFontFamily: name)
vc.style = pref.danmukuFontWeight
vc.size = pref.danmukuFontSize
} else if let vc = segue.destinationController as? PluginViewController {
vc.updatePlugin = {
self.initPluginInfo()
}
}
}

func fontWeights(ofFontFamily name: String) -> [String] {
Expand Down
4 changes: 3 additions & 1 deletion IINA+/Views/Preferences/PluginViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ class PluginViewController: NSViewController {
} catch let error {
Log(error)
}

initStates()
updatePlugin?()
}

@IBOutlet weak var enableDanmakuState: NSButton!
Expand All @@ -41,7 +43,7 @@ class PluginViewController: NSViewController {

@IBOutlet weak var tapsTextField: NSTextField!


var updatePlugin: (() -> Void)?
let iina = Processes.shared.iina

enum PlistKeys: String {
Expand Down

0 comments on commit 706e409

Please sign in to comment.