Compare commits

..

No commits in common. "62364fdaf1638f4965c434e7824ca750f977238b" and "a72a86cfcc0d4d89a2a2ba83187a9762226f27cd" have entirely different histories.

2 changed files with 10 additions and 18 deletions

View File

@ -42,7 +42,6 @@ class Config(object):
'track': "#ffff00",
'request': "#7cf000",
'wrap': "#fffacd",
'this month then': "#c256c2",
'story': "#dda0dd",
}
ROOT = os.environ.get('ROOT') or "/home/kae/music"

View File

@ -405,15 +405,9 @@ class PlaylistTab(QTableWidget):
scroll_to = self.item(current_row, self.COL_INDEX)
self.scrollToItem(scroll_to, QAbstractItemView.PositionAtCenter)
# Get next track, but skip tracks already played
search_starting_row = current_row + 1
while True:
next_track_row = self._find_next_track_row(search_starting_row)
# Get next track
next_track_row = self._find_next_track_row()
next_track_id = self._set_next(next_track_row)
if next_track_id not in self.played_tracks:
break
search_starting_row += 1
self._repaint()
return next_track_id
@ -819,7 +813,7 @@ class PlaylistTab(QTableWidget):
if column in [self.COL_TITLE, self.COL_ARTIST]:
self.editItem(item)
def _find_next_track_row(self, starting_row=None):
def _find_next_track_row(self):
"""
Find next track to play.
@ -829,14 +823,13 @@ class PlaylistTab(QTableWidget):
"""
found_next_track = False
if starting_row is None:
current_row = self._meta_get_current()
if current_row is not None:
starting_row = current_row + 1
start = current_row + 1
else:
starting_row = 0
start = 0
notes_rows = self._meta_get_notes()
for row in range(starting_row, self.rowCount()):
for row in range(start, self.rowCount()):
if row in notes_rows:
continue
found_next_track = True