Using default None values in Python when assigning split() to a tuple
try:
    track, num_tracks = track_info.split('/', 1)
except:
    track, num_tracks = track_info, None



Honestly, this is not a terrible solution. But you should almost never use except:; you should catch a specific exception.

Here is another way:

tracks, _, num_tracks = text.partition('/')
return int(tracks), int(num_tracks) if num_tracks else None