db: Fix Playlist.get_track_index()
We need to limit the OVER () clause to just pick tracks that are actually on the requested playlist. Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
b4daf0e48c
commit
6913cf992d
|
@ -53,8 +53,9 @@ class Playlist(GObject.GObject):
|
|||
f"FROM tracks "
|
||||
f"INNER JOIN artists USING(artistid) "
|
||||
f"INNER JOIN albums USING(albumid) "
|
||||
f"INNER JOIN discs USING(discid)) "
|
||||
f"WHERE trackid=?", [ track.rowid ])
|
||||
f"INNER JOIN discs USING(discid) "
|
||||
f"WHERE tracks.{self._rowkey}=?) "
|
||||
f"WHERE trackid=?", [ self.rowid, track.rowid ])
|
||||
return cur.fetchone()[1] - 1
|
||||
|
||||
def track_adjusts_current(self, track):
|
||||
|
|
Loading…
Reference in New Issue