Skip to content

Commit

Permalink
Fixed bug in moving tracks to front and back of file.
Browse files Browse the repository at this point in the history
  • Loading branch information
sheldonkwoodward committed Aug 16, 2019
1 parent 8b42a3d commit 576e2d6
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 576e2d6

Please sign in to comment.