diff options
author | Kjetil Ørbekk <orbekk@pvv.ntnu.no> | 2008-09-11 14:14:57 +0200 |
---|---|---|
committer | Kjetil Ørbekk <orbekk@pvv.ntnu.no> | 2008-09-11 14:14:57 +0200 |
commit | 949d5232b8817ce9483b61c8a12f321e533d9b75 (patch) | |
tree | ce2ed5d3fa2e29b9021bee0ce542740593b144ff | |
parent | 62fee797bab835ce7bc9a1b901228cc0cdf93d28 (diff) |
- Fixed track numbers in /Albums/*
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | src/mfs_subr.c | 10 |
2 files changed, 5 insertions, 7 deletions
@@ -2,8 +2,6 @@ v. 0.1 ~~~~~~ -* Fix track numbers in /Albums - * Fix /Genres * BUG: fsync errors with /.config diff --git a/src/mfs_subr.c b/src/mfs_subr.c index 8db6d7a..cbf8f8d 100644 --- a/src/mfs_subr.c +++ b/src/mfs_subr.c @@ -661,9 +661,9 @@ mfs_realpath(const char *path, char **realpath) { break; error = 0; lh = mfs_lookup_start(0, realpath, mfs_lookup_path, - "SELECT filepath FROM song " - "WHERE (title||'.'||extension) LIKE ? AND " - "album LIKE ?"); + "SELECT filepath FROM song WHERE " + "LTRIM(track||' ')||title||'.'||extension LIKE ? " + "AND album LIKE ?"); if (lh == NULL) { error = -EIO; break; @@ -805,8 +805,8 @@ mfs_lookup_album(const char *path, struct filler_data *fd) if (album == NULL) break; lh = mfs_lookup_start(0, fd, mfs_lookup_list, - "SELECT DISTINCT title||'.'||extension FROM song " - "WHERE album LIKE ?"); + "SELECT DISTINCT LTRIM(track||' ')||title||'.'||extension " + "FROM song WHERE album LIKE ?"); mfs_lookup_insert(lh, album, LIST_DATATYPE_STRING); break; } |