Reorder functions
This commit is contained in:
parent
bf67866f8a
commit
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"""
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user