Added 'downloaded' attribute to FeedFile
This commit is contained in:
parent
cacfb4c33b
commit
8a98d81b3e
@ -29,17 +29,6 @@ public class Feed extends FeedFile{
|
||||
this();
|
||||
this.download_url = url;
|
||||
}
|
||||
|
||||
public Feed(String title, String link, String description, String download_url,
|
||||
FeedCategory category) {
|
||||
super();
|
||||
this.title = title;
|
||||
this.link = link;
|
||||
this.description = description;
|
||||
this.download_url = download_url;
|
||||
this.category = category;
|
||||
items = new ArrayList<FeedItem>();
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
|
@ -5,11 +5,19 @@ public abstract class FeedFile extends FeedComponent {
|
||||
protected String file_url;
|
||||
protected String download_url;
|
||||
protected long downloadId; // temporary id given by the Android DownloadManager
|
||||
protected boolean downloaded;
|
||||
|
||||
public FeedFile(String file_url, String download_url, boolean downloaded) {
|
||||
super();
|
||||
this.file_url = file_url;
|
||||
this.download_url = download_url;
|
||||
this.downloaded = downloaded;
|
||||
}
|
||||
|
||||
public FeedFile() {
|
||||
downloadId = -1;
|
||||
this(null, null, false);
|
||||
}
|
||||
|
||||
|
||||
public String getFile_url() {
|
||||
return file_url;
|
||||
}
|
||||
@ -32,10 +40,16 @@ public abstract class FeedFile extends FeedComponent {
|
||||
}
|
||||
|
||||
public boolean isDownloaded() {
|
||||
return downloadId == -1 && file_url != null;
|
||||
return downloaded;
|
||||
}
|
||||
|
||||
public void setDownloaded(boolean downloaded) {
|
||||
this.downloaded = downloaded;
|
||||
}
|
||||
|
||||
public boolean isDownloading() {
|
||||
return downloadId != -1 && file_url != null;
|
||||
return downloaded == false && file_url != null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -8,21 +8,19 @@ public class FeedImage extends FeedFile {
|
||||
protected Bitmap image_bitmap;
|
||||
|
||||
public FeedImage(String download_url, String title) {
|
||||
super();
|
||||
super(null, download_url, false);
|
||||
this.download_url = download_url;
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public FeedImage(long id, String title, String file_url, String download_url) {
|
||||
super();
|
||||
public FeedImage(long id, String title, String file_url, String download_url, boolean downloaded) {
|
||||
super(file_url, download_url, downloaded);
|
||||
this.id = id;
|
||||
this.title = title;
|
||||
this.file_url = file_url;
|
||||
this.download_url = download_url;
|
||||
}
|
||||
|
||||
public FeedImage() {
|
||||
|
||||
super();
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
|
@ -2,19 +2,16 @@ package de.podfetcher.feed;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
import de.podfetcher.storage.*;
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.util.Log;
|
||||
|
||||
|
||||
/**
|
||||
* Singleton class
|
||||
* Manages all feeds, categories and feeditems
|
||||
*
|
||||
*
|
||||
* */
|
||||
* Singleton class Manages all feeds, categories and feeditems
|
||||
*
|
||||
*
|
||||
* */
|
||||
public class FeedManager {
|
||||
private static final String TAG = "FeedManager";
|
||||
|
||||
@ -22,8 +19,7 @@ public class FeedManager {
|
||||
|
||||
private ArrayList<Feed> feeds;
|
||||
private ArrayList<FeedCategory> categories;
|
||||
private DownloadRequester requester;
|
||||
|
||||
private DownloadRequester requester;
|
||||
|
||||
private FeedManager() {
|
||||
feeds = new ArrayList<Feed>();
|
||||
@ -32,16 +28,16 @@ public class FeedManager {
|
||||
|
||||
}
|
||||
|
||||
public static FeedManager getInstance(){
|
||||
if(singleton == null) {
|
||||
public static FeedManager getInstance() {
|
||||
if (singleton == null) {
|
||||
singleton = new FeedManager();
|
||||
}
|
||||
return singleton;
|
||||
return singleton;
|
||||
}
|
||||
|
||||
public void refreshAllFeeds(Context context) {
|
||||
Log.d(TAG, "Refreshing all feeds.");
|
||||
for(Feed feed : feeds) {
|
||||
for (Feed feed : feeds) {
|
||||
requester.downloadFeed(context, feed);
|
||||
}
|
||||
}
|
||||
@ -49,11 +45,10 @@ public class FeedManager {
|
||||
private void addNewFeed(Context context, Feed feed) {
|
||||
feeds.add(feed);
|
||||
feed.setId(setFeed(context, feed));
|
||||
for(FeedItem item : feed.getItems()) {
|
||||
for (FeedItem item : feed.getItems()) {
|
||||
setFeedItem(context, item);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** Adds a new Feeditem if its not in the list */
|
||||
public void addFeedItem(Context context, FeedItem item) {
|
||||
@ -61,14 +56,14 @@ public class FeedManager {
|
||||
// Search list for feeditem
|
||||
Feed feed = item.getFeed();
|
||||
FeedItem foundItem = searchFeedItemByLink(feed, item.getLink());
|
||||
if(foundItem != null) {
|
||||
if (foundItem != null) {
|
||||
// Update Information
|
||||
item.id = foundItem.id;
|
||||
foundItem = item;
|
||||
item.setRead(foundItem.isRead());
|
||||
adapter.setFeedItem(item);
|
||||
} else {
|
||||
feed.getItems().add(item);
|
||||
feed.getItems().add(item);
|
||||
item.id = adapter.setFeedItem(item);
|
||||
}
|
||||
}
|
||||
@ -76,33 +71,38 @@ public class FeedManager {
|
||||
public void updateFeed(Context context, Feed newFeed) {
|
||||
// Look up feed in the feedslist
|
||||
Feed savedFeed = searchFeedByLink(newFeed.getLink());
|
||||
if(savedFeed == null) {
|
||||
Log.d(TAG, "Found no existing Feed with title " + newFeed.getTitle() + ". Adding as new one.");
|
||||
if (savedFeed == null) {
|
||||
Log.d(TAG,
|
||||
"Found no existing Feed with title " + newFeed.getTitle()
|
||||
+ ". Adding as new one.");
|
||||
// Add a new Feed
|
||||
addNewFeed(context, newFeed);
|
||||
}else {
|
||||
Log.d(TAG, "Feed with title " + newFeed.getTitle() + " already exists. Syncing new with existing one.");
|
||||
} else {
|
||||
Log.d(TAG, "Feed with title " + newFeed.getTitle()
|
||||
+ " already exists. Syncing new with existing one.");
|
||||
// Look for new or updated Items
|
||||
for(FeedItem item : newFeed.getItems()) {
|
||||
FeedItem oldItem = searchFeedItemByLink(savedFeed, item.getLink());
|
||||
if(oldItem != null) {
|
||||
FeedItem newItem = searchFeedItemByLink(newFeed, item.getLink());
|
||||
if(newItem != null) {
|
||||
for (FeedItem item : newFeed.getItems()) {
|
||||
FeedItem oldItem = searchFeedItemByLink(savedFeed,
|
||||
item.getLink());
|
||||
if (oldItem != null) {
|
||||
FeedItem newItem = searchFeedItemByLink(newFeed,
|
||||
item.getLink());
|
||||
if (newItem != null) {
|
||||
newItem.setRead(oldItem.isRead());
|
||||
}
|
||||
}
|
||||
}
|
||||
newFeed.setId(savedFeed.getId());
|
||||
savedFeed = newFeed;
|
||||
setFeed(context, newFeed);
|
||||
setFeed(context, newFeed);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** Get a Feed by its link */
|
||||
private Feed searchFeedByLink(String link) {
|
||||
for(Feed feed : feeds) {
|
||||
if(feed.getLink().equals(link)) {
|
||||
for (Feed feed : feeds) {
|
||||
if (feed.getLink().equals(link)) {
|
||||
return feed;
|
||||
}
|
||||
}
|
||||
@ -111,8 +111,8 @@ public class FeedManager {
|
||||
|
||||
/** Get a FeedItem by its link */
|
||||
private FeedItem searchFeedItemByLink(Feed feed, String link) {
|
||||
for(FeedItem item : feed.getItems()) {
|
||||
if(item.getLink().equals(link)) {
|
||||
for (FeedItem item : feed.getItems()) {
|
||||
if (item.getLink().equals(link)) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
@ -139,13 +139,13 @@ public class FeedManager {
|
||||
/** Updates information of an existing FeedMedia object. */
|
||||
public long setFeedMedia(Context context, FeedMedia media) {
|
||||
PodDBAdapter adapter = new PodDBAdapter(context);
|
||||
return adapter.setMedia(media);
|
||||
return adapter.setMedia(media);
|
||||
}
|
||||
|
||||
/** Get a Feed by its id */
|
||||
public Feed getFeed(long id) {
|
||||
for(Feed f : feeds) {
|
||||
if(f.id == id) {
|
||||
for (Feed f : feeds) {
|
||||
if (f.id == id) {
|
||||
return f;
|
||||
}
|
||||
}
|
||||
@ -154,19 +154,19 @@ public class FeedManager {
|
||||
|
||||
/** Get a Feed Image by its id */
|
||||
public FeedImage getFeedImage(long id) {
|
||||
for(Feed f : feeds) {
|
||||
for (Feed f : feeds) {
|
||||
FeedImage image = f.getImage();
|
||||
if(image != null && image.getId() == id) {
|
||||
if (image != null && image.getId() == id) {
|
||||
return image;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Get a Feed Item by its id and its feed*/
|
||||
/** Get a Feed Item by its id and its feed */
|
||||
public FeedItem getFeedItem(long id, Feed feed) {
|
||||
for(FeedItem item : feed.getItems()) {
|
||||
if(item.getId() == id) {
|
||||
for (FeedItem item : feed.getItems()) {
|
||||
if (item.getId() == id) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
@ -177,7 +177,7 @@ public class FeedManager {
|
||||
/** Get a FeedMedia object by the id of the Media object and the feed object */
|
||||
public FeedMedia getFeedMedia(long id, Feed feed) {
|
||||
for (FeedItem item : feed.getItems()) {
|
||||
if(item.getMedia().getId() == id) {
|
||||
if (item.getMedia().getId() == id) {
|
||||
return item.getMedia();
|
||||
}
|
||||
}
|
||||
@ -191,60 +191,77 @@ public class FeedManager {
|
||||
updateArrays(context);
|
||||
}
|
||||
|
||||
|
||||
public void updateArrays(Context context) {
|
||||
feeds.clear();
|
||||
categories.clear();
|
||||
extractFeedlistFromCursor(context);
|
||||
extractFeedlistFromCursor(context);
|
||||
}
|
||||
|
||||
private void extractFeedlistFromCursor(Context context) {
|
||||
PodDBAdapter adapter = new PodDBAdapter(context);
|
||||
adapter.open();
|
||||
Cursor feedlistCursor = adapter.getAllFeedsCursor();
|
||||
if(feedlistCursor.moveToFirst()) {
|
||||
if (feedlistCursor.moveToFirst()) {
|
||||
do {
|
||||
Feed feed = new Feed();
|
||||
|
||||
feed.id = feedlistCursor.getLong(feedlistCursor.getColumnIndex(PodDBAdapter.KEY_ID));
|
||||
feed.setTitle(feedlistCursor.getString(feedlistCursor.getColumnIndex(PodDBAdapter.KEY_TITLE)));
|
||||
feed.setLink(feedlistCursor.getString(feedlistCursor.getColumnIndex(PodDBAdapter.KEY_LINK)));
|
||||
feed.setDescription(feedlistCursor.getString(feedlistCursor.getColumnIndex(PodDBAdapter.KEY_DESCRIPTION)));
|
||||
feed.setImage(adapter.getFeedImage(feedlistCursor.getLong(feedlistCursor.getColumnIndex(PodDBAdapter.KEY_IMAGE))));
|
||||
feed.file_url = feedlistCursor.getString(feedlistCursor.getColumnIndex(PodDBAdapter.KEY_FILE_URL));
|
||||
feed.download_url = feedlistCursor.getString(feedlistCursor.getColumnIndex(PodDBAdapter.KEY_DOWNLOAD_URL));
|
||||
|
||||
feed.id = feedlistCursor.getLong(feedlistCursor
|
||||
.getColumnIndex(PodDBAdapter.KEY_ID));
|
||||
feed.setTitle(feedlistCursor.getString(feedlistCursor
|
||||
.getColumnIndex(PodDBAdapter.KEY_TITLE)));
|
||||
feed.setLink(feedlistCursor.getString(feedlistCursor
|
||||
.getColumnIndex(PodDBAdapter.KEY_LINK)));
|
||||
feed.setDescription(feedlistCursor.getString(feedlistCursor
|
||||
.getColumnIndex(PodDBAdapter.KEY_DESCRIPTION)));
|
||||
feed.setImage(adapter.getFeedImage(feedlistCursor
|
||||
.getLong(feedlistCursor
|
||||
.getColumnIndex(PodDBAdapter.KEY_IMAGE))));
|
||||
feed.file_url = feedlistCursor.getString(feedlistCursor
|
||||
.getColumnIndex(PodDBAdapter.KEY_FILE_URL));
|
||||
feed.download_url = feedlistCursor.getString(feedlistCursor
|
||||
.getColumnIndex(PodDBAdapter.KEY_DOWNLOAD_URL));
|
||||
feed.setDownloaded(feedlistCursor.getInt(feedlistCursor
|
||||
.getColumnIndex(PodDBAdapter.KEY_DOWNLOADED)) > 0);
|
||||
// Get FeedItem-Object
|
||||
Cursor itemlistCursor = adapter.getAllItemsOfFeedCursor(feed);
|
||||
feed.setItems(extractFeedItemsFromCursor(context, feed, itemlistCursor));
|
||||
feed.setItems(extractFeedItemsFromCursor(context, feed,
|
||||
itemlistCursor));
|
||||
|
||||
feeds.add(feed);
|
||||
}while(feedlistCursor.moveToNext());
|
||||
} while (feedlistCursor.moveToNext());
|
||||
}
|
||||
adapter.close();
|
||||
}
|
||||
|
||||
private ArrayList<FeedItem> extractFeedItemsFromCursor(Context context, Feed feed, Cursor itemlistCursor) {
|
||||
private ArrayList<FeedItem> extractFeedItemsFromCursor(Context context,
|
||||
Feed feed, Cursor itemlistCursor) {
|
||||
ArrayList<FeedItem> items = new ArrayList<FeedItem>();
|
||||
PodDBAdapter adapter = new PodDBAdapter(context);
|
||||
adapter.open();
|
||||
if(itemlistCursor.moveToFirst()) {
|
||||
if (itemlistCursor.moveToFirst()) {
|
||||
do {
|
||||
FeedItem item = new FeedItem();
|
||||
|
||||
item.id = itemlistCursor.getLong(itemlistCursor.getColumnIndex(PodDBAdapter.KEY_ID));
|
||||
item.id = itemlistCursor.getLong(itemlistCursor
|
||||
.getColumnIndex(PodDBAdapter.KEY_ID));
|
||||
item.setFeed(feed);
|
||||
item.setTitle(itemlistCursor.getString(itemlistCursor.getColumnIndex(PodDBAdapter.KEY_TITLE)));
|
||||
item.setLink(itemlistCursor.getString(itemlistCursor.getColumnIndex(PodDBAdapter.KEY_LINK)));
|
||||
item.setDescription(itemlistCursor.getString(itemlistCursor.getColumnIndex(PodDBAdapter.KEY_DESCRIPTION)));
|
||||
item.setPubDate(itemlistCursor.getString(itemlistCursor.getColumnIndex(PodDBAdapter.KEY_PUBDATE)));
|
||||
item.setMedia(adapter.getFeedMedia(
|
||||
itemlistCursor.getLong(
|
||||
itemlistCursor.getColumnIndex(PodDBAdapter.KEY_MEDIA)), item));
|
||||
item.setRead((itemlistCursor.getInt(itemlistCursor.getColumnIndex(PodDBAdapter.KEY_READ)) > 0) ? true : false);
|
||||
item.setTitle(itemlistCursor.getString(itemlistCursor
|
||||
.getColumnIndex(PodDBAdapter.KEY_TITLE)));
|
||||
item.setLink(itemlistCursor.getString(itemlistCursor
|
||||
.getColumnIndex(PodDBAdapter.KEY_LINK)));
|
||||
item.setDescription(itemlistCursor.getString(itemlistCursor
|
||||
.getColumnIndex(PodDBAdapter.KEY_DESCRIPTION)));
|
||||
item.setPubDate(itemlistCursor.getString(itemlistCursor
|
||||
.getColumnIndex(PodDBAdapter.KEY_PUBDATE)));
|
||||
item.setMedia(adapter.getFeedMedia(itemlistCursor
|
||||
.getLong(itemlistCursor
|
||||
.getColumnIndex(PodDBAdapter.KEY_MEDIA)), item));
|
||||
item.setRead((itemlistCursor.getInt(itemlistCursor
|
||||
.getColumnIndex(PodDBAdapter.KEY_READ)) > 0) ? true
|
||||
: false);
|
||||
|
||||
items.add(item);
|
||||
} while(itemlistCursor.moveToNext());
|
||||
} while (itemlistCursor.moveToNext());
|
||||
}
|
||||
adapter.close();
|
||||
return items;
|
||||
@ -254,7 +271,4 @@ public class FeedManager {
|
||||
return feeds;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -8,24 +8,21 @@ public class FeedMedia extends FeedFile{
|
||||
private FeedItem item;
|
||||
|
||||
public FeedMedia(FeedItem i, String download_url, long size, String mime_type) {
|
||||
super();
|
||||
super(null, download_url, false);
|
||||
this.item = i;
|
||||
this.download_url = download_url;
|
||||
this.size = size;
|
||||
this.mime_type = mime_type;
|
||||
}
|
||||
|
||||
public FeedMedia(long id, FeedItem item, int duration, int position, long size, String mime_type,
|
||||
String file_url, String download_url) {
|
||||
super();
|
||||
String file_url, String download_url, boolean downloaded) {
|
||||
super(file_url, download_url, downloaded);
|
||||
this.id = id;
|
||||
this.item = item;
|
||||
this.duration = duration;
|
||||
this.position = position;
|
||||
this.size = size;
|
||||
this.mime_type = mime_type;
|
||||
this.file_url = file_url;
|
||||
this.download_url = download_url;
|
||||
}
|
||||
|
||||
public int getDuration() {
|
||||
|
@ -181,7 +181,7 @@ public class DownloadService extends Service {
|
||||
public void run() {
|
||||
FeedManager manager = FeedManager.getInstance();
|
||||
FeedHandler handler = new FeedHandler();
|
||||
|
||||
feed.setDownloaded(true);
|
||||
feed = handler.parseFeed(feed);
|
||||
Log.d(TAG, feed.getTitle() + " parsed");
|
||||
// Download Feed Image if provided
|
||||
@ -220,6 +220,7 @@ public class DownloadService extends Service {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
image.setDownloaded(true);
|
||||
requester.removeFeedImage(image);
|
||||
manager.setFeedImage(service, image);
|
||||
}
|
||||
@ -239,6 +240,7 @@ public class DownloadService extends Service {
|
||||
@Override
|
||||
public void run() {
|
||||
requester.removeFeedMedia(media);
|
||||
media.setDownloaded(true);
|
||||
// Get duration
|
||||
try {
|
||||
mediaplayer.setDataSource(media.getFile_url());
|
||||
|
@ -40,6 +40,7 @@ public class PodDBAdapter {
|
||||
public static final String KEY_CATEGORY = "category";
|
||||
public static final String KEY_FEED = "feed";
|
||||
public static final String KEY_MEDIA = "media";
|
||||
public static final String KEY_DOWNLOADED = "downloaded";
|
||||
|
||||
// Table names
|
||||
public static final String TABLE_NAME_FEEDS = "Feeds";
|
||||
@ -56,7 +57,7 @@ public class PodDBAdapter {
|
||||
+ " TEXT," + KEY_LINK + " TEXT," + KEY_DESCRIPTION
|
||||
+ " TEXT," + KEY_IMAGE + " INTEGER," + KEY_CATEGORY
|
||||
+ " INTEGER," + KEY_FILE_URL + " TEXT," + KEY_DOWNLOAD_URL
|
||||
+ " TEXT)";
|
||||
+ " TEXT," + KEY_DOWNLOADED + " INTEGER)";
|
||||
|
||||
private static final String CREATE_TABLE_FEED_ITEMS = "CREATE TABLE "
|
||||
+ TABLE_NAME_FEED_ITEMS + " (" + TABLE_PRIMARY_KEY + KEY_TITLE
|
||||
@ -72,13 +73,13 @@ public class PodDBAdapter {
|
||||
private static final String CREATE_TABLE_FEED_IMAGES = "CREATE TABLE "
|
||||
+ TABLE_NAME_FEED_IMAGES + " (" + TABLE_PRIMARY_KEY + KEY_TITLE
|
||||
+ " TEXT," + KEY_FILE_URL + " TEXT,"
|
||||
+ KEY_DOWNLOAD_URL + " TEXT)";
|
||||
+ KEY_DOWNLOAD_URL + " TEXT," + KEY_DOWNLOADED + " INTEGER)";
|
||||
|
||||
private static final String CREATE_TABLE_FEED_MEDIA = "CREATE TABLE "
|
||||
+ TABLE_NAME_FEED_MEDIA + " (" + TABLE_PRIMARY_KEY + KEY_DURATION
|
||||
+ " INTEGER," + KEY_POSITION + " INTEGER,"
|
||||
+ KEY_SIZE + " INTEGER," + KEY_MIME_TYPE + " TEXT,"
|
||||
+ KEY_FILE_URL + " TEXT," + KEY_DOWNLOAD_URL + " TEXT)";
|
||||
+ KEY_FILE_URL + " TEXT," + KEY_DOWNLOAD_URL + " TEXT," + KEY_DOWNLOADED + " INTEGER)";
|
||||
|
||||
private SQLiteDatabase db;
|
||||
private final Context context;
|
||||
@ -128,7 +129,7 @@ public class PodDBAdapter {
|
||||
values.put(KEY_FILE_URL, feed.getFile_url());
|
||||
}
|
||||
values.put(KEY_DOWNLOAD_URL, feed.getDownload_url());
|
||||
|
||||
values.put(KEY_DOWNLOADED, feed.isDownloaded());
|
||||
open();
|
||||
if(feed.getId() == 0) {
|
||||
// Create new entry
|
||||
@ -168,6 +169,7 @@ public class PodDBAdapter {
|
||||
ContentValues values = new ContentValues();
|
||||
values.put(KEY_TITLE, image.getTitle());
|
||||
values.put(KEY_DOWNLOAD_URL, image.getDownload_url());
|
||||
values.put(KEY_DOWNLOADED, image.isDownloaded());
|
||||
if(image.getFile_url() != null) {
|
||||
values.put(KEY_FILE_URL, image.getFile_url());
|
||||
}
|
||||
@ -192,6 +194,7 @@ public class PodDBAdapter {
|
||||
values.put(KEY_SIZE, media.getSize());
|
||||
values.put(KEY_MIME_TYPE, media.getMime_type());
|
||||
values.put(KEY_DOWNLOAD_URL, media.getDownload_url());
|
||||
values.put(KEY_DOWNLOADED, media.isDownloaded());
|
||||
if(media.getFile_url() != null) {
|
||||
values.put(KEY_FILE_URL, media.getFile_url());
|
||||
}
|
||||
@ -309,7 +312,8 @@ public class PodDBAdapter {
|
||||
cursor.getLong(cursor.getColumnIndex(KEY_SIZE)),
|
||||
cursor.getString(cursor.getColumnIndex(KEY_MIME_TYPE)),
|
||||
cursor.getString(cursor.getColumnIndex(KEY_FILE_URL)),
|
||||
cursor.getString(cursor.getColumnIndex(KEY_DOWNLOAD_URL)));
|
||||
cursor.getString(cursor.getColumnIndex(KEY_DOWNLOAD_URL)),
|
||||
cursor.getInt(cursor.getColumnIndex(KEY_DOWNLOADED)) > 0);
|
||||
close();
|
||||
return media;
|
||||
}
|
||||
@ -330,7 +334,8 @@ public class PodDBAdapter {
|
||||
cursor.getString(
|
||||
cursor.getColumnIndex(KEY_FILE_URL)),
|
||||
cursor.getString(
|
||||
cursor.getColumnIndex(KEY_DOWNLOAD_URL)));
|
||||
cursor.getColumnIndex(KEY_DOWNLOAD_URL)),
|
||||
cursor.getInt(cursor.getColumnIndex(KEY_DOWNLOADED)) > 0);
|
||||
close();
|
||||
return image;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user