mirror of
https://github.com/yattee/yattee.git
synced 2024-11-09 15:58:20 +00:00
fix duplicated share button
fixes #691 add `--initial-audio-sync=<yes|no>` to MPV settings. Might fix #690 but needs to be toggled by the user. We leave the standard settings. Also added links to the icons on macOS.
This commit is contained in:
parent
b966f4509a
commit
9e05909659
@ -72,6 +72,7 @@ final class MPVClient: ObservableObject {
|
|||||||
checkError(mpv_set_option_string(mpv, "sub-scale", Defaults[.captionsFontScaleSize]))
|
checkError(mpv_set_option_string(mpv, "sub-scale", Defaults[.captionsFontScaleSize]))
|
||||||
checkError(mpv_set_option_string(mpv, "sub-color", Defaults[.captionsFontColor]))
|
checkError(mpv_set_option_string(mpv, "sub-color", Defaults[.captionsFontColor]))
|
||||||
checkError(mpv_set_option_string(mpv, "user-agent", UserAgentManager.shared.userAgent))
|
checkError(mpv_set_option_string(mpv, "user-agent", UserAgentManager.shared.userAgent))
|
||||||
|
checkError(mpv_set_option_string(mpv, "initial-audio-sync", Defaults[.mpvInitialAudioSync] ? "yes" : "no"))
|
||||||
|
|
||||||
// GPU //
|
// GPU //
|
||||||
|
|
||||||
|
@ -270,6 +270,7 @@ extension Defaults.Keys {
|
|||||||
static let mpvDeinterlace = Key<Bool>("mpvDeinterlace", default: false)
|
static let mpvDeinterlace = Key<Bool>("mpvDeinterlace", default: false)
|
||||||
static let mpvHWdec = Key<String>("hwdec", default: "auto-safe")
|
static let mpvHWdec = Key<String>("hwdec", default: "auto-safe")
|
||||||
static let mpvDemuxerLavfProbeInfo = Key<String>("mpvDemuxerLavfProbeInfo", default: "no")
|
static let mpvDemuxerLavfProbeInfo = Key<String>("mpvDemuxerLavfProbeInfo", default: "no")
|
||||||
|
static let mpvInitialAudioSync = Key<Bool>("mpvInitialAudioSync", default: true)
|
||||||
|
|
||||||
static let showCacheStatus = Key<Bool>("showCacheStatus", default: false)
|
static let showCacheStatus = Key<Bool>("showCacheStatus", default: false)
|
||||||
static let feedCacheSize = Key<String>("feedCacheSize", default: "50")
|
static let feedCacheSize = Key<String>("feedCacheSize", default: "50")
|
||||||
|
@ -10,6 +10,7 @@ struct AdvancedSettings: View {
|
|||||||
@Default(.mpvEnableLogging) private var mpvEnableLogging
|
@Default(.mpvEnableLogging) private var mpvEnableLogging
|
||||||
@Default(.mpvHWdec) private var mpvHWdec
|
@Default(.mpvHWdec) private var mpvHWdec
|
||||||
@Default(.mpvDemuxerLavfProbeInfo) private var mpvDemuxerLavfProbeInfo
|
@Default(.mpvDemuxerLavfProbeInfo) private var mpvDemuxerLavfProbeInfo
|
||||||
|
@Default(.mpvInitialAudioSync) private var mpvInitialAudioSync
|
||||||
@Default(.showCacheStatus) private var showCacheStatus
|
@Default(.showCacheStatus) private var showCacheStatus
|
||||||
@Default(.feedCacheSize) private var feedCacheSize
|
@Default(.feedCacheSize) private var feedCacheSize
|
||||||
@Default(.showPlayNowInBackendContextMenu) private var showPlayNowInBackendContextMenu
|
@Default(.showPlayNowInBackendContextMenu) private var showPlayNowInBackendContextMenu
|
||||||
@ -83,6 +84,9 @@ struct AdvancedSettings: View {
|
|||||||
UIApplication.shared.open(URL(string: "https://mpv.io/manual/stable/#options-cache-pause-initial")!)
|
UIApplication.shared.open(URL(string: "https://mpv.io/manual/stable/#options-cache-pause-initial")!)
|
||||||
}
|
}
|
||||||
#elseif os(macOS)
|
#elseif os(macOS)
|
||||||
|
.onTapGesture {
|
||||||
|
NSWorkspace.shared.open(URL(string: "https://mpv.io/manual/stable/#options-cache-pause-initial")!)
|
||||||
|
}
|
||||||
.onHover(perform: onHover(_:))
|
.onHover(perform: onHover(_:))
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -100,6 +104,9 @@ struct AdvancedSettings: View {
|
|||||||
UIApplication.shared.open(URL(string: "https://mpv.io/manual/stable/#options-cache-secs")!)
|
UIApplication.shared.open(URL(string: "https://mpv.io/manual/stable/#options-cache-secs")!)
|
||||||
}
|
}
|
||||||
#elseif os(macOS)
|
#elseif os(macOS)
|
||||||
|
.onTapGesture {
|
||||||
|
NSWorkspace.shared.open(URL(string: "https://mpv.io/manual/stable/#options-cache-secs")!)
|
||||||
|
}
|
||||||
.onHover(perform: onHover(_:))
|
.onHover(perform: onHover(_:))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -123,6 +130,9 @@ struct AdvancedSettings: View {
|
|||||||
UIApplication.shared.open(URL(string: "https://mpv.io/manual/stable/#options-cache-pause-wait")!)
|
UIApplication.shared.open(URL(string: "https://mpv.io/manual/stable/#options-cache-pause-wait")!)
|
||||||
}
|
}
|
||||||
#elseif os(macOS)
|
#elseif os(macOS)
|
||||||
|
.onTapGesture {
|
||||||
|
NSWorkspace.shared.open(URL(string: "https://mpv.io/manual/stable/#options-cache-pause-wait")!)
|
||||||
|
}
|
||||||
.onHover(perform: onHover(_:))
|
.onHover(perform: onHover(_:))
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -147,6 +157,30 @@ struct AdvancedSettings: View {
|
|||||||
UIApplication.shared.open(URL(string: "https://mpv.io/manual/stable/#options-deinterlace")!)
|
UIApplication.shared.open(URL(string: "https://mpv.io/manual/stable/#options-deinterlace")!)
|
||||||
}
|
}
|
||||||
#elseif os(macOS)
|
#elseif os(macOS)
|
||||||
|
.onTapGesture {
|
||||||
|
NSWorkspace.shared.open(URL(string: "https://mpv.io/manual/stable/#options-deinterlace")!)
|
||||||
|
}
|
||||||
|
.onHover(perform: onHover(_:))
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Toggle(isOn: $mpvInitialAudioSync) {
|
||||||
|
HStack {
|
||||||
|
Text("initial-audio-sync")
|
||||||
|
#if !os(tvOS)
|
||||||
|
Image(systemName: "link")
|
||||||
|
.accessibilityAddTraits([.isButton, .isLink])
|
||||||
|
.font(.footnote)
|
||||||
|
#if os(iOS)
|
||||||
|
.onTapGesture {
|
||||||
|
UIApplication.shared.open(URL(string: "https://mpv.io/manual/stable/#options-initial-audio-sync")!)
|
||||||
|
}
|
||||||
|
#elseif os(macOS)
|
||||||
|
.onTapGesture {
|
||||||
|
NSWorkspace.shared.open(URL(string: "https://mpv.io/manual/stable/#options-initial-audio-sync")!)
|
||||||
|
}
|
||||||
.onHover(perform: onHover(_:))
|
.onHover(perform: onHover(_:))
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -165,6 +199,9 @@ struct AdvancedSettings: View {
|
|||||||
UIApplication.shared.open(URL(string: "https://mpv.io/manual/stable/#options-hwdec")!)
|
UIApplication.shared.open(URL(string: "https://mpv.io/manual/stable/#options-hwdec")!)
|
||||||
}
|
}
|
||||||
#elseif os(macOS)
|
#elseif os(macOS)
|
||||||
|
.onTapGesture {
|
||||||
|
NSWorkspace.shared.open(URL(string: "https://mpv.io/manual/stable/#options-hwdec")!)
|
||||||
|
}
|
||||||
.onHover(perform: onHover(_:))
|
.onHover(perform: onHover(_:))
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -191,6 +228,9 @@ struct AdvancedSettings: View {
|
|||||||
UIApplication.shared.open(URL(string: "https://mpv.io/manual/stable/#options-demuxer-lavf-probe-info")!)
|
UIApplication.shared.open(URL(string: "https://mpv.io/manual/stable/#options-demuxer-lavf-probe-info")!)
|
||||||
}
|
}
|
||||||
#elseif os(macOS)
|
#elseif os(macOS)
|
||||||
|
.onTapGesture {
|
||||||
|
NSWorkspace.shared.open(URL(string: "https://mpv.io/manual/stable/#options-demuxer-lavf-probe-info")!)
|
||||||
|
}
|
||||||
.onHover(perform: onHover(_:))
|
.onHover(perform: onHover(_:))
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user