Compare commits
2 Commits
d3999ca63d
...
128fe2925f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
128fe2925f | ||
|
|
84cf22a196 |
@ -643,6 +643,8 @@ class PlaylistRows(Base):
|
|||||||
number from starting_row to end of playlist
|
number from starting_row to end of playlist
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
log.debug(f"(move_rows_down({playlist_id=}, {starting_row=}, {move_by=}")
|
||||||
|
|
||||||
session.execute(
|
session.execute(
|
||||||
update(PlaylistRows)
|
update(PlaylistRows)
|
||||||
.where(
|
.where(
|
||||||
|
|||||||
@ -235,6 +235,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
self.frame_6.hide()
|
self.frame_6.hide()
|
||||||
else:
|
else:
|
||||||
self.carts_init()
|
self.carts_init()
|
||||||
|
self.disable_selection_timing = False
|
||||||
self.enable_play_next_controls()
|
self.enable_play_next_controls()
|
||||||
self.clock_counter = 0
|
self.clock_counter = 0
|
||||||
self.timer10.start(10)
|
self.timer10.start(10)
|
||||||
@ -995,7 +996,11 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
unplayed_rows = self.active_proxy_model().get_unplayed_rows()
|
unplayed_rows = self.active_proxy_model().get_unplayed_rows()
|
||||||
if not unplayed_rows:
|
if not unplayed_rows:
|
||||||
return
|
return
|
||||||
|
# We can get a race condition as selected rows change while
|
||||||
|
# moving so disable selected rows timing for move
|
||||||
|
self.disable_selection_timing = True
|
||||||
self.move_playlist_rows(unplayed_rows)
|
self.move_playlist_rows(unplayed_rows)
|
||||||
|
self.disable_selection_timing = False
|
||||||
|
|
||||||
def new_from_template(self) -> None:
|
def new_from_template(self) -> None:
|
||||||
"""Create new playlist from template"""
|
"""Create new playlist from template"""
|
||||||
@ -1130,7 +1135,7 @@ class Window(QMainWindow, Ui_MainWindow):
|
|||||||
volume = self.music.player.audio_get_volume()
|
volume = self.music.player.audio_get_volume()
|
||||||
if volume < Config.VOLUME_VLC_DEFAULT:
|
if volume < Config.VOLUME_VLC_DEFAULT:
|
||||||
self.music.set_volume()
|
self.music.set_volume()
|
||||||
log.warn(f"Reset from {volume=}")
|
log.warning(f"Reset from {volume=}")
|
||||||
break
|
break
|
||||||
sleep(0.1)
|
sleep(0.1)
|
||||||
|
|
||||||
|
|||||||
@ -292,6 +292,7 @@ class PlaylistTab(QTableView):
|
|||||||
if len(selected_rows) == 0:
|
if len(selected_rows) == 0:
|
||||||
self.musicmuster.lblSumPlaytime.setText("")
|
self.musicmuster.lblSumPlaytime.setText("")
|
||||||
else:
|
else:
|
||||||
|
if not self.musicmuster.disable_selection_timing:
|
||||||
selected_duration = self.source_model.get_rows_duration(
|
selected_duration = self.source_model.get_rows_duration(
|
||||||
self.get_selected_rows()
|
self.get_selected_rows()
|
||||||
)
|
)
|
||||||
@ -301,6 +302,10 @@ class PlaylistTab(QTableView):
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
self.musicmuster.lblSumPlaytime.setText("")
|
self.musicmuster.lblSumPlaytime.setText("")
|
||||||
|
else:
|
||||||
|
log.info(
|
||||||
|
f"playlists.py.selectionChanged: {self.musicmuster.disable_selection_timing=}"
|
||||||
|
)
|
||||||
|
|
||||||
super().selectionChanged(selected, deselected)
|
super().selectionChanged(selected, deselected)
|
||||||
|
|
||||||
@ -676,7 +681,8 @@ class PlaylistTab(QTableView):
|
|||||||
return
|
return
|
||||||
|
|
||||||
self.musicmuster.audacity_file_path = path
|
self.musicmuster.audacity_file_path = path
|
||||||
cmd = f'Import2: Filename="{path}"'
|
escaped_path = path.replace('"', '\\"')
|
||||||
|
cmd = f'Import2: Filename="{escaped_path}"'
|
||||||
status = self._audactity_command(cmd)
|
status = self._audactity_command(cmd)
|
||||||
|
|
||||||
log.info(f"_open_in_audacity {path=}, {status=}")
|
log.info(f"_open_in_audacity {path=}, {status=}")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user