mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Get rid of a call to misc:have_eimp()
This commit is contained in:
parent
b970c88941
commit
d3aab2ea18
@ -851,20 +851,15 @@ code_to_message(_Code) -> <<"">>.
|
|||||||
-spec identify(binary(), binary()) -> {ok, media_info()} | pass.
|
-spec identify(binary(), binary()) -> {ok, media_info()} | pass.
|
||||||
|
|
||||||
identify(Path, Data) ->
|
identify(Path, Data) ->
|
||||||
case misc:have_eimp() of
|
case eimp:identify(Data) of
|
||||||
true ->
|
{ok, Info} ->
|
||||||
case eimp:identify(Data) of
|
{ok, #media_info{
|
||||||
{ok, Info} ->
|
type = proplists:get_value(type, Info),
|
||||||
{ok, #media_info{
|
width = proplists:get_value(width, Info),
|
||||||
type = proplists:get_value(type, Info),
|
height = proplists:get_value(height, Info)}};
|
||||||
width = proplists:get_value(width, Info),
|
{error, Why} ->
|
||||||
height = proplists:get_value(height, Info)}};
|
?DEBUG("Cannot identify type of ~s: ~s",
|
||||||
{error, Why} ->
|
[Path, eimp:format_error(Why)]),
|
||||||
?DEBUG("Cannot identify type of ~s: ~s",
|
|
||||||
[Path, eimp:format_error(Why)]),
|
|
||||||
pass
|
|
||||||
end;
|
|
||||||
false ->
|
|
||||||
pass
|
pass
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user