From 886089927f0a8dfa8cb25897ac1460a6058591f3 Mon Sep 17 00:00:00 2001 Message-Id: <886089927f0a8dfa8cb25897ac1460a6058591f3.1714903134.git.mdw@distorted.org.uk> From: Mark Wooding Date: Mon, 1 Oct 2007 18:43:10 +0100 Subject: [PATCH] cope with "NN - " as well as "NN" in track names Organization: Straylight/Edgeware From: Richard Kettlewell --- debian/changelog | 6 ++++++ lib/configuration.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index d30aefb..17aae3b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +disorder (1.5.99+dev3) unstable; urgency=low + + * New version for newer Disobedience + + -- Richard Kettlewell Mon, 1 Oct 2007 18:29:43 +0100 + disorder (1.5.99+dev2) unstable; urgency=low * Install images for use by Disobedience diff --git a/lib/configuration.c b/lib/configuration.c index 486a2ab..ae71d63 100644 --- a/lib/configuration.c +++ b/lib/configuration.c @@ -1012,7 +1012,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", "*" }, @@ -1021,7 +1021,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]