class P3::TV::EpisodeFile
Attributes
air_date[RW]
episode[RW]
path[RW]
percent_done[RW]
season[RW]
series[RW]
series_id[RW]
status[RW]
thumbnail[RW]
title[RW]
type[W]
Public Instance Methods
<=>( other )
click to toggle source
# File lib/p3-tv.rb, line 269 def <=>( other ) if( self.series == other.series ) if( self.season == other.season ) return self.episode <=> other.episode else return self.season <=> other.season end else return self.series <=> other.series end end
to_h()
click to toggle source
# File lib/p3-tv.rb, line 255 def to_h return { :series_id => series_id, :series => series, :season => season, :episode => episode, :title => title, :air_date => air_date.to_s, :path => path, :status => status, :percent_done => percent_done, :thumbnail => thumbnail } end
to_json(*a)
click to toggle source
# File lib/p3-tv.rb, line 251 def to_json(*a) return to_h.to_json(*a) end
to_s()
click to toggle source
# File lib/p3-tv.rb, line 281 def to_s return to_h.to_s end
type()
click to toggle source
# File lib/p3-tv.rb, line 241 def type unless @type if( @path ) ext = File::extname( @path ) @type = ext unless ext.empty? end end return @type end