… | |
… | |
105 | |
105 | |
106 | if (exists $reply->{event}) { |
106 | if (exists $reply->{event}) { |
107 | if ( |
107 | if ( |
108 | $reply->{event} eq "client-message" |
108 | $reply->{event} eq "client-message" |
109 | and $reply->{args}[0] eq "AnyEvent::MPV" |
109 | and $reply->{args}[0] eq "AnyEvent::MPV" |
110 | and $reply->{args}[1] eq "keyhack" |
|
|
111 | ) { |
110 | ) { |
|
|
111 | if ($reply->{args}[1] eq "key") { |
112 | $self->on_key ($reply->{args}[2]); |
112 | $self->on_key ($reply->{args}[2]); |
|
|
113 | } |
113 | } else { |
114 | } else { |
114 | $self->on_event ($reply->{event}); |
115 | $self->on_event ($reply); |
115 | } |
116 | } |
116 | } elsif (exists $reply->{request_id}) { |
117 | } elsif (exists $reply->{request_id}) { |
117 | my $cv = delete $self->{cmd_cv}{$reply->{request_id}}; |
118 | my $cv = delete $self->{cmd_cv}{$reply->{request_id}}; |
118 | |
119 | |
119 | unless ($cv) { |
120 | unless ($cv) { |