Commit d06bfc8a authored by Xavier Martin's avatar Xavier Martin

Move playlist item in the interface http

parent 77fa4675
...@@ -1254,6 +1254,7 @@ enum macroType ...@@ -1254,6 +1254,7 @@ enum macroType
MVLC_SEEK, MVLC_SEEK,
MVLC_KEEP, MVLC_KEEP,
MVLC_SORT, MVLC_SORT,
MVLC_MOVE,
MVLC_VOLUME, MVLC_VOLUME,
MVLC_FULLSCREEN, MVLC_FULLSCREEN,
...@@ -1297,6 +1298,7 @@ StrToMacroTypeTab [] = ...@@ -1297,6 +1298,7 @@ StrToMacroTypeTab [] =
{ "delete", MVLC_DEL }, { "delete", MVLC_DEL },
{ "empty", MVLC_EMPTY }, { "empty", MVLC_EMPTY },
{ "sort", MVLC_SORT }, { "sort", MVLC_SORT },
{ "move", MVLC_MOVE },
/* admin control */ /* admin control */
{ "close", MVLC_CLOSE }, { "close", MVLC_CLOSE },
...@@ -1798,7 +1800,7 @@ static void MacroDo( httpd_file_sys_t *p_args, ...@@ -1798,7 +1800,7 @@ static void MacroDo( httpd_file_sys_t *p_args,
{ {
playlist_SortAuthor( p_sys->p_playlist , i_order ); playlist_SortAuthor( p_sys->p_playlist , i_order );
msg_Dbg( p_intf, "requested playlist sort by author (%d)" , i_order ); msg_Dbg( p_intf, "requested playlist sort by author (%d)" , i_order );
} else if( !strcmp( type , "Shuffle" ) ) } else if( !strcmp( type , "shuffle" ) )
{ {
playlist_Sort( p_sys->p_playlist , SORT_RANDOM, ORDER_NORMAL ); playlist_Sort( p_sys->p_playlist , SORT_RANDOM, ORDER_NORMAL );
msg_Dbg( p_intf, "requested playlist shuffle"); msg_Dbg( p_intf, "requested playlist shuffle");
...@@ -1806,6 +1808,20 @@ static void MacroDo( httpd_file_sys_t *p_args, ...@@ -1806,6 +1808,20 @@ static void MacroDo( httpd_file_sys_t *p_args,
break; break;
} }
case MVLC_MOVE:
{
char psz_pos[6];
char psz_newpos[6];
int i_pos;
int i_newpos;
uri_extract_value( p_request, "psz_pos", psz_pos, 6 );
uri_extract_value( p_request, "psz_newpos", psz_newpos, 6 );
i_pos = atoi( psz_pos );
i_newpos = atoi( psz_newpos );
playlist_Move( p_sys->p_playlist, i_pos, i_newpos + 1 );
msg_Dbg( p_intf, "requested move playlist item %d to %d", i_pos, i_newpos);
break;
}
/* admin function */ /* admin function */
case MVLC_CLOSE: case MVLC_CLOSE:
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<meta http-equiv="refresh" content="0;URL=/" /> <meta http-equiv="refresh" content="0;URL=/" />
<vlc id="end" /> <vlc id="end" />
<vlc id="control" param1="stop,pause,previous,next,add,sout,play,delete,empty,seek,fullscreen,keep,volume,sort" /> <vlc id="control" param1="stop,pause,previous,next,add,sout,play,delete,empty,seek,fullscreen,keep,volume,sort,move" />
<vlc id="set" param1="sout" param2="string" /> <vlc id="set" param1="sout" param2="string" />
</head> </head>
<body> <body>
...@@ -85,6 +85,14 @@ ...@@ -85,6 +85,14 @@
</form> </form>
</div> </div>
<div class="sectitle">Move Item</div>
<div class="section">
<form method="get" action="">
Move the item number <input type="text" name="psz_pos" size="5" /> to <input type="text" name="psz_newpos" size="5" /> <input type="submit" name="control" value="move" />
</form>
</div>
</div>
<div class="sectitle">VLC Playlist</div> <div class="sectitle">VLC Playlist</div>
<div class="section"> <div class="section">
<form method="get" action=""> <form method="get" action="">
...@@ -96,7 +104,7 @@ ...@@ -96,7 +104,7 @@
<option value="title">title</option> <option value="title">title</option>
<option value="group">group</option> <option value="group">group</option>
<option value="author">author</option> <option value="author">author</option>
<option value="Shuffle">Shuffle</option> <option value="shuffle">shuffle</option>
</select> with </select> with
<select name="order"> <select name="order">
<option value="0">normal order</option> <option value="0">normal order</option>
......
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