Permalink
Browse files

Also, use binaries even if info was pulled from a filename

  • Loading branch information...
1 parent c832c91 commit 936ec1222d73e549e0eda2c3d39027cb611a98b2 @brendonh committed Aug 15, 2009
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/audinfo.erl
View
@@ -74,9 +74,12 @@ get_info({match, [Path, Ext]}, Filename) ->
merge(undefined, undefined) -> undefined;
-merge(undefined, Something) -> Something;
-merge(<<"">>, Something) -> Something;
-merge(Something, _Whatever) -> Something.
+merge(undefined, Something) -> to_bin(Something);
+merge(<<"">>, Something) -> to_bin(Something);
+merge(Something, _Whatever) -> to_bin(Something).
+
+to_bin(Something) when is_list(Something) -> list_to_binary(Something);
+to_bin(Other) -> Other.
get_metadata("mp3", Filename) ->

0 comments on commit 936ec12

Please sign in to comment.