File tree Expand file tree Collapse file tree 3 files changed +24
-1
lines changed
SettingsView/SettingsSubViews Expand file tree Collapse file tree 3 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -1373,7 +1373,21 @@ struct MediaInfoView: View {
13731373 return
13741374 }
13751375
1376- let nextEpisode = episodeLinks [ currentIndex + 1 ]
1376+ let autoSkipFillers = UserDefaults . standard. bool ( forKey: " autoSkipFillers " )
1377+ var nextIndex = currentIndex + 1
1378+
1379+ if autoSkipFillers, let fillerSet = jikanFillerSet {
1380+ while nextIndex < episodeLinks. count, fillerSet. contains ( episodeLinks [ nextIndex] . number) {
1381+ Logger . shared. log ( " Skipping filler episode \( episodeLinks [ nextIndex] . number) " , type: " Debug " )
1382+ nextIndex += 1
1383+ }
1384+ guard nextIndex < episodeLinks. count else {
1385+ Logger . shared. log ( " No more non-filler episodes to play " , type: " Info " )
1386+ return
1387+ }
1388+ }
1389+
1390+ let nextEpisode = episodeLinks [ nextIndex]
13771391 selectedEpisodeNumber = nextEpisode. number
13781392 fetchStream ( href: nextEpisode. href)
13791393 DropManager . shared. showDrop (
Original file line number Diff line number Diff line change @@ -302,6 +302,7 @@ struct SettingsViewBackup: View {
302302 " skipIntroOutroVisible " ,
303303 " pipButtonVisible " ,
304304 " autoplayNext " ,
305+ " autoSkipFillers " ,
305306 " videoQualityWiFi " ,
306307 " videoQualityCellular " ,
307308 " subtitlesEnabled " ,
Original file line number Diff line number Diff line change @@ -258,6 +258,7 @@ struct SettingsViewPlayer: View {
258258 @AppStorage ( " doubleTapSeekEnabled " ) private var doubleTapSeekEnabled : Bool = false
259259 @AppStorage ( " skipIntroOutroVisible " ) private var skipIntroOutroVisible : Bool = true
260260 @AppStorage ( " autoplayNext " ) private var autoplayNext : Bool = true
261+ @AppStorage ( " autoSkipFillers " ) private var autoSkipFillers : Bool = false
261262 @AppStorage ( " introDBEnabled " ) private var introDBEnabled : Bool = true
262263
263264 @AppStorage ( " videoQualityWiFi " ) private var wifiQuality : String = VideoQualityPreference . defaultWiFiPreference. rawValue
@@ -301,6 +302,13 @@ struct SettingsViewPlayer: View {
301302 showDivider: true
302303 )
303304
305+ SettingsToggleRow (
306+ icon: " forward.fill " ,
307+ title: NSLocalizedString ( " Auto Skip Filler Episodes " , comment: " " ) ,
308+ isOn: $autoSkipFillers,
309+ showDivider: true
310+ )
311+
304312 SettingsTextFieldRow (
305313 icon: " timer " ,
306314 title: NSLocalizedString ( " Completion Percentage " , comment: " " ) ,
You can’t perform that action at this time.
0 commit comments