add error handling for parsing track numbers to integer (fixes #12)
This commit is contained in:
parent
1025b1df1a
commit
826eabb729
1 changed files with 4 additions and 1 deletions
|
|
@ -816,7 +816,10 @@ class MCGTrack:
|
|||
if track is not None and '/' in track:
|
||||
track = track[0: track.index('/')]
|
||||
if track is not None:
|
||||
track = int(track)
|
||||
try:
|
||||
track = int(track)
|
||||
except ValueError:
|
||||
track = 0
|
||||
self._track = track
|
||||
self._length = int(length)
|
||||
if type(date) is list:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue