Remove unused function last_show()
This commit is contained in:
parent
0836f74d17
commit
b4da349a8c
36
app/model.py
36
app/model.py
@ -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):
|
||||
"""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user