Skip to content

Commit

Permalink
Merge pull request #42 from sheldonkwoodward/bugfix/36-move-track-fro…
Browse files Browse the repository at this point in the history
…nt-back

Fixed bug in moving tracks to front and back of file.
  • Loading branch information
sheldonkwoodward authored Aug 16, 2019
2 parents 8b42a3d + 576e2d6 commit 1962c96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pymkv/MKVFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def move_track_front(self, track_num):
The track number of the track to move to the front.
"""
if 0 <= track_num < len(self.tracks):
self.tracks.insert(0, self.tracks.pop(self.tracks[track_num]))
self.tracks.insert(0, self.tracks.pop(track_num))
else:
raise IndexError('track index out of range')

Expand All @@ -267,7 +267,7 @@ def move_track_end(self, track_num):
The track number of the track to move to the back.
"""
if 0 <= track_num < len(self.tracks):
self.tracks.append(self.tracks.pop(self.tracks[track_num]))
self.tracks.append(self.tracks.pop(track_num))
else:
raise IndexError('track index out of range')

Expand Down

0 comments on commit 1962c96

Please sign in to comment.