diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2012-06-21 21:16:17 +0200 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2012-06-21 21:16:17 +0200 |
commit | 940f133e4c5646dd0ea370456440066c22fbb062 (patch) | |
tree | 932feb37d55151d4aa2e92b1d27c21d7a4e19106 /src/de/podfetcher | |
parent | eeeff62037d625f3902a6e83e062095fb4c7a1de (diff) | |
download | AntennaPod-940f133e4c5646dd0ea370456440066c22fbb062.zip |
Fixed bug that occured when restoring the queue from the DB
Diffstat (limited to 'src/de/podfetcher')
-rw-r--r-- | src/de/podfetcher/feed/FeedManager.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/de/podfetcher/feed/FeedManager.java b/src/de/podfetcher/feed/FeedManager.java index 506b62efc..0968980e7 100644 --- a/src/de/podfetcher/feed/FeedManager.java +++ b/src/de/podfetcher/feed/FeedManager.java @@ -262,6 +262,7 @@ public class FeedManager { return f; } } + Log.e(TAG, "Couldn't find Feed with id " + id); return null; } @@ -444,6 +445,7 @@ public class FeedManager { } while (logCursor.moveToNext()); } + adapter.close(); } private void extractQueueFromCursor(Context context) { @@ -453,11 +455,12 @@ public class FeedManager { if (cursor.moveToFirst()) { do { int index = cursor.getInt(cursor.getColumnIndex(PodDBAdapter.KEY_ID)); - Feed feed = getFeed(cursor.getColumnIndex(PodDBAdapter.KEY_FEED)); + Feed feed = getFeed(cursor.getLong(cursor.getColumnIndex(PodDBAdapter.KEY_FEED))); FeedItem item = getFeedItem(cursor.getColumnIndex(PodDBAdapter.KEY_FEEDITEM), feed); queue.add(index, item); } while (cursor.moveToNext()); } + adapter.close(); } public ArrayList<Feed> getFeeds() { |