Fix queue section not loading (#6447)
Apparently some devices do not support the SQLite IIF function.
This commit is contained in:
parent
4cdc5d14d9
commit
a877809bad
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue