Better DEBUG messages
This commit is contained in:
parent
2d80e20d5b
commit
04f5a07c3e
@ -492,7 +492,16 @@ class Playlist(QTableWidget):
|
|||||||
def meta_set(self, row, metadata):
|
def meta_set(self, row, metadata):
|
||||||
"Set row metadata"
|
"Set row metadata"
|
||||||
|
|
||||||
DEBUG(f"meta_set(row={row}, metadata={metadata})")
|
if self.item(row, self.COL_TITLE):
|
||||||
|
title = self.item(row, self.COL_TITLE).text()
|
||||||
|
else:
|
||||||
|
title = ""
|
||||||
|
DEBUG(f"meta_set(row={row}, title={title}, metadata={metadata})")
|
||||||
|
if metadata is None and self.current_track and title == self.current_track.title:
|
||||||
|
import ipdb; ipdb.set_trace()
|
||||||
|
if row is None:
|
||||||
|
raise ValueError(f"meta_set() with row=None")
|
||||||
|
|
||||||
self.item(row, self.COL_INDEX).setData(Qt.UserRole, metadata)
|
self.item(row, self.COL_INDEX).setData(Qt.UserRole, metadata)
|
||||||
|
|
||||||
def play_next(self):
|
def play_next(self):
|
||||||
@ -514,6 +523,13 @@ class Playlist(QTableWidget):
|
|||||||
if not self.next_track:
|
if not self.next_track:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
DEBUG(
|
||||||
|
"playlist.play_next(), "
|
||||||
|
f"next_track={self.next_track.title if self.next_track else None} "
|
||||||
|
"current_track="
|
||||||
|
f"{self.current_track.title if self.current_track else None}"
|
||||||
|
)
|
||||||
|
|
||||||
# If there's currently a track playing, fade it.
|
# If there's currently a track playing, fade it.
|
||||||
if self.music.playing():
|
if self.music.playing():
|
||||||
self.previous_track_position = self.music.fade()
|
self.previous_track_position = self.music.fade()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user