Failed downloads were not handled correctly
This commit is contained in:
parent
095618855d
commit
88e544a6e6
|
@ -348,6 +348,8 @@ public class DownloadService extends Service {
|
||||||
&& reason != DownloadError.ERROR_DOWNLOAD_CANCELLED) {
|
&& reason != DownloadError.ERROR_DOWNLOAD_CANCELLED) {
|
||||||
Log.e(TAG, "Download failed");
|
Log.e(TAG, "Download failed");
|
||||||
}
|
}
|
||||||
|
download.setFile_url(null);
|
||||||
|
download.setDownloaded(false);
|
||||||
saveDownloadStatus(status);
|
saveDownloadStatus(status);
|
||||||
sendDownloadHandledIntent(getDownloadType(download));
|
sendDownloadHandledIntent(getDownloadType(download));
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class FeedItemMenuHandler {
|
||||||
if (selectedItem.getMedia().isDownloaded()) {
|
if (selectedItem.getMedia().isDownloaded()) {
|
||||||
menu.findItem(R.id.play_item).setVisible(true);
|
menu.findItem(R.id.play_item).setVisible(true);
|
||||||
menu.findItem(R.id.remove_item).setVisible(true);
|
menu.findItem(R.id.remove_item).setVisible(true);
|
||||||
} else if (selectedItem.getMedia().getFile_url() == null) {
|
} else {
|
||||||
menu.findItem(R.id.download_item).setVisible(true);
|
menu.findItem(R.id.download_item).setVisible(true);
|
||||||
menu.findItem(R.id.stream_item).setVisible(true);
|
menu.findItem(R.id.stream_item).setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue