Commit 0cd5cdd7 authored by Clément Stenac's avatar Clément Stenac

Remember random/loop/repeat

parent 0702b8f8
......@@ -357,14 +357,17 @@ bool PLModel::hasLoop()
void PLModel::setLoop( bool on )
{
var_SetBool( p_playlist, "loop", on ? VLC_TRUE:VLC_FALSE );
config_PutInt( p_playlist, "loop", on ? 1: 0 );
}
void PLModel::setRepeat( bool on )
{
var_SetBool( p_playlist, "repeat", on ? VLC_TRUE:VLC_FALSE );
config_PutInt( p_playlist, "repeat", on ? 1: 0 );
}
void PLModel::setRandom( bool on )
{
var_SetBool( p_playlist, "random", on ? VLC_TRUE:VLC_FALSE );
config_PutInt( p_playlist, "random", on ? 1: 0 );
}
/************************* Lookups *****************************/
......
......@@ -1618,10 +1618,13 @@ vlc_module_begin();
add_category_hint( N_("Playlist"), PLAYLIST_CAT_LONGTEXT , VLC_FALSE );
add_bool( "random", 0, NULL, RANDOM_TEXT, RANDOM_LONGTEXT, VLC_FALSE );
change_short('Z');
change_autosave();
add_bool( "loop", 0, NULL, LOOP_TEXT, LOOP_LONGTEXT, VLC_FALSE );
change_short('L');
change_autosave();
add_bool( "repeat", 0, NULL, REPEAT_TEXT, REPEAT_LONGTEXT, VLC_FALSE );
change_short('R');
change_autosave();
add_bool( "play-and-exit", 0, NULL, PAE_TEXT, PAE_LONGTEXT, VLC_FALSE );
add_bool( "play-and-stop", 0, NULL, PAS_TEXT, PAS_LONGTEXT, VLC_FALSE );
add_bool( "media-library", 1, NULL, ML_TEXT, ML_LONGTEXT, VLC_FALSE );
......
......@@ -32,7 +32,6 @@ PyObject * test (conv_t f, const char *in, const char *out)
printf ("\"%s\" -> \"%s\" ?\n", in, out);
res = f(in);
ASSERT( res != NULL, "NULL result" );
printf( "\n\"%s\"\n",res );
ASSERT( strcmp( res, out ) == NULL, "" );
Py_INCREF( Py_None );
......
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