If the feed doesn't have 'Global Refresh' then don't include it in the New Episodes list.
resolves AntennaPod/AntennaPod#286
This commit is contained in:
parent
f290048362
commit
c5d05d338a
|
@ -1131,13 +1131,6 @@ public class PodDBAdapter {
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final Cursor getNewItemIdsCursor() {
|
|
||||||
final String query = "SELECT " + KEY_ID
|
|
||||||
+ " FROM " + TABLE_NAME_FEED_ITEMS
|
|
||||||
+ " WHERE " + KEY_READ + "=" + FeedItem.NEW;
|
|
||||||
return db.rawQuery(query, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a cursor which contains all items of a feed that are considered new.
|
* Returns a cursor which contains all items of a feed that are considered new.
|
||||||
* The returned cursor uses the FEEDITEM_SEL_FI_SMALL selection.
|
* The returned cursor uses the FEEDITEM_SEL_FI_SMALL selection.
|
||||||
|
@ -1157,10 +1150,15 @@ public class PodDBAdapter {
|
||||||
* The returned cursor uses the FEEDITEM_SEL_FI_SMALL selection.
|
* The returned cursor uses the FEEDITEM_SEL_FI_SMALL selection.
|
||||||
*/
|
*/
|
||||||
public final Cursor getNewItemsCursor() {
|
public final Cursor getNewItemsCursor() {
|
||||||
final String query = "SELECT " + SEL_FI_SMALL_STR
|
String[] args = new String[] {
|
||||||
+ " FROM " + TABLE_NAME_FEED_ITEMS
|
SEL_FI_SMALL_STR,
|
||||||
+ " WHERE " + KEY_READ + "=" + FeedItem.NEW
|
TABLE_NAME_FEED_ITEMS,
|
||||||
+ " ORDER BY " + KEY_PUBDATE + " DESC";
|
TABLE_NAME_FEEDS,
|
||||||
|
TABLE_NAME_FEED_ITEMS + "." + KEY_FEED + "=" + TABLE_NAME_FEEDS + "." + KEY_ID,
|
||||||
|
TABLE_NAME_FEED_ITEMS + "." + KEY_READ + "=" + FeedItem.NEW + " AND " + TABLE_NAME_FEEDS + "." + KEY_GLOBAL_REFRESH + " > 0",
|
||||||
|
KEY_PUBDATE + " DESC"
|
||||||
|
};
|
||||||
|
final String query = String.format("SELECT %s FROM %s INNER JOIN %s ON %s WHERE %s ORDER BY %s", args);
|
||||||
Cursor c = db.rawQuery(query, null);
|
Cursor c = db.rawQuery(query, null);
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue