projects
/
app-xmms2-notifier.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f4385cf
)
Prevent crashes
author
Marius Gavrilescu
<marius@ieval.ro>
Sat, 6 Feb 2016 18:15:32 +0000
(18:15 +0000)
committer
Marius Gavrilescu
<marius@ieval.ro>
Sat, 6 Feb 2016 18:15:32 +0000
(18:15 +0000)
lib/App/XMMS2/Notifier.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/App/XMMS2/Notifier.pm
b/lib/App/XMMS2/Notifier.pm
index f61a74aee26ddb10934cc2e0ddd329d27a691b3f..3ce6645126aa158621a51fca498506476e8dd579 100644
(file)
--- a/
lib/App/XMMS2/Notifier.pm
+++ b/
lib/App/XMMS2/Notifier.pm
@@
-25,8
+25,11
@@
sub notify_libnotify{
}
sub notify{
}
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;
my %metadata = map { $_ => exists $minfo->{$_} ? (values $minfo->{$_})[0] : undef } CONVERSION_SPECIFIERS;
my $str=$format;
This page took
0.010704 seconds
and
4
git commands to generate.