diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-12-25 08:08:11 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-12-25 08:08:11 +0000 |
commit | 5886337a7e328493cba2166f7e4ee7d237cbfa32 (patch) | |
tree | b90af8ac22ae832be2f6b64b8b70e121a0327bbd /lib/class/catalog.class.php | |
parent | d6003655a9b266eeb20c15d53d77da873e9a6642 (diff) | |
download | ampache-5886337a7e328493cba2166f7e4ee7d237cbfa32.tar.gz ampache-5886337a7e328493cba2166f7e4ee7d237cbfa32.tar.bz2 ampache-5886337a7e328493cba2166f7e4ee7d237cbfa32.zip |
added metadata hotness to the album art dump
Diffstat (limited to 'lib/class/catalog.class.php')
-rw-r--r-- | lib/class/catalog.class.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php index 6c93e549..3f854b11 100644 --- a/lib/class/catalog.class.php +++ b/lib/class/catalog.class.php @@ -902,6 +902,26 @@ class Catalog { $file = "$dir/$preferred_filename"; if ($file_handle = fopen($file,"w")) { if (fwrite($file_handle, $image['0']['raw'])) { + + // Also check and see if we should write out some meta data + if ($methods['metadata']) { + switch ($methods['metadata']) { + case 'windows': + $meta_file = $dir . '/desktop.ini'; + $string = "[.ShellClassInfo]\nIconFile=$file\nIconIndex=0\nInfoTip=$album->full_name"; + break; + default: + case 'linux': + $meta_file = $dir . '/.directory'; + $string = "Name=$album->full_name\nIcon=$file"; + break; + } // end switch + + $meta_handle = fopen($meta_file,"w"); + fwrite($meta_handle,$string); + fclose($meta_handle); + + } // end metadata $i++; if (!($i%100)) { echo "Written: $i. . .\n"; |