hummingbird-me / kitsu-tools

:hammer: The tools we use to build Kitsu, the coolest platform for anime and manga
https://kitsu.io
Apache License 2.0
2.09k stars 264 forks source link

Drama Page #681

Open NuckChorris opened 8 years ago

NuckChorris commented 8 years ago

Creation of the drama page.

NuckChorris commented 8 years ago

The Drama resource is an easy one to create, if anyone wants to jump on the API portion of this. It should be almost identical to the Anime resource (model, controller, serializer, etc.), with common elements dragged out into the Media and Titleable concerns.

The Titleable concern currently requires an original ja_en title, which obviously doesn't work for the korean dramas (or for existing manwha in our manga db, for that matter). This will need fixing, and there will need to be a before_create hook to pick which title should be canonical — it's clear that the existing "just pick ja_en" won't actually work. Perhaps the following:

If there's an English title, use that Else if there's a title for #{country}_en, use that Else just use the first one

We should probably add a "country of origin" column containing ISO-3166-1 Alpha 2 codes

Anyways, after the DB is created, there's a bunch of JSON files which need an import script written for them, probably a rake task.