Skip to content

Commit

Permalink
fixed minor mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
toyhammered committed Jul 7, 2016
1 parent f2fdc63 commit a6a94bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
18 changes: 5 additions & 13 deletions server/lib/data_import/my_anime_list/extractor/media.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,13 @@ def age_rating_guide
def subtype # will be renamed to this hopefully
# anime matches [TV special OVA ONA movie music]
# manga matches [manga novel manhua oneshot doujin]
type = data['type'].downcase

case data['type'].downcase
# anime
case type
when 'tv' then :TV
when 'special' then :special
when 'ova' then :OVA
when 'ona' then :ONA
when 'movie' then :movie
when 'music' then :music
# manga
when 'manga' then :manga
when 'novel' then :novel
when 'manuha' then :manuha
when 'oneshot' then :oneshot
when 'doujin' then :doujin
else type.to_sym
end
end

Expand Down Expand Up @@ -110,8 +102,8 @@ def volumes
data['volumes']
end

# removed subtype (show_type, manga_type issue)
# missing status on manga (anime does automagically)
# TODO: removed subtype (show_type, manga_type issue)
# TODO: missing status on manga (anime does automagically)
def to_h
%i[age_rating episode_count episode_length synopsis youtube_video_id
poster_image age_rating_guide start_date end_date
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,6 @@
expect(subject1.age_rating_guide).to eq('Teens 13 or older')
end

# it 'case statement for R' do
# subject = described_class.new({classification: 'R'}.to_json)
# expect(subject.age_rating_guide).to eq('Violence, Profanity')
# end

it 'case statement for R+' do
subject = described_class.new({
classification: 'R+'
Expand Down

0 comments on commit a6a94bb

Please sign in to comment.