summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-25 08:08:11 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-25 08:08:11 +0000
commit5886337a7e328493cba2166f7e4ee7d237cbfa32 (patch)
treeb90af8ac22ae832be2f6b64b8b70e121a0327bbd /lib
parentd6003655a9b266eeb20c15d53d77da873e9a6642 (diff)
downloadampache-5886337a7e328493cba2166f7e4ee7d237cbfa32.tar.gz
ampache-5886337a7e328493cba2166f7e4ee7d237cbfa32.tar.bz2
ampache-5886337a7e328493cba2166f7e4ee7d237cbfa32.zip
added metadata hotness to the album art dump
Diffstat (limited to 'lib')
-rw-r--r--lib/class/catalog.class.php20
-rw-r--r--lib/ui.lib.php2
2 files changed, 21 insertions, 1 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";
diff --git a/lib/ui.lib.php b/lib/ui.lib.php
index aa28af36..8898298c 100644
--- a/lib/ui.lib.php
+++ b/lib/ui.lib.php
@@ -646,7 +646,7 @@ function show_album_select($name='album',$album_id=0,$allow_add=0,$song_id=0) {
if ($allow_add) {
// Append additional option to the end with value=-1
- echo "\t<option value=\"-1\">Add New...</option>\n";
+ echo "\t<option value=\"-1\">" . _('Add New') . "...</option>\n";
}
echo "</select>\n";