diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2012-12-23 12:44:50 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2012-12-23 12:44:50 +0100 |
commit | 1e45aafaf066dc1c9cc1bfb80ddea4c23f3d1c1b (patch) | |
tree | 5ff3c56133c06992bb64f0972085911548f62040 | |
parent | 017fbf1b8ce39d978ff3f8a94e0acac9ce33ea81 (diff) |
Fixed track ordering.
-rw-r--r-- | db.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -135,8 +135,8 @@ class Track(Base): album_id = Column(Integer, ForeignKey('albums.id')) directory = relationship(Directory, backref = backref('tracks', order_by = filename)) - artist = relationship(Artist, backref = backref('tracks')) - album = relationship(Album, backref = backref('tracks')) + artist = relationship(Artist, backref = backref('tracks', order_by = [num, file_index, filename, name])) + album = relationship(Album, backref = backref('tracks', order_by = [num, file_index, filename, name]), order_by = name) def __init__(self, name, num, filename, file_index, directory_id, artist_id, album_id): self.name = name |