Commit 720f0f1b authored by Francois Cartegnie's avatar Francois Cartegnie

sql_ml: wrong album update predicate.

If psz_album is NULL you have no data to insert.
If you have an id then the value is already in database and only empty
string can erase it.
parent eb7a298f
...@@ -446,7 +446,7 @@ int BuildUpdate( media_library_t *p_ml, ...@@ -446,7 +446,7 @@ int BuildUpdate( media_library_t *p_ml,
exitfor: exitfor:
/* TODO: Album artist. Verify albumart */ /* TODO: Album artist. Verify albumart */
if( i_album_id <= 0 || ( psz_album && *psz_album ) ) if( i_album_id <= 0 && psz_album )
{ {
i_album_id = ml_GetAlbumId( p_ml, psz_album ); i_album_id = ml_GetAlbumId( p_ml, psz_album );
if( i_album_id < 0 ) //0 is Unknown if( i_album_id < 0 ) //0 is Unknown
......
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