summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/dump_album_art.inc8
-rwxr-xr-xdocs/CHANGELOG2
-rw-r--r--lib/class/catalog.class.php20
-rw-r--r--lib/ui.lib.php2
4 files changed, 30 insertions, 2 deletions
diff --git a/bin/dump_album_art.inc b/bin/dump_album_art.inc
index 9d88b7ea..d9d4e44b 100644
--- a/bin/dump_album_art.inc
+++ b/bin/dump_album_art.inc
@@ -24,10 +24,16 @@ $path = dirname(__FILE__);
$prefix = realpath($path . '/../');
require_once $prefix . '/lib/init.php';
+// If we specify extra meta data
+// Possible values are windows and linux
+// If Null then no meta data is dumped
+$meta = 'linux';
+
$catalogs = Catalog::get_catalogs();
foreach ($catalogs as $catalog_id) {
- Catalog::dump_album_art($catalog_id);
+ Catalog::dump_album_art($catalog_id,array('metadata'=>$meta));
}
+
?>
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index 0f8d16bc..a58ac623 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,8 @@
--------------------------------------------------------------------------
v.3.4-Beta1
+ - Added Metadata (.directory or desktop.ini) when using the
+ /bin/dump_album_art.inc file
- Added 'Add New...' option to Album on Song Edit (Thx picasso)
- Fixed multiple login check
- Fixed filters applying incorrectly to non-browse displays
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";