Commit 32ed571b authored by Simon Latapie's avatar Simon Latapie

* src/playlist/item.c : stops the playlist if we delete the currently

   played item
 * doc/intf-http.txt : adding "pl.group"
 * share/http/index.html : little cosmetic change (better according to
   gibalou).
parent 11aaa3f7
......@@ -323,6 +323,7 @@ variable will be displayed (instead of it name).
- index : the index value (to be used for example for the
"delete" control command.
- name
- group : the group number
- "informations" : Create informations for the current playing
stream.
......
......@@ -2,7 +2,7 @@
* http.c : http mini-server ;)
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: http.c,v 1.37 2003/11/20 08:44:30 garf Exp $
* $Id: http.c,v 1.38 2003/11/23 16:24:20 garf Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
* Laurent Aimar <fenrir@via.ecp.fr>
......@@ -1768,9 +1768,8 @@ static void MacroDo( httpd_file_callback_args_t *p_args,
}
case MVLC_DEL:
{
int i_item, *p_items = NULL, i_nb_items = 0, i_current = -1;
int i_item, *p_items = NULL, i_nb_items = 0;
char item[512], *p_parser = p_request;
vlc_value_t val;
/* Get the list of items to delete */
while( (p_parser =
......@@ -1785,16 +1784,6 @@ static void MacroDo( httpd_file_callback_args_t *p_args,
i_nb_items++;
}
/* we should not remove an item while it is played by VLC */
var_Get( p_sys->p_input, "state", &val );
if( val.i_int == PLAYING_S )
{
i_current = p_sys->p_playlist->i_index;
} else
{
i_current = -1;
}
/* The items need to be deleted from in reversed order */
if( i_nb_items )
{
......@@ -1808,13 +1797,10 @@ static void MacroDo( httpd_file_callback_args_t *p_args,
i_index = j;
}
if( p_items[i_index] != i_current )
{
playlist_Delete( p_sys->p_playlist,
p_items[i_index] );
msg_Dbg( p_intf, "requested playlist delete: %d",
p_items[i_index] );
}
playlist_Delete( p_sys->p_playlist,
p_items[i_index] );
msg_Dbg( p_intf, "requested playlist delete: %d",
p_items[i_index] );
p_items[i_index] = -1;
}
}
......
......@@ -6,10 +6,6 @@
<title>VLC Media Player</title>
<link href="/style.css" title="Default" rel="stylesheet" />
<vlc id="if" param1="url_param"/>
<meta http-equiv="refresh" content="0;URL=/" />
<vlc id="end" />
<vlc id="control" param1="stop,pause,previous,next,add,sout,play,delete,empty,seek,fullscreen,keep,volume,sort" />
<vlc id="set" param1="sout" param2="string" />
</head>
......@@ -33,11 +29,6 @@
<input type="submit" name="control" value="fullscreen" />
</td>
</form>
<form>
<td align="right" nowrap="1">
Current Volume: <vlc id="value" param1="volume" /> <input type="text" name="value" size="5"><input type="hidden" name="control" value="volume"><input type="submit" name="Set" value="Set">
</td>
</form>
</tr>
<tr>
<td colspan="2">
......@@ -59,6 +50,13 @@
</table>
</td>
</tr>
<tr>
<form>
<td>
Current Volume: <vlc id="value" param1="volume" /> <input type="text" name="value" size="5"><input type="hidden" name="control" value="volume"><input type="submit" name="Set" value="Set">
</td>
</form>
</tr>
</table>
</div>
<div class="sectitle">Add</div>
......
......@@ -2,7 +2,7 @@
* item.c : Playlist item functions
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: item.c,v 1.2 2003/11/22 12:35:17 sigmunau Exp $
* $Id: item.c,v 1.3 2003/11/23 16:24:20 garf Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -255,6 +255,12 @@ int playlist_Delete( playlist_t * p_playlist, int i_pos )
vlc_value_t val;
vlc_mutex_lock( &p_playlist->object_lock );
/* if i_pos is the current played item, playlist should stop playing it */
if( ( p_playlist->i_status == PLAYLIST_RUNNING) && (p_playlist->i_index == i_pos) )
{
playlist_Command( p_playlist, PLAYLIST_STOP, 0 );
}
if( i_pos >= 0 && i_pos < p_playlist->i_size )
{
msg_Dbg( p_playlist, "deleting playlist item %s ",
......
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