Compare commits
2 Commits
bf67866f8a
...
39f5374b32
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
39f5374b32 | ||
|
|
ed2b919db4 |
@ -99,6 +99,28 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
self.timer.start(Config.TIMER_MS)
|
||||
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:
|
||||
""" Clear selected row"""
|
||||
|
||||
@ -408,28 +430,6 @@ class Window(QMainWindow, Ui_MainWindow):
|
||||
|
||||
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]:
|
||||
"""Show dialog box to select one track and return it to caller"""
|
||||
|
||||
|
||||
@ -465,6 +465,7 @@ class PlaylistTab(QTableWidget):
|
||||
|
||||
self.edit_cell_type = None
|
||||
self.musicmuster.enable_play_next_controls()
|
||||
self.musicmuster.actionSetNext.setEnabled(True)
|
||||
|
||||
super(PlaylistTab, self).closeEditor(editor, hint)
|
||||
|
||||
@ -507,6 +508,7 @@ class PlaylistTab(QTableWidget):
|
||||
# Disable play controls so that keyboard input doesn't
|
||||
# disturb playing
|
||||
self.musicmuster.disable_play_next_controls()
|
||||
self.musicmuster.actionSetNext.setEnabled(False)
|
||||
|
||||
# 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
|
||||
@ -1191,11 +1193,6 @@ class PlaylistTab(QTableWidget):
|
||||
# Does it delimit a section?
|
||||
if section_start_plr is not None:
|
||||
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(
|
||||
section_start_plr,
|
||||
self._get_section_timing_string(section_time)
|
||||
@ -1217,11 +1214,6 @@ class PlaylistTab(QTableWidget):
|
||||
|
||||
# Have we had a section start but not end?
|
||||
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(
|
||||
section_start_plr,
|
||||
self._get_section_timing_string(section_time, no_end=True)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user