<div dir="ltr">After another week: Are are any issues concerning my two patches remaining?</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><br><div><div style="font-size:12.8000001907349px"><b><font color="#999999">Mit freundlichen Grüßen / Kind regards,</font></b></div><div style="font-size:12.8000001907349px"><font color="#999999">Marcel Schnirring</font></div><div style="font-size:12.8000001907349px"><font color="#999999"><br></font></div><div style="font-size:12.8000001907349px"><font color="#999999" size="1"><i>Heilbronner Strasse 36</i></font></div><div style="font-size:12.8000001907349px"><font color="#999999" size="1"><i>76131 Karlsruhe</i></font></div><div style="font-size:12.8000001907349px"><font color="#999999" size="1"><i>Deutschland / Germany</i></font></div><div style="font-size:12.8000001907349px"><font color="#999999" size="1"><i>Email: <a href="mailto:ms@marcel-schnirring.de" target="_blank">ms@marcel-schnirring.de</a></i></font></div><div style="font-size:12.8000001907349px"><font color="#999999" size="1"><i>Mobile: (+49) 178 198 37 61</i></font></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Nov 30, 2016 at 9:37 PM, Marcel Schnirring <span dir="ltr"><<a href="mailto:ms@marcel-schnirring.de" target="_blank">ms@marcel-schnirring.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Applied recommendation by Filip Roséen and used return value.<br>
---<br>
include/vlc_playlist.h | 3 ++-<br>
src/playlist/sort.c | 14 ++++++++++++--<br>
2 files changed, 14 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h<br>
index 5fef490..742372c 100644<br>
--- a/include/vlc_playlist.h<br>
+++ b/include/vlc_playlist.h<br>
@@ -186,7 +186,8 @@ struct playlist_t<br>
DEF( SORT_DESCRIPTION )\<br>
DEF( SORT_RATING )\<br>
DEF( SORT_URI )\<br>
- DEF( SORT_DISC_NUMBER )<br>
+ DEF( SORT_DISC_NUMBER )\<br>
+ DEF( SORT_DATE )<br>
<br>
#define DEF( s ) s,<br>
enum<br>
diff --git a/src/playlist/sort.c b/src/playlist/sort.c<br>
index 588bd35..68c15a5 100644<br>
--- a/src/playlist/sort.c<br>
+++ b/src/playlist/sort.c<br>
@@ -226,12 +226,22 @@ SORTFN( SORT_ALBUM, first, second )<br>
return i_ret;<br>
}<br>
<br>
+SORTFN( SORT_DATE, first, second )<br>
+{<br>
+ int i_ret = meta_sort( first, second, vlc_meta_Date, true );<br>
+ /* Items came from the same date: compare the albums */<br>
+ if( i_ret == 0 )<br>
+ i_ret = proto_SORT_ALBUM( first, second );<br>
+<br>
+ return i_ret;<br>
+}<br>
+<br>
SORTFN( SORT_ARTIST, first, second )<br>
{<br>
int i_ret = meta_sort( first, second, vlc_meta_Artist, false );<br>
- /* Items came from the same artist: compare the albums */<br>
+ /* Items came from the same artist: compare the dates */<br>
if( i_ret == 0 )<br>
- i_ret = proto_SORT_ALBUM( first, second );<br>
+ i_ret = proto_SORT_DATE( first, second );<br>
<br>
return i_ret;<br>
}<br>
--<br>
2.7.4<br>
</blockquote></div><br></div>