#! /usr/bin/env perl

use warnings;
use strict;

my @parts = split(/\//, $ARGV[0]);

my $medium = $parts[$#parts];

open(IN, "-|") || exec "dcop", "kded", "mediamanager", "properties", $medium;
my @prop = <IN>;
close(IN);

if ($prop[6] =~ /^\//)
{
	my $mountpoint = $prop[6];
	chomp($mountpoint);
	exec "kfmclient", "exec", "file://$mountpoint/";
}

