diff --git a/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+Anime.swift b/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+Anime.swift index d4aa1d00..98c99370 100644 --- a/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+Anime.swift +++ b/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+Anime.swift @@ -23,6 +23,7 @@ import SwiftSoup extension NASourceFourAnime { func anime(from link: AnimeLink) -> NineAnimatorPromise { + .fail(.contentUnavailableError("4Anime is no longer available on NineAnimator"))/* (self.isAnimeLink(url: link.link) ? .success(link) : self.resolveAnimeLink( from: link.link, artworkUrl: link.image @@ -146,6 +147,6 @@ extension NASourceFourAnime { /// Checks if the provided link points to an anime page private func isAnimeLink(url: URL) -> Bool { - url.pathComponents.contains("anime") + url.pathComponents.contains("anime")*/ } } diff --git a/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+Episode.swift b/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+Episode.swift index 04d55455..a522cb2e 100644 --- a/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+Episode.swift +++ b/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+Episode.swift @@ -21,16 +21,17 @@ import Foundation import NineAnimatorCommon import SwiftSoup -extension NASourceFourAnime { +extension NASourceFourAnime {/* /// 4anime provides multiple links for each episode, however they are not shown to the user static let knownServers = [ "server1": "Server 1", "server2": "Server 2", "server3": "Server 3", "server4": "Server 4" - ] + ]*/ func episode(from link: EpisodeLink, with anime: Anime) -> NineAnimatorPromise { + .fail(.contentUnavailableError("4Anime is no longer available on NineAnimator"))/* NineAnimatorPromise.firstly { try URL(string: link.identifier).tryUnwrap() } .thenPromise { @@ -144,6 +145,6 @@ extension NASourceFourAnime { ] ] ) - } + }*/ } } diff --git a/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+Featured.swift b/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+Featured.swift index 85bcdddd..5da13424 100644 --- a/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+Featured.swift +++ b/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+Featured.swift @@ -23,6 +23,8 @@ import SwiftSoup extension NASourceFourAnime { func featured() -> NineAnimatorPromise { + .fail(.contentUnavailableError("4Anime is no longer available on NineAnimator")) + /* requestManager.request("/", handling: .browsing).responseString.then { responseContent in let endpointURL = self.endpointURL @@ -82,6 +84,6 @@ extension NASourceFourAnime { featured: popularAnimeLinks, latest: recentAnimeLinks ) - } + }*/ } } diff --git a/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+LinkRetriever.swift b/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+LinkRetriever.swift index 0a494786..fa805496 100644 --- a/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+LinkRetriever.swift +++ b/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+LinkRetriever.swift @@ -28,6 +28,7 @@ extension NASourceFourAnime { ) func link(from url: URL) -> NineAnimatorPromise { + .fail()/* NineAnimatorPromise.firstly { let urlString = url.absoluteString @@ -64,6 +65,6 @@ extension NASourceFourAnime { image: animeArtworkUrl, source: self )) - } + }*/ } } diff --git a/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+RequestModifier.swift b/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+RequestModifier.swift index cd13089c..5a8eea12 100644 --- a/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+RequestModifier.swift +++ b/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+RequestModifier.swift @@ -16,7 +16,7 @@ // You should have received a copy of the GNU General Public License // along with NineAnimator. If not, see . // - +/* import Foundation import Kingfisher import NineAnimatorCommon @@ -35,3 +35,4 @@ extension NASourceFourAnime: Kingfisher.ImageDownloadRequestModifier { return modifiedRequest } } +*/ diff --git a/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+Search.swift b/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+Search.swift index 5b8d7ed1..b33d232d 100644 --- a/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+Search.swift +++ b/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime+Search.swift @@ -39,7 +39,7 @@ extension NASourceFourAnime { page == 0 ? _results?.map { .anime($0) } ?? [] : [] } - func more() { + func more() { /* if performingTask == nil { performingTask = parent.requestManager.request( url: self.encodedW3CQueryUrl, @@ -99,7 +99,7 @@ extension NASourceFourAnime { self._results = $0 self.delegate?.pageIncoming(0, from: self) } - } + }*/ } private var encodedW3CQueryUrl: URL { diff --git a/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime.swift b/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime.swift index 48f0b4a0..73d11d4e 100644 --- a/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime.swift +++ b/Modules/Sources/NineAnimatorNativeSources/AnimeSources/4anime/FourAnime.swift @@ -58,13 +58,12 @@ class NASourceFourAnime: BaseSource, Source, PromiseSource { super.init(with: parent) // Setup Kingfisher request modifier - setupGlobalRequestModifier() +// setupGlobalRequestModifier() } func suggestProvider(episode: Episode, forServer server: Anime.ServerIdentifier, withServerName name: String) -> VideoProviderParser? { - NASourceFourAnime.knownServers.keys.contains(server) - ? DummyParser.registeredInstance : nil - } + DummyParser.registeredInstance + } override func recommendServer(for anime: Anime) -> Anime.ServerIdentifier? { recommendServers(for: anime, ofPurpose: .playback).first