Hello Remi,<br><br>I don't fully understand what you mean. The current item remains the same with the patch, even if you sort the playlist. But playlist sorting isn't the original problem here and should not be affected by the patch, as far as I can see.<br>
<br>I think, the bigger problem is that this function is also called internally at some points, therefore this would add redundant code in some code paths.<br><br>Best regards,<br>David<br><br><div class="gmail_quote">2012/7/10 Rémi Denis-Courmont <span dir="ltr"><<a href="mailto:remi@remlab.net" target="_blank">remi@remlab.net</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Hello,<br>
<br>
I don't think the playlist should change the current item when being sorted...<br>
<div><div class="h5"><br>
On Monday 09 July 2012, David Fuhrmann wrote:<br>
> Hi Guys,<br>
><br>
> Currently, I'm trying to fix #4397. The problem is that if you rearrange<br>
> playlist items in the osx gui while another item is playing, the new order<br>
> is not taken into account.<br>
><br>
> Comparing the code from the mac osx and qt gui, I noticed that qt uses<br>
> playlist_TreeMoveMany for drag and drop handling, while the osx gui uses<br>
> playlist_NodeRemoveItem and playlist_NodeInsert.<br>
><br>
> To fix the issue for the osx gui (and probably all other modules which will<br>
> use these functions), I came up with the below solution. But I don't know<br>
> the core good enough, therefore I want to ask for opinions from the core<br>
> experts here. Is this patch ok? Or should this problem be solved in<br>
> another way (using another function, e.g. TreeMoveMany as in the qt ui)?<br>
><br>
> Now, here is the diff:<br>
><br>
> --- a/src/playlist/tree.c<br>
> +++ b/src/playlist/tree.c<br>
> @@ -222,6 +222,9 @@ int playlist_NodeInsert( playlist_t *p_playlist,<br>
> i_position,<br>
> p_item );<br>
> p_item->p_parent = p_parent;<br>
> +<br>
> + pl_priv( p_playlist )->b_reset_currently_playing = true;<br>
> + vlc_cond_signal( &pl_priv( p_playlist )->signal );<br>
> return VLC_SUCCESS;<br>
> }<br>
><br>
><br>
> Best regards,<br>
> David<br>
</div></div>> _______________________________________________<br>
> vlc-devel mailing list<br>
> To unsubscribe or modify your subscription options:<br>
> <a href="http://mailman.videolan.org/listinfo/vlc-devel" target="_blank">http://mailman.videolan.org/listinfo/vlc-devel</a><br>
<span class="HOEnZb"><font color="#888888">--<br>
Rémi Denis-Courmont<br>
<a href="http://www.remlab.info" target="_blank">http://www.remlab.info</a><br>
</font></span></blockquote></div><br>