From 5886337a7e328493cba2166f7e4ee7d237cbfa32 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Tue, 25 Dec 2007 08:08:11 +0000 Subject: added metadata hotness to the album art dump --- lib/class/catalog.class.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'lib/class') 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"; -- cgit