X-Git-Url: http://git.ieval.ro/?p=app-xmms2-notifier.git;a=blobdiff_plain;f=lib%2FApp%2FXMMS2%2FNotifier.pm;fp=lib%2FApp%2FXMMS2%2FNotifier.pm;h=3ce6645126aa158621a51fca498506476e8dd579;hp=f61a74aee26ddb10934cc2e0ddd329d27a691b3f;hb=ca539a7a1fefec686939946f4c81c9769a15430b;hpb=f4385cf2da40d688c5139382567817070f5fe70f diff --git a/lib/App/XMMS2/Notifier.pm b/lib/App/XMMS2/Notifier.pm index f61a74a..3ce6645 100644 --- a/lib/App/XMMS2/Notifier.pm +++ b/lib/App/XMMS2/Notifier.pm @@ -25,8 +25,11 @@ sub notify_libnotify{ } sub notify{ - my $id=$xmms->playback_current_id->wait->value or return; - my $minfo=$xmms->medialib_get_info($id)->wait->value; + my ($id, $minfo); + eval { + $id=$xmms->playback_current_id->wait->value or return; + $minfo=$xmms->medialib_get_info($id)->wait->value; + } or return; my %metadata = map { $_ => exists $minfo->{$_} ? (values $minfo->{$_})[0] : undef } CONVERSION_SPECIFIERS; my $str=$format;