Remove unused function last_show()

This commit is contained in:
Keith Edmunds 2021-08-14 23:06:56 +01:00
parent 0836f74d17
commit b4da349a8c

View File

@ -130,42 +130,6 @@ class Playdates(Base):
).delete()
session.commit()
@staticmethod
def last_show(session, track):
"""
Return datetime track last played during show time or None
FIXME: hard coded times in here
"""
# dayofweek: 1 = Sunday, 2 = Monday, ..., 7 = Saturday.
friday = 6
after = time(20, 0)
return session.query(Playdates).filter(
(Playdates.track_id == track.id),
(func.dayofweek(Playdates.lastplayed) == friday),
(func.time(Playdates.lastplayed) > after),
).order_by(Playdates.lastplayed.desc()).first()
@staticmethod
def last_show(session, track):
"""
Return datetime track last played during show time or None
FIXME: hard coded times in here
"""
# dayofweek: 1 = Sunday, 2 = Monday, ..., 7 = Saturday.
friday = 6
after = time(20, 0)
return session.query(Playdates).filter(
(Playdates.track_id == track.id),
(func.dayofweek(Playdates.lastplayed) == friday),
(func.time(Playdates.lastplayed) > after),
).order_by(Playdates.lastplayed.desc()).first()
class Playlists(Base):
"""