From 008347313f0481e2096b70e2d494055d9e9ebb66 Mon Sep 17 00:00:00 2001 From: Tom Hennen Date: Tue, 4 Aug 2015 21:09:55 -0400 Subject: [PATCH 1/3] 'feeditem' is the id of the FeedItem SQL statement previously used 'id' which was actually the id of the FeedMedia item and not the FeedItem --- .../java/de/danoeh/antennapod/core/storage/PodDBAdapter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java b/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java index f9ac39349..904a416df 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/PodDBAdapter.java @@ -1711,7 +1711,7 @@ public class PodDBAdapter { } 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)) " + + "(read=1 OR id IN (SELECT feeditem FROM FeedMedia WHERE position>0 OR downloaded=1)) " + "AND id NOT IN (SELECT feeditem FROM Queue)"); } EventBus.getDefault().post(ProgressEvent.end()); From fe6796f102bb8c126cfad80d957bffe0cb04fa34 Mon Sep 17 00:00:00 2001 From: Tom Hennen Date: Tue, 4 Aug 2015 21:25:25 -0400 Subject: [PATCH 2/3] Updated version code for RC5 Also updated the oldVersion used by the UPDATE FeedItems sql statement. We don't want to run the 1030002 version ever, and the 1030005 version should fix any users that used the 1030002 version (with the possibility that some items that shouldn't have had auto_download set to 0 did have it set to 0, but accepting that that's not a terrible problem). --- app/src/main/AndroidManifest.xml | 4 ++-- .../java/de/danoeh/antennapod/core/storage/PodDBAdapter.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index d59cca51c..79c5ee6a4 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="1030005" + android:versionName="1.3-RC5">