Skip to content

Commit b5026d1

Browse files
committed
adding support for files with a slash in their trackname
1 parent cf0fdcb commit b5026d1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

python2.7/music-organizer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ def song(filename):
132132
tracknumber = re.findall(r'\d+', os.path.basename(filename).split(' ')[0])[0]
133133
except:
134134
tracknumber = "error"
135+
neatTracknumber = tracknumber.split('/')[0].zfill(2)
135136
print(" artist: " + artist)
136137
print(" title: " + title)
137138
if args.album:
@@ -146,7 +147,7 @@ def song(filename):
146147

147148
neatArtist = toNeat(artist)
148149
if args.numbering:
149-
neatTitle = tracknumber.zfill(2) + "." + toNeat(title)
150+
neatTitle = neatTracknumber + "." + toNeat(title)
150151
else:
151152
neatTitle = toNeat(title)
152153
if args.album:

0 commit comments

Comments
 (0)