Merge pull request #1041 from mfietz/issue/1009-disable-auto-download-for-older-items
Retro-actively disable auto download for older episodes
This commit is contained in:
commit
12093f8627
|
@ -1477,7 +1477,7 @@ public class PodDBAdapter {
|
|||
*/
|
||||
private static class PodDBHelper extends SQLiteOpenHelper {
|
||||
|
||||
private final static int VERSION = 18;
|
||||
private final static int VERSION = 1030002;
|
||||
|
||||
private Context context;
|
||||
|
||||
|
@ -1702,6 +1702,11 @@ public class PodDBAdapter {
|
|||
db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_FEEDS
|
||||
+ " ADD COLUMN " + PodDBAdapter.KEY_AUTO_DELETE_ACTION + " INTEGER DEFAULT 0");
|
||||
}
|
||||
if(oldVersion < 1030002) {
|
||||
db.execSQL("UPDATE FeedItems SET auto_download=0 WHERE " +
|
||||
"(read=1 OR id IN (SELECT id FROM FeedMedia WHERE position>0 OR downloaded=1)) " +
|
||||
"AND id NOT IN (SELECT feeditem FROM Queue)");
|
||||
}
|
||||
EventBus.getDefault().post(ProgressEvent.end());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue