Quieten logging: move many info to debug
This commit is contained in:
parent
bd7fb79610
commit
0c76227bbc
@ -278,7 +278,7 @@ def normalise_track(path: str) -> None:
|
|||||||
# Check type
|
# Check type
|
||||||
ftype = os.path.splitext(path)[1][1:]
|
ftype = os.path.splitext(path)[1][1:]
|
||||||
if ftype not in ["mp3", "flac"]:
|
if ftype not in ["mp3", "flac"]:
|
||||||
log.info(
|
log.error(
|
||||||
f"helpers.normalise_track({path}): " f"File type {ftype} not implemented"
|
f"helpers.normalise_track({path}): " f"File type {ftype} not implemented"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -524,7 +524,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
) -> Optional[Playlists]:
|
) -> Optional[Playlists]:
|
||||||
"""Create new playlist"""
|
"""Create new playlist"""
|
||||||
|
|
||||||
log.info(f"create_playlist({playlist_name=}")
|
log.debug(f"create_playlist({playlist_name=}")
|
||||||
|
|
||||||
playlist_name = self.solicit_playlist_name(session)
|
playlist_name = self.solicit_playlist_name(session)
|
||||||
if not playlist_name:
|
if not playlist_name:
|
||||||
@ -575,7 +575,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
self.move_source_rows = self.active_tab().get_selected_rows()
|
self.move_source_rows = self.active_tab().get_selected_rows()
|
||||||
self.move_source_model = self.active_proxy_model()
|
self.move_source_model = self.active_proxy_model()
|
||||||
|
|
||||||
log.info(f"cut_rows(): {self.move_source_rows=} {self.move_source_model=}")
|
log.debug(f"cut_rows(): {self.move_source_rows=} {self.move_source_model=}")
|
||||||
|
|
||||||
def debug(self):
|
def debug(self):
|
||||||
"""Invoke debugger"""
|
"""Invoke debugger"""
|
||||||
|
|||||||
@ -329,7 +329,7 @@ class PlaylistModel(QAbstractTableModel):
|
|||||||
|
|
||||||
with db.Session() as session:
|
with db.Session() as session:
|
||||||
for row_number in sorted(row_numbers, reverse=True):
|
for row_number in sorted(row_numbers, reverse=True):
|
||||||
log.info(f"{self}: delete_rows(), {row_number=}")
|
log.debug(f"{self}: delete_rows(), {row_number=}")
|
||||||
super().beginRemoveRows(QModelIndex(), row_number, row_number)
|
super().beginRemoveRows(QModelIndex(), row_number, row_number)
|
||||||
# We need to remove data from the underlying data store,
|
# We need to remove data from the underlying data store,
|
||||||
# which is the database, but we cache in
|
# which is the database, but we cache in
|
||||||
@ -480,7 +480,7 @@ class PlaylistModel(QAbstractTableModel):
|
|||||||
(ie, ignore the first, not-yet-duplicate, track).
|
(ie, ignore the first, not-yet-duplicate, track).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
log.info(f"{self}: get_duplicate_rows() called")
|
log.debug(f"{self}: get_duplicate_rows() called")
|
||||||
|
|
||||||
found = []
|
found = []
|
||||||
result = []
|
result = []
|
||||||
@ -494,7 +494,7 @@ class PlaylistModel(QAbstractTableModel):
|
|||||||
else:
|
else:
|
||||||
found.append(track_id)
|
found.append(track_id)
|
||||||
|
|
||||||
log.info(f"{self}: get_duplicate_rows() returned: {result=}")
|
log.debug(f"{self}: get_duplicate_rows() returned: {result=}")
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def _get_new_row_number(self, proposed_row_number: Optional[int]) -> int:
|
def _get_new_row_number(self, proposed_row_number: Optional[int]) -> int:
|
||||||
@ -884,7 +884,7 @@ class PlaylistModel(QAbstractTableModel):
|
|||||||
Move existing_rat track to new_row_number and append note to any existing note
|
Move existing_rat track to new_row_number and append note to any existing note
|
||||||
"""
|
"""
|
||||||
|
|
||||||
log.info(f"{self}: move_track_add_note({new_row_number=}, {existing_rat=}, {note=}")
|
log.debug(f"{self}: move_track_add_note({new_row_number=}, {existing_rat=}, {note=}")
|
||||||
|
|
||||||
if note:
|
if note:
|
||||||
with db.Session() as session:
|
with db.Session() as session:
|
||||||
@ -911,7 +911,7 @@ class PlaylistModel(QAbstractTableModel):
|
|||||||
Add the existing_rat track details to the existing header at header_row_number
|
Add the existing_rat track details to the existing header at header_row_number
|
||||||
"""
|
"""
|
||||||
|
|
||||||
log.info(f"{self}: move_track_to_header({header_row_number=}, {existing_rat=}, {note=}")
|
log.debug(f"{self}: move_track_to_header({header_row_number=}, {existing_rat=}, {note=}")
|
||||||
|
|
||||||
if existing_rat.track_id:
|
if existing_rat.track_id:
|
||||||
if note and existing_rat.note:
|
if note and existing_rat.note:
|
||||||
@ -925,7 +925,7 @@ class PlaylistModel(QAbstractTableModel):
|
|||||||
and execute any found
|
and execute any found
|
||||||
"""
|
"""
|
||||||
|
|
||||||
log.info(f"{self}: obs_scene_change({row_number=})")
|
log.debug(f"{self}: obs_scene_change({row_number=})")
|
||||||
|
|
||||||
# Check any headers before this row
|
# Check any headers before this row
|
||||||
idx = row_number - 1
|
idx = row_number - 1
|
||||||
@ -949,7 +949,7 @@ class PlaylistModel(QAbstractTableModel):
|
|||||||
sceneName=scene_name
|
sceneName=scene_name
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
log.info(f"{self}: OBS scene changed to '{scene_name}'")
|
log.debug(f"{self}: OBS scene changed to '{scene_name}'")
|
||||||
continue
|
continue
|
||||||
except obswebsocket.exceptions.ConnectionFailure:
|
except obswebsocket.exceptions.ConnectionFailure:
|
||||||
log.error(f"{self}: OBS connection refused")
|
log.error(f"{self}: OBS connection refused")
|
||||||
@ -964,7 +964,7 @@ class PlaylistModel(QAbstractTableModel):
|
|||||||
- update display
|
- update display
|
||||||
"""
|
"""
|
||||||
|
|
||||||
log.info(f"{self}: previous_track_ended()")
|
log.debug(f"{self}: previous_track_ended()")
|
||||||
|
|
||||||
# Sanity check
|
# Sanity check
|
||||||
if not track_sequence.previous:
|
if not track_sequence.previous:
|
||||||
@ -999,7 +999,7 @@ class PlaylistModel(QAbstractTableModel):
|
|||||||
Remove track from row, retaining row as a header row
|
Remove track from row, retaining row as a header row
|
||||||
"""
|
"""
|
||||||
|
|
||||||
log.info(f"{self}: remove_track({row_number=})")
|
log.debug(f"{self}: remove_track({row_number=})")
|
||||||
|
|
||||||
with db.Session() as session:
|
with db.Session() as session:
|
||||||
playlist_row = session.get(
|
playlist_row = session.get(
|
||||||
|
|||||||
@ -344,7 +344,7 @@ class PlaylistTab(QTableView):
|
|||||||
else:
|
else:
|
||||||
self.musicmuster.lblSumPlaytime.setText("")
|
self.musicmuster.lblSumPlaytime.setText("")
|
||||||
else:
|
else:
|
||||||
log.info(
|
log.debug(
|
||||||
f"playlists.py.selectionChanged: {self.musicmuster.disable_selection_timing=}"
|
f"playlists.py.selectionChanged: {self.musicmuster.disable_selection_timing=}"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -397,7 +397,7 @@ class PlaylistTab(QTableView):
|
|||||||
else False.
|
else False.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
log.info(f"_audacity({cmd=})")
|
log.debug(f"_audacity({cmd=})")
|
||||||
|
|
||||||
# Notify user if audacity not running
|
# Notify user if audacity not running
|
||||||
if "audacity" not in [i.name() for i in psutil.process_iter()]:
|
if "audacity" not in [i.name() for i in psutil.process_iter()]:
|
||||||
@ -433,7 +433,7 @@ class PlaylistTab(QTableView):
|
|||||||
log.error(f"_audactity_command {msgs=}")
|
log.error(f"_audactity_command {msgs=}")
|
||||||
return False
|
return False
|
||||||
if timing:
|
if timing:
|
||||||
log.info(f"_audactity_command {timing=}")
|
log.debug(f"_audactity_command {timing=}")
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@ -636,7 +636,7 @@ class PlaylistTab(QTableView):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
rows_to_delete = self.get_selected_rows()
|
rows_to_delete = self.get_selected_rows()
|
||||||
log.info(f"_delete_rows({rows_to_delete=}")
|
log.debug(f"_delete_rows({rows_to_delete=}")
|
||||||
row_count = len(rows_to_delete)
|
row_count = len(rows_to_delete)
|
||||||
if row_count < 1:
|
if row_count < 1:
|
||||||
return
|
return
|
||||||
@ -775,7 +775,7 @@ class PlaylistTab(QTableView):
|
|||||||
if status:
|
if status:
|
||||||
self.musicmuster.audacity_file_path = path
|
self.musicmuster.audacity_file_path = path
|
||||||
|
|
||||||
log.info(f"_open_in_audacity {path=}, {status=}")
|
log.debug(f"_open_in_audacity {path=}, {status=}")
|
||||||
|
|
||||||
def _rescan(self, row_number: int) -> None:
|
def _rescan(self, row_number: int) -> None:
|
||||||
"""Rescan track"""
|
"""Rescan track"""
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user