summaryrefslogtreecommitdiff
path: root/src/de/podfetcher/feed
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/podfetcher/feed')
-rw-r--r--src/de/podfetcher/feed/Feed.java1
-rw-r--r--src/de/podfetcher/feed/FeedFile.java12
-rw-r--r--src/de/podfetcher/feed/FeedImage.java1
-rw-r--r--src/de/podfetcher/feed/FeedMedia.java1
4 files changed, 15 insertions, 0 deletions
diff --git a/src/de/podfetcher/feed/Feed.java b/src/de/podfetcher/feed/Feed.java
index 66be64778..e200fbaad 100644
--- a/src/de/podfetcher/feed/Feed.java
+++ b/src/de/podfetcher/feed/Feed.java
@@ -24,6 +24,7 @@ public class Feed extends FeedFile{
}
public Feed(String url) {
+ super();
this.download_url = url;
}
diff --git a/src/de/podfetcher/feed/FeedFile.java b/src/de/podfetcher/feed/FeedFile.java
index fce50d08f..722a968b9 100644
--- a/src/de/podfetcher/feed/FeedFile.java
+++ b/src/de/podfetcher/feed/FeedFile.java
@@ -5,6 +5,10 @@ public abstract class FeedFile extends FeedComponent {
protected String file_url;
protected String download_url;
protected long downloadId; // temporary id given by the Android DownloadManager
+
+ public FeedFile() {
+ downloadId = -1;
+ }
public String getFile_url() {
return file_url;
@@ -26,4 +30,12 @@ public abstract class FeedFile extends FeedComponent {
public void setDownloadId(long downloadId) {
this.downloadId = downloadId;
}
+
+ public boolean isDownloaded() {
+ return downloadId == -1 && file_url != null;
+ }
+
+ public boolean isDownloading() {
+ return downloadId != -1 && file_url != null;
+ }
}
diff --git a/src/de/podfetcher/feed/FeedImage.java b/src/de/podfetcher/feed/FeedImage.java
index 02d83b5ae..098aa15b6 100644
--- a/src/de/podfetcher/feed/FeedImage.java
+++ b/src/de/podfetcher/feed/FeedImage.java
@@ -14,6 +14,7 @@ public class FeedImage extends FeedFile {
}
public FeedImage(long id, String title, String file_url, String download_url) {
+ super();
this.id = id;
this.title = title;
this.file_url = file_url;
diff --git a/src/de/podfetcher/feed/FeedMedia.java b/src/de/podfetcher/feed/FeedMedia.java
index 1234cc0bd..ca2a534f2 100644
--- a/src/de/podfetcher/feed/FeedMedia.java
+++ b/src/de/podfetcher/feed/FeedMedia.java
@@ -8,6 +8,7 @@ public class FeedMedia extends FeedFile{
private FeedItem item;
public FeedMedia(FeedItem i, String download_url, long size, String mime_type) {
+ super();
this.item = i;
this.download_url = download_url;
this.size = size;