Skip to content

Commit 7132ad0

Browse files
committed
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.
1 parent d932aa4 commit 7132ad0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

beetsplug/fromfilename.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@
2727

2828
# Filename field extraction patterns.
2929
PATTERNS = [
30-
# "01 - Track 01" and "01": do nothing
31-
r'^(\d+)\s*-\s*track\s*\d$',
32-
r'^\d+$',
33-
3430
# Useful patterns.
3531
r'^(?P<artist>.+)-(?P<title>.+)-(?P<tag>.*)$',
3632
r'^(?P<track>\d+)\s*-(?P<artist>.+)-(?P<title>.+)-(?P<tag>.*)$',
@@ -45,6 +41,7 @@
4541
r'^(?P<track>\d+)\s*-\s*(?P<title>.+)$',
4642
r'^(?P<track>\d+)\s(?P<title>.+)$',
4743
r'^(?P<title>.+) by (?P<artist>.+)$',
44+
r'^(?P<track>\d+).*$',
4845
]
4946

5047
# Titles considered "empty" and in need of replacement.

0 commit comments

Comments
 (0)