iTunesの最近のブログ記事

任意のアルバムアートワーク画像の探し方を探していたら、みつかったのでメモ。

http://forums.macosxhints.com/showthread.php?p=325382
こちらから引用:


These are Persistent IDs, which you can find in iTunes Music Library.xml and folder structure is like this:

Library Persistent ID -> decimal value of last hex digit in tracks persistent ID -> dec value of before last hex digit -> dec value of 3rd hex digit from the end -> Library persistent ID - Track persistent ID .itc


まず、XMLの先頭にあるLibrary Persistent IDという部分がある:


<key>Library Persistent ID</key><string>B77A88149B472EF5</string>

そしてそれぞれのトラックは下記のように、ひとまとまりのエレメントになっている。


<key>142</key>
<dict>
<key>Track ID</key><integer>142</integer>
<key>Name</key><string>ハニー・ムーン</string>
<key>Artist</key><string>Tei Towa + Natural Calamity</string>
<key>Composer</key><string>細野晴臣</string>
<key>Album</key><string>細野晴臣トリビュート・アルバム Tribute to Haruomi Hosono [Disc 1]</string>
<key>Genre</key><string>Pop</string>
<key>Kind</key><string>AAC オーディオファイル</string>
<key>Size</key><integer>4811001</integer>
<key>Total Time</key><integer>294293</integer>
<key>Disc Number</key><integer>1</integer>
<key>Disc Count</key><integer>2</integer>
<key>Track Number</key><integer>9</integer>
<key>Track Count</key><integer>11</integer>
<key>Year</key><integer>2007</integer>
<key>Date Modified</key><date>2007-12-11T16:21:09Z</date>
<key>Date Added</key><date>2007-11-18T07:02:11Z</date>
<key>Bit Rate</key><integer>128</integer>
<key>Sample Rate</key><integer>44100</integer>
<key>Rating</key><integer>20</integer>
<key>Album Rating</key><integer>40</integer>
<key>Album Rating Computed</key><true/>
<key>Compilation</key><true/>
<key>Artwork Count</key><integer>1</integer>
<key>Persistent ID</key><string>34B5886AA718721C</string>
<key>Track Type</key><string>File</string>
<key>Location</key><string>file://localhost/L:/stage/nanmaci/%E3%83%8D%E3%82%BF/1-09%20%E3%83%8F%E3%83%8B%E3%83%BC%E3%83%BB%E3%83%A0%E3%83%BC%E3%83%B3.m4a</string>
<key>File Folder Count</key><integer>-1</integer>
<key>Library Folder Count</key><integer>-1</integer>
</dict>

その中の、<key>Persistent ID</key><string>34B5886AA718721C</string>という部分を使う。

これらを組み合わせて下記のように解析できる。
Library Persistent IDが
B77A88149B472EF5
Persistent IDが
34B5886AA718721C
の場合、
Persistent IDの
下1の桁の値「C」を10進数にして13
10の桁の値「1」を10進数にして01
100の桁の値「2」を10進数にして02
なので、

アートワークがiTunesで自動的にダウンロードされたものなら、
iTunes > Album Artwork > Download > B77A88149B472EF5 > 13 > 01 > 02 > B77A88149B472EF5-34B5886AA718721C.itc

アートワークが自分で追加したものなら、
iTunes > Album Artwork > Local > B77A88149B472EF5 > 13 > 01 > 02 > B77A88149B472EF5-34B5886AA718721C.itc

という感じ。とりあえず今回はiTunes7.5.0.20、Windows XP環境でのチェックのみだったのでMacでのフォルダ構造については不明。この複雑な仕組みは、別ソフトなどで画像を簡単に利用されないようにアップルが工夫したものな気がする。なのでiTunesのバージョンアップで変わる可能性がおおいにあり。

*ただし、アルバム単位で画像を決めている場合、トラックごとに画像が保存されているわけではなく、共有画像として動いているらしいが、その仕組みはよくわからない。

*以前はjpgで保存されていた気がするが、今はitcという拡張子になっている。itcファイルに関してはここここを参考。

このアーカイブについて

このページには、過去に書かれたブログ記事のうちiTunesカテゴリに属しているものが含まれています。

前のカテゴリはFlashです。

次のカテゴリはjavascriptです。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。

Powered by Movable Type 4.1