Class: AppleTvConverter::Metadata::Info

Inherits:
Object
  • Object
show all
Defined in:
lib/apple_tv_converter/metadata/info.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(media) ⇒ Info

Returns a new instance of Info.



9
10
11
# File 'lib/apple_tv_converter/metadata/info.rb', line 9

def initialize(media)
  @media = media
end

Instance Attribute Details

#artwork_filenameObject

Returns the value of attribute artwork_filename.



7
8
9
# File 'lib/apple_tv_converter/metadata/info.rb', line 7

def artwork_filename
  @artwork_filename
end

#codirectorObject

Returns the value of attribute codirector.



6
7
8
# File 'lib/apple_tv_converter/metadata/info.rb', line 6

def codirector
  @codirector
end

#descriptionObject

Returns the value of attribute description.



4
5
6
# File 'lib/apple_tv_converter/metadata/info.rb', line 4

def description
  @description
end

#directorObject

Returns the value of attribute director.



6
7
8
# File 'lib/apple_tv_converter/metadata/info.rb', line 6

def director
  @director
end

#genreObject

Returns the value of attribute genre.



4
5
6
# File 'lib/apple_tv_converter/metadata/info.rb', line 4

def genre
  @genre
end

#nameObject

Returns the value of attribute name.



4
5
6
# File 'lib/apple_tv_converter/metadata/info.rb', line 4

def name
  @name
end

#release_dateObject

Returns the value of attribute release_date.



4
5
6
# File 'lib/apple_tv_converter/metadata/info.rb', line 4

def release_date
  @release_date
end

#screenwritersObject

Returns the value of attribute screenwriters.



6
7
8
# File 'lib/apple_tv_converter/metadata/info.rb', line 6

def screenwriters
  @screenwriters
end

#tv_networkObject

Returns the value of attribute tv_network.



5
6
7
# File 'lib/apple_tv_converter/metadata/info.rb', line 5

def tv_network
  @tv_network
end

#tv_showObject

Returns the value of attribute tv_show.



5
6
7
# File 'lib/apple_tv_converter/metadata/info.rb', line 5

def tv_show
  @tv_show
end

#tv_show_episodeObject

Returns the value of attribute tv_show_episode.



5
6
7
# File 'lib/apple_tv_converter/metadata/info.rb', line 5

def tv_show_episode
  @tv_show_episode
end

#tv_show_seasonObject

Returns the value of attribute tv_show_season.



5
6
7
# File 'lib/apple_tv_converter/metadata/info.rb', line 5

def tv_show_season
  @tv_show_season
end

Instance Method Details

#artworkObject



13
# File 'lib/apple_tv_converter/metadata/info.rb', line 13

def artwork ; @media.artwork_filename ; end

#artwork=(value) ⇒ Object



14
# File 'lib/apple_tv_converter/metadata/info.rb', line 14

def artwork=(value) ; AppleTvConverter.copy value, @media.artwork_filename ; end

#sort_albumObject



17
# File 'lib/apple_tv_converter/metadata/info.rb', line 17

def sort_album ; return tv_show ; end

#sort_album_artistObject



18
# File 'lib/apple_tv_converter/metadata/info.rb', line 18

def sort_album_artist ; return tv_show ; end

#sort_composerObject



19
# File 'lib/apple_tv_converter/metadata/info.rb', line 19

def sort_composer ; return tv_show ; end

#sort_nameObject



16
# File 'lib/apple_tv_converter/metadata/info.rb', line 16

def sort_name ; return @media.is_tv_show_episode? ? "#{tv_show} S#{tv_show_season.to_s.rjust(2, '0')}E#{tv_show_episode.to_s.rjust(2, '0')}" : name ; end

#sort_showObject



20
# File 'lib/apple_tv_converter/metadata/info.rb', line 20

def sort_show ; return "#{tv_show} Season #{tv_show_season.to_s.rjust(2, '0')}" ; end