mirror of
https://github.com/cranci1/Sora.git
synced 2026-04-18 07:02:45 +00:00
fixed the watch next episode
This commit is contained in:
parent
982d524c72
commit
63cd8e0b5a
1 changed files with 7 additions and 6 deletions
|
|
@ -523,13 +523,14 @@ struct MediaInfoView: View {
|
|||
}
|
||||
|
||||
private func selectNextEpisode() {
|
||||
guard selectedEpisodeNumber + 1 < episodeLinks.count else {
|
||||
Logger.shared.log("No more episodes to play", type: "Info")
|
||||
return
|
||||
}
|
||||
guard let currentIndex = episodeLinks.firstIndex(where: { $0.number == selectedEpisodeNumber }),
|
||||
currentIndex + 1 < episodeLinks.count else {
|
||||
Logger.shared.log("No more episodes to play", type: "Info")
|
||||
return
|
||||
}
|
||||
|
||||
selectedEpisodeNumber += 1
|
||||
let nextEpisode = episodeLinks[selectedEpisodeNumber]
|
||||
let nextEpisode = episodeLinks[currentIndex + 1]
|
||||
selectedEpisodeNumber = nextEpisode.number
|
||||
fetchStream(href: nextEpisode.href)
|
||||
DropManager.shared.showDrop(title: "Fetching Next Episode", subtitle: "", duration: 0.5, icon: UIImage(systemName: "arrow.triangle.2.circlepath"))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue