Class: Blitzcrank::TVShow

Inherits:
Video
  • Object
show all
Defined in:
lib/blitzcrank/tv_show.rb

Constant Summary

Constants inherited from Video

Video::MOVIE_REGEX, Video::TV_SHOW_REGEX

Instance Method Summary collapse

Methods inherited from Video

#file_name, file_name, #initialize, is_movie?, is_tv_show?, #nice_name, #remote_path, with_path

Constructor Details

This class inherits a constructor from Blitzcrank::Video

Instance Method Details

#is_movie?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/blitzcrank/tv_show.rb', line 17

def is_movie?
  false
end

#is_tv_show?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/blitzcrank/tv_show.rb', line 21

def is_tv_show?
  true
end

#local_pathObject



8
9
10
# File 'lib/blitzcrank/tv_show.rb', line 8

def local_path
  season_path + "/" + @file_name
end

#seasonObject



12
13
14
15
# File 'lib/blitzcrank/tv_show.rb', line 12

def season
  TV_SHOW_REGEX.match(@file_name)
  $2.gsub(/\A0+/, '')
end

#season_pathObject



4
5
6
# File 'lib/blitzcrank/tv_show.rb', line 4

def season_path
  Blitzcrank.config.base_tv_dir + nice_name + "/" + Blitzcrank.config.season_identifier + season
end