Compare commits

..

No commits in common. "69afb2986eebc26d87531985ec42579f50152a35" and "bf67866f8a21f4f8943ef6dd076256298547dda6" have entirely different histories.

2 changed files with 33 additions and 28 deletions

View File

@ -99,28 +99,6 @@ class Window(QMainWindow, Ui_MainWindow):
self.timer.start(Config.TIMER_MS) self.timer.start(Config.TIMER_MS)
self.connect_signals_slots() self.connect_signals_slots()
def about(self) -> None:
"""Get git tag and database name"""
try:
git_tag = str(
subprocess.check_output(
['git', 'describe'], stderr=subprocess.STDOUT
)
).strip('\'b\\n')
except subprocess.CalledProcessError as exc_info:
git_tag = str(exc_info.output)
with Session() as session:
dbname = session.bind.engine.url.database
QMessageBox.information(
self,
"About",
f"MusicMuster {git_tag}\n\nDatabase: {dbname}",
QMessageBox.Ok
)
def clear_selection(self) -> None: def clear_selection(self) -> None:
""" Clear selected row""" """ Clear selected row"""
@ -430,6 +408,28 @@ class Window(QMainWindow, Ui_MainWindow):
self.stop_playing(fade=True) self.stop_playing(fade=True)
def about(self) -> None:
"""Get git tag and database name"""
try:
git_tag = str(
subprocess.check_output(
['git', 'describe'], stderr=subprocess.STDOUT
)
).strip('\'b\\n')
except subprocess.CalledProcessError as exc_info:
git_tag = str(exc_info.output)
with Session() as session:
dbname = session.bind.engine.url.database
QMessageBox.information(
self,
"About",
f"MusicMuster {git_tag}\n\nDatabase: {dbname}",
QMessageBox.Ok
)
def get_one_track(self, session: Session) -> Optional[Tracks]: def get_one_track(self, session: Session) -> Optional[Tracks]:
"""Show dialog box to select one track and return it to caller""" """Show dialog box to select one track and return it to caller"""

View File

@ -465,7 +465,6 @@ class PlaylistTab(QTableWidget):
self.edit_cell_type = None self.edit_cell_type = None
self.musicmuster.enable_play_next_controls() self.musicmuster.enable_play_next_controls()
self.musicmuster.actionSetNext.setEnabled(True)
super(PlaylistTab, self).closeEditor(editor, hint) super(PlaylistTab, self).closeEditor(editor, hint)
@ -508,7 +507,6 @@ class PlaylistTab(QTableWidget):
# Disable play controls so that keyboard input doesn't # Disable play controls so that keyboard input doesn't
# disturb playing # disturb playing
self.musicmuster.disable_play_next_controls() self.musicmuster.disable_play_next_controls()
self.musicmuster.actionSetNext.setEnabled(False)
# If this is a note cell, we need to remove any existing section # If this is a note cell, we need to remove any existing section
# timing so user can't edit that. Keep it simple: refresh text # timing so user can't edit that. Keep it simple: refresh text
@ -1193,6 +1191,11 @@ class PlaylistTab(QTableWidget):
# Does it delimit a section? # Does it delimit a section?
if section_start_plr is not None: if section_start_plr is not None:
if note_text.endswith("-"): if note_text.endswith("-"):
log.debug(
"line 1165: "
f"self._update_note_text({section_start_plr=},"
f"self._get_section_timing_string({section_time=})"
)
self._update_note_text( self._update_note_text(
section_start_plr, section_start_plr,
self._get_section_timing_string(section_time) self._get_section_timing_string(section_time)
@ -1214,6 +1217,11 @@ class PlaylistTab(QTableWidget):
# Have we had a section start but not end? # Have we had a section start but not end?
if section_start_plr is not None: if section_start_plr is not None:
log.debug(
"line 1191: "
f"self._update_note_text({section_start_plr=},"
f"self._get_section_timing_string({section_time=})"
)
self._update_note_text( self._update_note_text(
section_start_plr, section_start_plr,
self._get_section_timing_string(section_time, no_end=True) self._get_section_timing_string(section_time, no_end=True)
@ -1240,10 +1248,7 @@ class PlaylistTab(QTableWidget):
# Update attributes of row # Update attributes of row
self.item(row, USERDATA).setData(self.ROW_TRACK_ID, track.id) self.item(row, USERDATA).setData(self.ROW_TRACK_ID, track.id)
start_gap_item = self.item(row, START_GAP) self.item(row, START_GAP).setText(str(track.start_gap))
start_gap_item.setText(str(track.start_gap))
if track.start_gap and track.start_gap >= 500:
start_gap_item.setBackground(QColor(Config.COLOUR_LONG_START))
self.item(row, TITLE).setText(str(track.title)) self.item(row, TITLE).setText(str(track.title))
self.item(row, ARTIST).setText(str(track.artist)) self.item(row, ARTIST).setText(str(track.artist))
self.item(row, DURATION).setText(ms_to_mmss(track.duration)) self.item(row, DURATION).setText(ms_to_mmss(track.duration))