<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<title></title>
<style type="text/css">code{white-space: pre;}</style>
</head>
<body>
<p>Hi Marcel,</p>
<p>The <code>diff</code> in which this email is a reply to should be sent as properly generated by <code>git format-patch</code>, to make it easier for someone to merge it.</p>
<p>Please see the below links for further information:</p>
<ul>
<li><a href="https://git-scm.com/docs/git-format-patch">Git - git-format-patch Documentation</a></li>
<li><a href="https://git-scm.com/docs/git-send-email">Git - git-send-email Documentation</a></li>
</ul>
<p>In regards to the contents of the <code>diff</code>(s), it <em>LGTM</em>.</p>
<p>On 2016-11-30 21:37, Marcel Schnirring wrote:</p>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> Applied recommendation by Filip Roséen and used return value.
---
include/vlc_playlist.h | 3 ++-
src/playlist/sort.c | 14 ++++++++++++--
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h
index 5fef490..742372c 100644
--- a/include/vlc_playlist.h
+++ b/include/vlc_playlist.h
@@ -186,7 +186,8 @@ struct playlist_t
DEF( SORT_DESCRIPTION )\
DEF( SORT_RATING )\
DEF( SORT_URI )\
- DEF( SORT_DISC_NUMBER )
+ DEF( SORT_DISC_NUMBER )\
+ DEF( SORT_DATE )
#define DEF( s ) s,
enum
diff --git a/src/playlist/sort.c b/src/playlist/sort.c
index 588bd35..68c15a5 100644
--- a/src/playlist/sort.c
+++ b/src/playlist/sort.c
@@ -226,12 +226,22 @@ SORTFN( SORT_ALBUM, first, second )
return i_ret;
}
+SORTFN( SORT_DATE, first, second )
+{
+ int i_ret = meta_sort( first, second, vlc_meta_Date, true );
+ /* Items came from the same date: compare the albums */
+ if( i_ret == 0 )
+ i_ret = proto_SORT_ALBUM( first, second );
+
+ return i_ret;
+}
+
SORTFN( SORT_ARTIST, first, second )
{
int i_ret = meta_sort( first, second, vlc_meta_Artist, false );
- /* Items came from the same artist: compare the albums */
+ /* Items came from the same artist: compare the dates */
if( i_ret == 0 )
- i_ret = proto_SORT_ALBUM( first, second );
+ i_ret = proto_SORT_DATE( first, second );
return i_ret;
}
--
2.7.4
_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
https://mailman.videolan.org/listinfo/vlc-devel</code></pre>
</blockquote>
</body>
</html>