<div dir="ltr">there is no simple way to check whether all elements have been played, it would require me keep track of everything as well as managing adding / removing elements from the playlist.<div><br></div><div>my patch does the following: when the NextItem function is invoked as result of automatically advancing. it checks if the last element has been played and if so: shuffles the playlist and restarts with element 0.</div>
<div><br></div><div>when using the next button the NextItem function works different. instead of simply increment i_current_index it uses the p_sys->request mechanism to figure out which element to play next. firstly i am afraid of breaking stuff when i alter the code to much (i'm not very familiar with the source code). secondly when i add shuffle the same way i did on the other part, there won't be a guarantee every element is played once before shuffling again.</div>
<div><br></div><div>reason: NextItem gets told which element to play next. if i reshuffle the playlist this next element which should be played might not be the first element of the new order, hence some elements are not played before the last one is reached.</div>
<div>if i override the element request in any way i might break the whole request mechanism.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 30, 2013 at 11:22 PM, Jean-Baptiste Kempf <span dir="ltr"><<a href="mailto:jb@videolan.org" target="_blank">jb@videolan.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 30 Sep, Alex Warhawk wrote :<br>
</div><div class="im">> i agree with you, but i only found a way to integrate this for<br>
> automatically advancing to the next element.<br>
> the code which gets executed when hitting the next button is totally<br>
> different hence i was unable to find the right spot to put my code in<br>
> without breaking something or achieving the task fully.<br>
><br>
> example, letting vlc play for ever<br>
> A -> C -> B -(reshuffle)-> B -> C -> A -(reshuffle)-> C -> B -> A etc<br>
><br>
> example, hitting next over and over gain<br>
> A -> C -> B -> A -> C -> B -> A -> C -> B -> etc.<br>
<br>
</div>Why no reshuffle when all of the elements have been played once?<br>
<div class="im HOEnZb"><br>
--<br>
Jean-Baptiste Kempf<br>
<a href="http://www.jbkempf.com/" target="_blank">http://www.jbkempf.com/</a> - <a href="tel:%2B33%20672%20704%20734" value="+33672704734">+33 672 704 734</a><br>
Sent from my Electronic Device<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="https://mailman.videolan.org/listinfo/vlc-devel" target="_blank">https://mailman.videolan.org/listinfo/vlc-devel</a><br>
</div></div></blockquote></div><br></div>