mirror of
https://github.com/cranci1/Sora.git
synced 2026-03-11 17:45:37 +00:00
modules type support now
This commit is contained in:
parent
2b8d3b0cde
commit
29f9538066
1 changed files with 4 additions and 5 deletions
|
|
@ -114,7 +114,10 @@ struct EpisodeCell: View {
|
|||
}
|
||||
.onAppear {
|
||||
updateProgress()
|
||||
fetchEpisodeDetails()
|
||||
|
||||
if let type = module.metadata.type?.lowercased(), type == "anime" {
|
||||
fetchAnimeEpisodeDetails()
|
||||
}
|
||||
}
|
||||
.onChange(of: progress) { _ in
|
||||
updateProgress()
|
||||
|
|
@ -152,10 +155,6 @@ struct EpisodeCell: View {
|
|||
currentProgress = totalTime > 0 ? min(lastPlayedTime / totalTime, 1.0) : 0
|
||||
}
|
||||
|
||||
private func fetchEpisodeDetails() {
|
||||
fetchAnimeEpisodeDetails()
|
||||
}
|
||||
|
||||
private func fetchAnimeEpisodeDetails() {
|
||||
guard let url = URL(string: "https://api.ani.zip/mappings?anilist_id=\(itemID)") else {
|
||||
isLoading = false
|
||||
|
|
|
|||
Loading…
Reference in a new issue