add_bool( "qt-recentplay", true, NULL, RECENTPLAY_TEXT,
RECENTPLAY_TEXT, false );
- add_string( "qt-recentplay-filter", "xxx|porn", NULL,
+ add_string( "qt-recentplay-filter", "", NULL,
RECENTPLAY_FILTER_TEXT, RECENTPLAY_FILTER_LONGTEXT, false );
add_bool( "qt-adv-options", false, NULL, ADVANCED_OPTIONS_TEXT,
isActive = config_GetInt( p_intf, "qt-recentplay" );
char* psz_tmp = config_GetPsz( p_intf, "qt-recentplay-filter" );
- filter = new QRegExp( psz_tmp, Qt::CaseInsensitive );
+ if( psz_tmp && *psz_tmp )
+ filter = new QRegExp( psz_tmp, Qt::CaseInsensitive );
+ else
+ filter = NULL;
free( psz_tmp );
load();
void RecentsMRL::addRecent( const QString &mrl )
{
- if ( !isActive || filter->indexIn( mrl ) >= 0 )
+ if ( !isActive || ( filter && filter->indexIn( mrl ) >= 0 ) )
return;
msg_Dbg( p_intf, "Adding a new MRL to recent ones: %s", qtu( mrl ) );
for( int i = 0; i < list.size(); ++i )
{
- if (filter->indexIn( list.at(i) ) == -1)
+ if ( !filter && filter->indexIn( list.at(i) ) == -1 )
stack->append( list.at(i) );
}
}