Compare commits
3 Commits
01b531aabf
...
1a4f842f1f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a4f842f1f | ||
|
|
69dd0235a0 | ||
|
|
ab858a62fd |
@ -420,6 +420,9 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
# the playlistis opened.
|
||||
destination_visible_playlist_tab = None
|
||||
for tab in range(self.tabPlaylist.count()):
|
||||
# Non-playlist tabs won't have ids
|
||||
if not hasattr(self.tabPlaylist.widget(tab), 'id'):
|
||||
continue
|
||||
if self.tabPlaylist.widget(tab).id == dlg.plid:
|
||||
destination_visible_playlist_tab = (
|
||||
self.tabPlaylist.widget(tab))
|
||||
|
||||
@ -1032,10 +1032,9 @@ class PlaylistTab(QTableWidget):
|
||||
# Set colour
|
||||
note_colour = Config.COLOUR_NOTES_PLAYLIST
|
||||
note_text = self.item(row, self.COL_TITLE).text()
|
||||
note_tokens = note_text.split(":", 1)
|
||||
if len(note_tokens) == 2:
|
||||
if note_tokens[0] in Config.NOTE_COLOURS:
|
||||
note_colour = Config.NOTE_COLOURS[note_tokens[0]]
|
||||
for colour_token in Config.NOTE_COLOURS.keys():
|
||||
if note_text.lower().startswith(colour_token.lower()):
|
||||
note_colour = Config.NOTE_COLOURS[colour_token]
|
||||
self._set_row_colour(
|
||||
row, QColor(note_colour)
|
||||
)
|
||||
@ -1052,6 +1051,10 @@ class PlaylistTab(QTableWidget):
|
||||
# Set start time
|
||||
self._set_row_start_time(
|
||||
row, self.current_track_start_time)
|
||||
last_played_str = get_relative_date(
|
||||
self.current_track_start_time)
|
||||
self.item(row, self.COL_LAST_PLAYED).setText(
|
||||
last_played_str)
|
||||
# Calculate next_start_time
|
||||
next_start_time = self._calculate_next_start_time(
|
||||
session, row, self.current_track_start_time)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user