Merge pull request #2 from scigward/copilot/add-auto-skip-filler-setting

Add Auto Skip Filler Episodes setting
This commit is contained in:
scigward 2026-02-20 19:47:41 +03:00 committed by GitHub
commit 0add3fdd23
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 24 additions and 1 deletions

View file

@ -1373,7 +1373,21 @@ struct MediaInfoView: View {
return
}
let nextEpisode = episodeLinks[currentIndex + 1]
let autoSkipFillers = UserDefaults.standard.bool(forKey: "autoSkipFillers")
var nextIndex = currentIndex + 1
if autoSkipFillers, let fillerSet = jikanFillerSet {
while nextIndex < episodeLinks.count, fillerSet.contains(episodeLinks[nextIndex].number) {
Logger.shared.log("Skipping filler episode \(episodeLinks[nextIndex].number)", type: "Debug")
nextIndex += 1
}
guard nextIndex < episodeLinks.count else {
Logger.shared.log("No more non-filler episodes to play", type: "Info")
return
}
}
let nextEpisode = episodeLinks[nextIndex]
selectedEpisodeNumber = nextEpisode.number
fetchStream(href: nextEpisode.href)
DropManager.shared.showDrop(

View file

@ -302,6 +302,7 @@ struct SettingsViewBackup: View {
"skipIntroOutroVisible",
"pipButtonVisible",
"autoplayNext",
"autoSkipFillers",
"videoQualityWiFi",
"videoQualityCellular",
"subtitlesEnabled",

View file

@ -258,6 +258,7 @@ struct SettingsViewPlayer: View {
@AppStorage("doubleTapSeekEnabled") private var doubleTapSeekEnabled: Bool = false
@AppStorage("skipIntroOutroVisible") private var skipIntroOutroVisible: Bool = true
@AppStorage("autoplayNext") private var autoplayNext: Bool = true
@AppStorage("autoSkipFillers") private var autoSkipFillers: Bool = false
@AppStorage("introDBEnabled") private var introDBEnabled: Bool = true
@AppStorage("videoQualityWiFi") private var wifiQuality: String = VideoQualityPreference.defaultWiFiPreference.rawValue
@ -301,6 +302,13 @@ struct SettingsViewPlayer: View {
showDivider: true
)
SettingsToggleRow(
icon: "forward.fill",
title: NSLocalizedString("Auto Skip Filler Episodes", comment: ""),
isOn: $autoSkipFillers,
showDivider: true
)
SettingsTextFieldRow(
icon: "timer",
title: NSLocalizedString("Completion Percentage", comment: ""),