<listitem><para>
<emphasis>playlist.setLoop(false)</emphasis>: Do not loop at playlist end.
</para></listitem>
+<!-- TODO: Enable it for 0.7.3
+ <listitem><para>
+ <emphasis>playlist.setRepeat(true)</emphasis>: Repeat the current playlist item.
+ </para></listitem>
+ <listitem><para>
+ <emphasis>playlist.setRepeat(false)</emphasis>: Stop repeating the current playlist item.
+ </para></listitem>
+-->
<listitem><para>
<emphasis>WindowID.show()</emphasis>: Show the <link linkend="Window">Window</link> whose <link linkend="windowid">id</link> attribute is 'WindowID'.
</para></listitem>
}
}
+
+void CmdPlaylistRepeat::execute()
+{
+ playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
+ if( pPlaylist != NULL )
+ {
+ vlc_value_t val;
+ val.b_bool = m_value;
+ var_Set( pPlaylist , "repeat", val);
+ }
+}
+
bool m_value;
};
+
/// Command to set the loop state
class CmdPlaylistLoop: public CmdGeneric
{
};
+/// Command to set the repeat state
+class CmdPlaylistRepeat: public CmdGeneric
+{
+ public:
+ CmdPlaylistRepeat( intf_thread_t *pIntf, bool value ):
+ CmdGeneric( pIntf ), m_value( value ) {}
+ virtual ~CmdPlaylistRepeat() {}
+
+ /// This method does the real job of the command
+ virtual void execute();
+
+ /// Return the type of the command
+ virtual string getType() const { return "playlist repeat"; }
+
+ private:
+ /// Repeat state
+ bool m_value;
+};
+
#endif
CmdGenericPtr( new CmdPlaylistLoop( getIntf(), true ) );
m_commandMap["playlist.setLoop(false)"] =
CmdGenericPtr( new CmdPlaylistLoop( getIntf(), false ) );
+ m_commandMap["playlist.setRepeat(true)"] =
+ CmdGenericPtr( new CmdPlaylistRepeat( getIntf(), true ) );
+ m_commandMap["playlist.setRepeat(false)"] =
+ CmdGenericPtr( new CmdPlaylistRepeat( getIntf(), false ) );
REGISTER_CMD( "vlc.fullscreen()", CmdFullscreen )
REGISTER_CMD( "vlc.play()", CmdPlay )
REGISTER_CMD( "vlc.pause()", CmdPause )