mirror of
https://github.com/beetbox/beets.git
synced 2026-01-04 06:53:27 +01:00
Also allow slashes as separator in date fields
This commit is contained in:
parent
50ef028a97
commit
2658edbd5f
1 changed files with 2 additions and 2 deletions
|
|
@ -1088,11 +1088,11 @@ class DateField(MediaField):
|
|||
year, month, and day number. Each number is either an integer or
|
||||
None.
|
||||
"""
|
||||
# Get the underlying data and split on hyphens.
|
||||
# Get the underlying data and split on hyphens and slashes.
|
||||
datestring = super(DateField, self).__get__(mediafile, None)
|
||||
if isinstance(datestring, basestring):
|
||||
datestring = re.sub(r'[Tt ].*$', '', unicode(datestring))
|
||||
items = unicode(datestring).split('-')
|
||||
items = re.split('-|/', unicode(datestring))
|
||||
else:
|
||||
items = []
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue