Module: TivoHMO::API::Application

Extended by:
ActiveSupport::Concern
Includes:
GemLogger::LoggerSupport, Container
Included in:
TivoHMO::Adapters::Filesystem::Application, TivoHMO::Adapters::Plex::Application, TivoHMO::Adapters::Settings::Application
Defined in:
lib/tivohmo/api/application.rb

Overview

Represents the tivo concept of a Server (i.e. the root node which contains the top level containers). The identifier passed to the ctor should be a string that makes sense for initializing a subclass of app, e.g. a directory, a hostname:port, etc

Instance Attribute Summary collapse

Attributes included from Container

#presorted, #uuid

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 Container

#child_count, #refresh

Methods included from Node

#add_child, #app?, #find, #root?, #title_path, #to_s, #tree_string

Instance Attribute Details

#metadata_classObject

Returns the value of attribute metadata_class.



14
15
16
# File 'lib/tivohmo/api/application.rb', line 14

def 
  @metadata_class
end

#transcoder_classObject

Returns the value of attribute transcoder_class.



14
15
16
# File 'lib/tivohmo/api/application.rb', line 14

def transcoder_class
  @transcoder_class
end

Instance Method Details

#initialize(identifier) ⇒ Object



17
18
19
20
21
22
# File 'lib/tivohmo/api/application.rb', line 17

def initialize(identifier)
  super(identifier)
  self.app = self
  self.content_type = "x-container/tivo-videos"
  self.source_format = "x-container/folder"
end

#metadata_for(item) ⇒ Object



24
25
26
# File 'lib/tivohmo/api/application.rb', line 24

def (item)
  .new(item) if 
end

#transcoder_for(item) ⇒ Object



28
29
30
# File 'lib/tivohmo/api/application.rb', line 28

def transcoder_for(item)
  transcoder_class.new(item) if transcoder_class
end