Amarok partial collection update... improved
Posted by Eric Stein - January 14, 2007 CE @ 14:20:44 UTC
I've updated my Amarok update script to fix some problems it had handling things like double quotes and parenthesis in filenames. Of course, you will probably want to change the default path...
For the old (slightly flawed in handling ugly filenames) script, see http://toba.ath.cx:724/blog/archives/amarok-collection-update-script.html
#!/usr/bin/php
<?php
$p = '~/Media/Music/';
if (isset($argv[1]))
$p = escapeshellarg($argv[1]);
echo 'scanning ' . $p . "...\n";
$t = array();
exec('find ' . $p, $t);
foreach($t as $f)
touch($f);
system('dcop amarok collection scanCollectionChanges');
?>
<?php
$p = '~/Media/Music/';
if (isset($argv[1]))
$p = escapeshellarg($argv[1]);
echo 'scanning ' . $p . "...\n";
$t = array();
exec('find ' . $p, $t);
foreach($t as $f)
touch($f);
system('dcop amarok collection scanCollectionChanges');
?>
For the old (slightly flawed in handling ugly filenames) script, see http://toba.ath.cx:724/blog/archives/amarok-collection-update-script.html
Post a Comment