Class: TivoHMO::Adapters::StreamIO::Metadata
- Inherits:
-
Object
- Object
- TivoHMO::Adapters::StreamIO::Metadata
- Includes:
- GemLogger::LoggerSupport, TivoHMO::API::Metadata
- Defined in:
- lib/tivohmo/adapters/streamio/metadata.rb
Overview
Extracts some basic metadata using the streamio gem
Constant Summary
Constants included from TivoHMO::API::Metadata
TivoHMO::API::Metadata::MPAA_RATINGS, TivoHMO::API::Metadata::TV_RATINGS
Instance Attribute Summary collapse
-
#movie ⇒ Object
Returns the value of attribute movie.
Attributes included from TivoHMO::API::Metadata
#actors, #actual_showing, #advisory, #bookmark, #channel, #choreographers, #color_code, #description, #directors, #duration, #episode_number, #episode_title, #executive_producers, #guest_stars, #hosts, #is_episode, #item, #movie_year, #mpaa_rating, #original_air_date, #part_count, #part_index, #producers, #program_genres, #program_id, #recording_quality, #series_genres, #series_id, #series_title, #show_type, #showing_bits, #source_size, #star_rating, #start_time, #stop_time, #time, #title, #tv_rating, #writers
Instance Method Summary collapse
-
#initialize(item) ⇒ Metadata
constructor
A new instance of Metadata.
Methods included from TivoHMO::API::Metadata
Constructor Details
#initialize(item) ⇒ Metadata
Returns a new instance of Metadata.
12 13 14 15 16 17 18 19 20 |
# File 'lib/tivohmo/adapters/streamio/metadata.rb', line 12 def initialize(item) super(item) begin self.movie = FFMPEG::Movie.new(item.identifier) self.duration = movie.duration.to_i rescue => e logger.error "Failed to read movie metadata: #{e}" end end |
Instance Attribute Details
#movie ⇒ Object
Returns the value of attribute movie.
10 11 12 |
# File 'lib/tivohmo/adapters/streamio/metadata.rb', line 10 def movie @movie end |