More track timing cleanups
This commit is contained in:
parent
3c884e54ca
commit
7658dc354c
@ -1477,13 +1477,10 @@ class PlaylistModel(QAbstractTableModel):
|
|||||||
# Update current track details now so that they are available
|
# Update current track details now so that they are available
|
||||||
# when we deal with next track row which may be above current
|
# when we deal with next track row which may be above current
|
||||||
# track row.
|
# track row.
|
||||||
self.playlist_rows[
|
self.playlist_rows[current_track_row].set_start(
|
||||||
current_track_row
|
update_rows, track_sequence.current.start_time
|
||||||
].start_time = track_sequence.current.start_time
|
)
|
||||||
self.playlist_rows[
|
|
||||||
current_track_row
|
|
||||||
].end_time = track_sequence.current.end_time
|
|
||||||
update_rows.append(current_track_row)
|
|
||||||
if track_sequence.next:
|
if track_sequence.next:
|
||||||
next_track_row = track_sequence.next.row_number
|
next_track_row = track_sequence.next.row_number
|
||||||
|
|
||||||
@ -1494,8 +1491,8 @@ class PlaylistModel(QAbstractTableModel):
|
|||||||
# unreadable tracks or for the current track, handled above.
|
# unreadable tracks or for the current track, handled above.
|
||||||
if (
|
if (
|
||||||
prd.played
|
prd.played
|
||||||
|
or row_number == current_track_row
|
||||||
or (prd.path and file_is_unreadable(prd.path))
|
or (prd.path and file_is_unreadable(prd.path))
|
||||||
or (current_track_row and row_number == current_track_row)
|
|
||||||
):
|
):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@ -1508,12 +1505,13 @@ class PlaylistModel(QAbstractTableModel):
|
|||||||
|
|
||||||
# Set start time for next row if we have a current track
|
# Set start time for next row if we have a current track
|
||||||
if (
|
if (
|
||||||
next_track_row
|
row_number == next_track_row
|
||||||
and row_number == next_track_row
|
|
||||||
and track_sequence.current
|
and track_sequence.current
|
||||||
and track_sequence.current.end_time
|
and track_sequence.current.end_time
|
||||||
):
|
):
|
||||||
next_start_time = prd.set_start(update_rows, track_sequence.current.end_time)
|
next_start_time = prd.set_start(
|
||||||
|
update_rows, track_sequence.current.end_time
|
||||||
|
)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# If we're between the current and next row, zero out
|
# If we're between the current and next row, zero out
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user