Source Development
What should I know before I get started?
NineAnimator is a typical Cocoa Touch iOS application following the Model-View-Controller (MVC) design pattern. There are many resources online for you to learn the MVC design, but in short, you should know the responsibility of each component and keep the additional code at where it should be.
Model: NineAnimator, at its core, is a collection of parsers and analyzers. The Modules/Sources
directory hosts all of the parsing logic and user-configurable.
- Anime Source: Under the
Modules/Sources
folder, you'll find theNineAnimatorNativeSources
. Code under this folder fetches data from different source anime websites, decodes it, and present the information to other components of NineAnimator. For each source website, NineAnimator creates a distinctSource
class.Source
encapsulates the functionalities and capabilities of the anime website. - Media Parser: Media Parsers, located under the
NineAnimatorNativeParsers
folder underModules/Sources
, are classes that accept a URL to a streaming site and return a locally streamable URL. Media Parsers are used to support playbacks with native players (and cast). NineAnimator parsers will conform to theVideoProviderParser
protocol.
For development of sources, we are only going to touch the Model
. More specifically, the NineAnimatorNativeSources
and NineAnimatorNativeParsers
directories.
Most operations in NineAnimator are performed asynchronously (optionally on a different thread). This also applies to NineAnimatorNativeSources
This ensures that any time consuming or intensive tasks won't block the main thread. Make sure to read NineAnimator's asynchronous framework and styleguides before contributing.
Where do I start?
Developing a source is pretty easy, you only need basic programming knowledge. Some understanding of git may help but is not required.
Validate that the website you intend to write for is not already available. A list of sources can be found on the supported sources list.
Check out the quickstart guide for a place to begin.
Use on of our guide and tutorial to learn more about source development: