if( dir.isEmpty() )
return;
- QString mrl;
-
+ const char *scheme = "directory";
if( dir.endsWith( "/VIDEO_TS", Qt::CaseInsensitive ) )
- mrl = qfu("dvd://") + toNativeSeparators( dir );
- else
- {
- char *uri = make_URI( qtu( dir ), "directory" );
- if( unlikely(uri == NULL) )
- return;
- mrl = qfu(uri);
- free( uri );
- }
+ scheme = "dvd";
- input_item_t *p_input = input_item_New( THEPL, qtu( mrl ), NULL );
+ char *uri = make_URI( qtu( dir ), scheme );
+ if( unlikely(uri == NULL) )
+ return;
+
+ RecentsMRL::getInstance( p_intf )->addRecent( qfu(uri) );
+
+ input_item_t *p_input = input_item_New( THEPL, uri, NULL );
+ free( uri );
if( unlikely( p_input == NULL ) )
return;
playlist_AddInput( THEPL, p_input,
go ? ( PLAYLIST_APPEND | PLAYLIST_GO ) : PLAYLIST_APPEND,
PLAYLIST_END, pl, pl_Unlocked );
- RecentsMRL::getInstance( p_intf )->addRecent( mrl );
if( !go )
input_Read( THEPL, p_input );
vlc_gc_decref( p_input );