Commit 9b89b833 authored by Rafaël Carré's avatar Rafaël Carré

lua: makes sure metadata is UTF8 encoded (some websites aren't using UTF8 charset)

parent 2e7f3ec5
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <vlc/vlc.h> #include <vlc/vlc.h>
#include <vlc_meta.h> #include <vlc_meta.h>
#include <vlc_charset.h>
#include <lua.h> /* Low level lua C API */ #include <lua.h> /* Low level lua C API */
#include <lauxlib.h> /* Higher level C API */ #include <lauxlib.h> /* Higher level C API */
...@@ -349,8 +350,9 @@ void vlclua_read_meta_data( vlc_object_t *p_this, lua_State *p_state, ...@@ -349,8 +350,9 @@ void vlclua_read_meta_data( vlc_object_t *p_this, lua_State *p_state,
if( lua_isstring( p_state, t ) ) \ if( lua_isstring( p_state, t ) ) \
{ \ { \
psz_value = lua_tostring( p_state, t ); \ psz_value = lua_tostring( p_state, t ); \
msg_Dbg( p_this, #b ": %s", psz_value ); \ EnsureUTF8( psz_value ); \
input_item_Set ## b ( p_input, psz_value ); \ msg_Dbg( p_this, #b ": %s", psz_value ); \
input_item_Set ## b ( p_input, psz_value ); \
} \ } \
lua_pop( p_state, 1 ); /* pop a */ lua_pop( p_state, 1 ); /* pop a */
TRY_META( "title", Title ); TRY_META( "title", Title );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment