mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2024-12-23 15:30:35 +01:00
Retro-actively disable auto download for episodes that were downloaded, were partially or completely played and are not queued currently
This commit is contained in:
parent
8721dab1bc
commit
5f41d422aa
@ -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
Block a user