]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/playlist/sorting.h
Add a function to get the Title and fallback to the name if the title is empty.
[vlc] / modules / gui / qt4 / components / playlist / sorting.h
index bcbdf8c933603c3438707c8ff8118fa67b5d80e3..21e3f28bf9510e7eb4a4393e6b96fa7890418559 100644 (file)
@@ -63,7 +63,6 @@ static const char * psz_column_title( uint32_t i_column )
  * Returned value has to be freed */
 static char * psz_column_meta( input_item_t *p_item, uint32_t i_column )
 {
-    char *psz;
     int i_duration;
     char psz_duration[MSTRTIME_MAX_SIZE];
     switch( i_column )
@@ -71,10 +70,7 @@ static char * psz_column_meta( input_item_t *p_item, uint32_t i_column )
     case COLUMN_NUMBER:
         return NULL;
     case COLUMN_TITLE:
-        psz = input_item_GetTitle( p_item );
-        if( !psz )
-            psz = input_item_GetName( p_item );
-        return psz;
+        return input_item_GetTitleFbName( p_item );
     case COLUMN_DURATION:
         i_duration = input_item_GetDuration( p_item ) / 1000000;
         secstotimestr( psz_duration, i_duration );