class MovieOrganizer::TvdbInstance

Attributes

match[R]
title[R]
tvdb[R]
year[R]

Public Class Methods

new(title, year = nil) click to toggle source
# File lib/movie_organizer/tvdb_instance.rb, line 10
def initialize(title, year = nil)
  @tvdb = Tvdbr::Client.new(api_key)
  @title = title
  @year  = year
end

Public Instance Methods

tv_show?() click to toggle source
# File lib/movie_organizer/tvdb_instance.rb, line 16
def tv_show?
  @match = tvdb.find_series_by_title(title)
  sleep(0.25)
  return self if @match
  false
end

Private Instance Methods

api_key() click to toggle source
# File lib/movie_organizer/tvdb_instance.rb, line 25
def api_key
  ENV.fetch('TVDB_KEY') do
    Settings.instance[:tv_shows][:tvdb_key]
  end
end