From bcf50f5c54870759e531a239400a47b64d22e554 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Sat, 18 Oct 2008 14:01:38 +0100 Subject: [PATCH 1/1] Assume initial digits in a track name are a sort key even without the punctuation hints we've previously relied on. This plays better with the default filenames iTunes chooses. Organization: Straylight/Edgeware From: Richard Kettlewell --- lib/configuration.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/configuration.c b/lib/configuration.c index 540084c..28bf8e9 100644 --- a/lib/configuration.c +++ b/lib/configuration.c @@ -1248,7 +1248,7 @@ static void config_postdefaults(struct config *c, int n; static const char *namepart[][4] = { - { "title", "/([0-9]+ *[-:] *)?([^/]+)\\.[a-zA-Z0-9]+$", "$2", "display" }, + { "title", "/([0-9]+ *[-:]? *)?([^/]+)\\.[a-zA-Z0-9]+$", "$2", "display" }, { "title", "/([^/]+)\\.[a-zA-Z0-9]+$", "$1", "sort" }, { "album", "/([^/]+)/[^/]+$", "$1", "*" }, { "artist", "/([^/]+)/[^/]+/[^/]+$", "$1", "*" }, @@ -1257,7 +1257,7 @@ static void config_postdefaults(struct config *c, #define NNAMEPART (int)(sizeof namepart / sizeof *namepart) static const char *transform[][5] = { - { "track", "^.*/([0-9]+ *[-:] *)?([^/]+)\\.[a-zA-Z0-9]+$", "$2", "display", "" }, + { "track", "^.*/([0-9]+ *[-:]? *)?([^/]+)\\.[a-zA-Z0-9]+$", "$2", "display", "" }, { "track", "^.*/([^/]+)\\.[a-zA-Z0-9]+$", "$1", "sort", "" }, { "dir", "^.*/([^/]+)$", "$1", "*", "" }, { "dir", "^(the) ([^/]*)", "$2, $1", "sort", "i", }, -- [mdw]