From c0ccf615a25482b7c440b394b8279cee4202598a Mon Sep 17 00:00:00 2001 From: "Y.Tory" <5343692+kagemomiji@users.noreply.github.com> Date: Sat, 21 Oct 2023 23:58:07 +0000 Subject: [PATCH] #306 add ordering by start_position to getChildrenOf --- .../src/main/java/org/airsonic/player/dao/MediaFileDao.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airsonic-main/src/main/java/org/airsonic/player/dao/MediaFileDao.java b/airsonic-main/src/main/java/org/airsonic/player/dao/MediaFileDao.java index c829843c4..76c77e30b 100644 --- a/airsonic-main/src/main/java/org/airsonic/player/dao/MediaFileDao.java +++ b/airsonic-main/src/main/java/org/airsonic/player/dao/MediaFileDao.java @@ -112,7 +112,7 @@ public List getChildrenOf(String path, int folderId, boolean onlyPres */ public List getChildrenOf(String path, int folderId, boolean onlyPresent, boolean noIndexedTracks) { return query("select " + QUERY_COLUMNS + " from media_file where parent_path=? and folder_id=?" + - (onlyPresent ? " and present" : "") + (noIndexedTracks ? " and start_position < 0" : ""), rowMapper, path, folderId); + (onlyPresent ? " and present" : "") + (noIndexedTracks ? " and start_position < 0" : "") + " order by start_position", rowMapper, path, folderId); } public List getFilesInPlaylist(int playlistId) {