}
/* Go back and play the playlist */
- if( b_play )
+ if( b_play && p_playlist->status.p_item &&
+ p_playlist->status.p_item->i_children > 0 )
{
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY,
p_playlist->status.i_view,
- p_playlist->status.p_item, NULL );
+ p_playlist->status.p_item,
+ p_playlist->status.p_item->pp_children[0] );
}
vlc_object_release( p_playlist );
}
/* Go back and play the playlist */
- if( b_play )
+ if( b_play && p_playlist->status.p_item &&
+ p_playlist->status.p_item->i_children > 0 )
{
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY,
p_playlist->status.i_view,
- p_playlist->status.p_item, NULL );
+ p_playlist->status.p_item,
+ p_playlist->status.p_item->pp_children[0] );
}
vlc_object_release( p_playlist );
psz_name = NULL;
}
- if( b_play )
+ if( b_play && p_playlist->status.p_item &&
+ p_playlist->status.p_item->i_children > 0 )
{
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY,
p_playlist->status.i_view,
- p_playlist->status.p_item, NULL );
+ p_playlist->status.p_item,
+ p_playlist->status.p_item->pp_children[0] );
}
vlc_object_release( p_playlist );
return VLC_SUCCESS;
{ "au", "au" },
{ "flac", "flac" },
{ "dv", "dv" },
- { "m3u", "m3u" },
+ { "m3u", "playlist" },
{ "mkv", "mkv" }, { "mka", "mkv" }, { "mks", "mkv" },
{ "mp4", "mp4" }, { "m4a", "mp4" }, { "mov", "mp4" }, { "moov", "mp4" },
{ "mod", "mod" }, { "xm", "mod" },
#ifdef PLAYLIST_DEBUG
if( p_item != NULL )
{
- msg_Dbg( p_playlist, "finding next of %s within %s",
- p_item->input.psz_name, p_node->input.psz_name );
+ msg_Dbg( p_playlist, "finding next of %s within %s - root %s",
+ p_item->input.psz_name, p_node->input.psz_name,
+ p_root->input.psz_name );
}
else
{
- msg_Dbg( p_playlist, "finding something to play within %s",
- p_node->input.psz_name );
+ msg_Dbg( p_playlist, "finding something to play within %s -root %s",
+ p_node->input.psz_name, p_root->input.psz_name );
}
#endif
{
if( p_playlist->b_go_next )
{
+#ifdef PLAYLIST_DEBUG
+ msg_Dbg( p_playlist, "Moving on to next node: search from %s",
+ p_root->input.psz_name );
+#endif
p_next = playlist_RecursiveFindNext( p_playlist, i_view,
p_root, p_item, p_search );
if( p_next == NULL )
}
else
{
+#ifdef PLAYLIST_DEBUG
+ msg_Dbg( p_playlist, "Not moving on to next node: you loose" );
+#endif
return NULL;
}
}
#endif
if( p_parent == p_root )
{
+#ifdef PLAYLIST_DEBUG
+ msg_Dbg( p_playlist, "At root item (%s)",
+ p_root->input.psz_name );
+#endif
/* Hmm, seems it's the end for you, guy ! */
return NULL;
}
#endif
if( p_parent == p_root )
{
+#ifdef PLAYLIST_DEBUG
+ msg_Dbg( p_playlist, "At root item (%s)",
+ p_root->input.psz_name );
+#endif
/* Hmm, seems it's the end for you, guy ! */
return NULL;
}