Fix queue section not loading (#6447)

Apparently some devices do not support the SQLite IIF function.
This commit is contained in:
ByteHamster 2023-04-21 22:19:20 +02:00 committed by GitHub
parent 4cdc5d14d9
commit a877809bad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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);