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...
#!/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');

?>

For the old (slightly flawed in handling ugly filenames) script, see http://toba.ath.cx:724/blog/archives/amarok-collection-update-script.html

Comments

Post a Comment

Name
Email (not published, I won't spam you)
URL (optional)
Title
Comment
sides on a square?
Worth Saying
Valid XHTML, CSS, RSS | 2ms | Copyright 2004-2024 Eric Stein