Module: TheTvDb::Api::ImageListHelpers

Defined in:
lib/the_tv_db/api/image_list_helpers.rb

Instance Method Summary collapse

Instance Method Details

#bannersObject



18
19
20
21
22
23
# File 'lib/the_tv_db/api/image_list_helpers.rb', line 18

def banners
  r = select do |i|
    i.type == :fanart
  end
  r.extend(TheTvDb::Api::ImageListHelpers)
end

#highest_pixel_countObject



4
5
6
# File 'lib/the_tv_db/api/image_list_helpers.rb', line 4

def highest_pixel_count
  sort { |a,b| a.pixels <=> b.pixels }.last
end

#postersObject



24
25
26
27
28
29
# File 'lib/the_tv_db/api/image_list_helpers.rb', line 24

def posters
  r = select do |i|
    i.type == :poster
  end
  r.extend(TheTvDb::Api::ImageListHelpers)
end

#season_bannersObject



13
14
15
16
17
# File 'lib/the_tv_db/api/image_list_helpers.rb', line 13

def season_banners
  select do |i|
    i.type == :season
  end
end

#standardObject



10
11
12
# File 'lib/the_tv_db/api/image_list_helpers.rb', line 10

def standard
  select { |i| not i.widescreen? }
end

#widescreenObject



7
8
9
# File 'lib/the_tv_db/api/image_list_helpers.rb', line 7

def widescreen
  select { |i| i.widescreen? }
end