Class: PlexSymlinker::FileTypes::Mp4

Inherits:
AudioFile
  • Object
show all
Defined in:
lib/plex_symlinker/file_types/mp4.rb

Overview

> ARTIST”=>“Walter Moers”,

"----:com.apple.iTunes:Encoding Params"=>"Nero AAC codec / Aug 6 2007",
"----:com.apple.iTunes:PERFORMER"=>"Andreas Fröhlich",
"----:com.apple.iTunes:cdec"=>"Nero AAC codec / Aug 6 2007",
"----:com.apple.iTunes:tool"=>"Nero AAC codec / Aug 6 2007",
"aART"=>"Walter Moers",
"covr"=>nil,
"soaa"=>"Moers, Walter",
"soal"=>"05 - Der Schrecksenmeister",
"soar"=>"Moers, Walter",
"trkn"=>nil,
"©ART"=>"Walter Moers",
"©alb"=>"Der Schreckensmeister",
"©day"=>"2008",
"©gen"=>"Hörbuch",
"©nam"=>"Der Schreckensmeister - Teil 1",
"©too"=>"Nero AAC codec / Aug 6 2007"

Instance Attribute Summary

Attributes inherited from AudioFile

#path

Instance Method Summary collapse

Methods inherited from AudioFile

#album, #artist, from_path, #genre, #initialize, register_type, registered_types, #relative_symlink_dir, #relative_symlink_path, #symlink_file_name, tag_reader, #title, #track_number, #year

Constructor Details

This class inherits a constructor from PlexSymlinker::FileTypes::AudioFile

Instance Method Details

#album_artistObject



38
39
40
# File 'lib/plex_symlinker/file_types/mp4.rb', line 38

def album_artist
  tags["aART"] || artist
end

#tagsObject



32
33
34
35
36
# File 'lib/plex_symlinker/file_types/mp4.rb', line 32

def tags
  @tags ||= TagLib::MP4::File.open(path) { |file|
    Hash[file.tag.item_map.to_a.map { |k, i| [k, i.to_string_list.first] }]
  }
end