diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2023-04-21 22:19:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-21 22:19:20 +0200 |
commit | a877809bade2a24fe7da992bce29e5e2939981d5 (patch) | |
tree | 74280c0c9f216b1cb13ceefac00ade4145f15710 /storage/database | |
parent | 4cdc5d14d9347cdb3be10553c9c545a045df1cec (diff) | |
download | AntennaPod-a877809bade2a24fe7da992bce29e5e2939981d5.zip |
Fix queue section not loading (#6447)
Apparently some devices do not support the SQLite IIF function.
Diffstat (limited to 'storage/database')
-rw-r--r-- | storage/database/src/main/java/de/danoeh/antennapod/storage/database/PodDBAdapter.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/PodDBAdapter.java b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/PodDBAdapter.java index 74fa6ecc4..35064b605 100644 --- a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/PodDBAdapter.java +++ b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/PodDBAdapter.java @@ -1007,8 +1007,8 @@ public class PodDBAdapter { + " INNER JOIN " + TABLE_NAME_FEED_ITEMS + " ON " + SELECT_KEY_ITEM_ID + " = " + TABLE_NAME_QUEUE + "." + KEY_FEEDITEM + JOIN_FEED_ITEM_AND_MEDIA - + " ORDER BY IIF(" + hasPositionOrRecentlyPlayed - + ", " + TABLE_NAME_FEED_MEDIA + "." + KEY_LAST_PLAYED_TIME + ", 0) DESC , " + + " ORDER BY (CASE WHEN " + hasPositionOrRecentlyPlayed + " THEN " + + TABLE_NAME_FEED_MEDIA + "." + KEY_LAST_PLAYED_TIME + " ELSE 0 END) DESC , " + TABLE_NAME_QUEUE + "." + KEY_ID + " LIMIT " + limit; return db.rawQuery(query, null); |