From 7132ad094b78ff05a3ff83638acd95fceeee8b1e Mon Sep 17 00:00:00 2001 From: Vrihub Date: Mon, 11 Dec 2017 19:32:53 +0100 Subject: [PATCH] First tentative fix for issue 2738. Don't ignore anymore filenames such as "01.mp3", instead use the number in the filename as track number. --- beetsplug/fromfilename.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/beetsplug/fromfilename.py b/beetsplug/fromfilename.py index 5e1b822c2..7e872ffa9 100644 --- a/beetsplug/fromfilename.py +++ b/beetsplug/fromfilename.py @@ -27,10 +27,6 @@ import six # Filename field extraction patterns. PATTERNS = [ - # "01 - Track 01" and "01": do nothing - r'^(\d+)\s*-\s*track\s*\d$', - r'^\d+$', - # Useful patterns. r'^(?P.+)-(?P.+)-(?P<tag>.*)$', r'^(?P<track>\d+)\s*-(?P<artist>.+)-(?P<title>.+)-(?P<tag>.*)$', @@ -45,6 +41,7 @@ PATTERNS = [ r'^(?P<track>\d+)\s*-\s*(?P<title>.+)$', r'^(?P<track>\d+)\s(?P<title>.+)$', r'^(?P<title>.+) by (?P<artist>.+)$', + r'^(?P<track>\d+).*$', ] # Titles considered "empty" and in need of replacement.