radish Wrote: 
> I use the following little perl script to tell my slimserver to do a
> rescan whenever I sync new music onto it, you may be able to adapt it
> to your needs.
> 
> > 
Code:
--------------------
  >   > 
  > 
  > use IO::Socket;
  > 
  > $server="servername";
  > $port=9090;
  > 
  > print "Connecting to SlimServer at ".$server.":".$port."...\n";
  > 
  > $remote = IO::Socket::INET->new(
  > Proto    => "tcp",
  > PeerAddr => $server,
  > PeerPort => $port,
  > )
  > or die "ERROR: Cannot connect to SlimServer";
  > 
  > $remote->autoflush(1);
  > 
  > print $remote "rescan\n";
  > 
  > $response = <$remote>;
  > $response == "rescan" || die "ERROR: Bad response from SlimServer : 
$response\n";
  > 
  > print $remote "exit\n";
  > close $remote;
  > 
  > print "SlimServer is rescanning the music library\n";
  > exit;
  > 
--------------------
> > 

Thanks for that ! I've added the script to my transfer script.

I had to add 


Code:
--------------------
    
  chomp $response;
  
--------------------


for the response test to work.


-- 
dukeinlondon
------------------------------------------------------------------------
dukeinlondon's Profile: http://forums.slimdevices.com/member.php?userid=1145
View this thread: http://forums.slimdevices.com/showthread.php?t=14211

_______________________________________________
Discuss mailing list
Discuss@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/discuss

Reply via email to