Module: TivoHMO::API::Item
- Extended by:
- ActiveSupport::Concern
- Includes:
- GemLogger::LoggerSupport, Node
- Included in:
- TivoHMO::Adapters::Filesystem::FileItem, TivoHMO::Adapters::Plex::Episode, TivoHMO::Adapters::Plex::Movie, TivoHMO::Adapters::Settings::DisplayItem, TivoHMO::Adapters::Settings::ResetDefaultsItem, TivoHMO::Adapters::Settings::SetValueItem
- Defined in:
- lib/tivohmo/api/item.rb
Overview
Represents the tivo concept of an Item (i.e. a file that can be displayed), and is always a leaf node in the tree.
Instance Attribute Summary collapse
-
#file ⇒ Object
Returns the value of attribute file.
-
#subtitle ⇒ Object
Returns the value of attribute subtitle.
Attributes included from Node
#app, #children, #content_type, #created_at, #identifier, #modified_at, #parent, #root, #source_format, #title
Instance Method Summary collapse
Methods included from Node
#add_child, #app?, #find, #root?, #title_path, #tree_string
Instance Attribute Details
#file ⇒ Object
Returns the value of attribute file.
11 12 13 |
# File 'lib/tivohmo/api/item.rb', line 11 def file @file end |
#subtitle ⇒ Object
Returns the value of attribute subtitle.
11 12 13 |
# File 'lib/tivohmo/api/item.rb', line 11 def subtitle @subtitle end |
Instance Method Details
#initialize(identifier) ⇒ Object
13 14 15 16 17 |
# File 'lib/tivohmo/api/item.rb', line 13 def initialize(identifier) super(identifier) self.content_type = "video/x-tivo-mpeg" self.source_format = "video/x-tivo-mpeg" end |
#metadata ⇒ Object
19 20 21 |
# File 'lib/tivohmo/api/item.rb', line 19 def @metadata ||= app.(self) end |
#to_s ⇒ Object
27 28 29 |
# File 'lib/tivohmo/api/item.rb', line 27 def to_s "<#{self.class.name}: #{self.identifier}>" end |
#transcoder ⇒ Object
23 24 25 |
# File 'lib/tivohmo/api/item.rb', line 23 def transcoder @transcoder ||= app.transcoder_for(self) end |