00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "cmd_playlist.hpp"
00026 #include "../src/vlcproc.hpp"
00027 #include "../utils/var_bool.hpp"
00028
00029
00030 void CmdPlaylistDel::execute()
00031 {
00032 m_rList.delSelected();
00033 }
00034
00035
00036 void CmdPlaylistSort::execute()
00037 {
00038
00039 playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
00040 if( pPlaylist != NULL )
00041 {
00042 playlist_Sort( pPlaylist, SORT_TITLE, ORDER_NORMAL );
00043 }
00044
00045 }
00046
00047
00048 void CmdPlaylistNext::execute()
00049 {
00050 playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
00051 if( pPlaylist != NULL )
00052 {
00053 playlist_Next( pPlaylist );
00054 }
00055 }
00056
00057
00058 void CmdPlaylistPrevious::execute()
00059 {
00060 playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
00061 if( pPlaylist != NULL )
00062 {
00063 playlist_Prev( pPlaylist );
00064 }
00065 }
00066
00067
00068 void CmdPlaylistRandom::execute()
00069 {
00070 playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
00071 if( pPlaylist != NULL )
00072 {
00073 vlc_value_t val;
00074 val.b_bool = m_value;
00075 var_Set( pPlaylist , "random", val);
00076 }
00077 }
00078
00079
00080 void CmdPlaylistLoop::execute()
00081 {
00082 playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
00083 if( pPlaylist != NULL )
00084 {
00085 vlc_value_t val;
00086 val.b_bool = m_value;
00087 var_Set( pPlaylist , "loop", val);
00088 }
00089 }
00090
00091
00092 void CmdPlaylistRepeat::execute()
00093 {
00094 playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
00095 if( pPlaylist != NULL )
00096 {
00097 vlc_value_t val;
00098 val.b_bool = m_value;
00099 var_Set( pPlaylist , "repeat", val);
00100 }
00101 }
00102
00103
00104 void CmdPlaylistLoad::execute()
00105 {
00106 playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
00107 if( pPlaylist != NULL )
00108 {
00109 playlist_Import( pPlaylist, m_file.c_str() );
00110 }
00111 }
00112
00113
00114 void CmdPlaylistSave::execute()
00115 {
00116 playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
00117 if( pPlaylist != NULL )
00118 {
00119
00120
00121 playlist_Export( pPlaylist, m_file.c_str(), "export-m3u" );
00122 }
00123 }
00124