Merge branch 'dev'
This commit is contained in:
commit
89057da7de
@ -134,7 +134,7 @@ class Playdates(Base):
|
|||||||
__tablename__ = "playdates"
|
__tablename__ = "playdates"
|
||||||
|
|
||||||
id: int = Column(Integer, primary_key=True, autoincrement=True)
|
id: int = Column(Integer, primary_key=True, autoincrement=True)
|
||||||
lastplayed = Column(DateTime, index=True, default=None)
|
lastplayed: datetime = Column(DateTime, index=True)
|
||||||
track_id = Column(Integer, ForeignKey("tracks.id"))
|
track_id = Column(Integer, ForeignKey("tracks.id"))
|
||||||
track: "Tracks" = relationship("Tracks", back_populates="playdates")
|
track: "Tracks" = relationship("Tracks", back_populates="playdates")
|
||||||
|
|
||||||
|
|||||||
@ -1967,9 +1967,8 @@ class DbDialog(QDialog):
|
|||||||
track_text = (
|
track_text = (
|
||||||
f"{track.title} - {track.artist} "
|
f"{track.title} - {track.artist} "
|
||||||
f"[{helpers.ms_to_mmss(track.duration)}] "
|
f"[{helpers.ms_to_mmss(track.duration)}] "
|
||||||
|
f"({helpers.get_relative_date(last_played)})"
|
||||||
)
|
)
|
||||||
if show_last_played:
|
|
||||||
track_text += f"({helpers.get_relative_date(last_played)})"
|
|
||||||
t.setText(track_text)
|
t.setText(track_text)
|
||||||
t.setData(Qt.ItemDataRole.UserRole, track)
|
t.setData(Qt.ItemDataRole.UserRole, track)
|
||||||
self.ui.matchList.addItem(t)
|
self.ui.matchList.addItem(t)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user