summaryrefslogtreecommitdiff
path: root/storage/database
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2024-04-05 20:08:25 +0200
committerGitHub <noreply@github.com>2024-04-05 20:08:25 +0200
commit687db0f5ed13ab0ee4e3a9c09f85359d987a13c0 (patch)
tree0c2894e2a4abaec08eef2d6e2fd8047127a05d57 /storage/database
parentb6a4049ff4a792cbed826320064ccca72fc3e6e5 (diff)
downloadAntennaPod-687db0f5ed13ab0ee4e3a9c09f85359d987a13c0.zip
Merge :net:sync:model and :net:sync:service-interface (#7063)
Diffstat (limited to 'storage/database')
-rw-r--r--storage/database/build.gradle1
-rw-r--r--storage/database/src/main/java/de/danoeh/antennapod/storage/database/DBWriter.java10
-rw-r--r--storage/database/src/main/java/de/danoeh/antennapod/storage/database/FeedDatabaseWriter.java2
3 files changed, 4 insertions, 9 deletions
diff --git a/storage/database/build.gradle b/storage/database/build.gradle
index 60b57828a..60f385505 100644
--- a/storage/database/build.gradle
+++ b/storage/database/build.gradle
@@ -16,7 +16,6 @@ dependencies {
implementation project(':event')
implementation project(':model')
implementation project(':net:download:service-interface')
- implementation project(':net:sync:model')
implementation project(':net:sync:service-interface')
implementation project(':storage:preferences')
implementation project(':ui:app-start-intent')
diff --git a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/DBWriter.java b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/DBWriter.java
index 3866b7ec1..a9c4f4dc3 100644
--- a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/DBWriter.java
+++ b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/DBWriter.java
@@ -36,7 +36,6 @@ import java.util.concurrent.TimeUnit;
import de.danoeh.antennapod.event.FavoritesEvent;
import de.danoeh.antennapod.event.FeedItemEvent;
import de.danoeh.antennapod.event.FeedListUpdateEvent;
-import de.danoeh.antennapod.event.MessageEvent;
import de.danoeh.antennapod.event.playback.PlaybackHistoryEvent;
import de.danoeh.antennapod.event.QueueEvent;
import de.danoeh.antennapod.event.UnreadItemsUpdateEvent;
@@ -50,7 +49,7 @@ import de.danoeh.antennapod.model.feed.FeedMedia;
import de.danoeh.antennapod.model.feed.FeedPreferences;
import de.danoeh.antennapod.model.feed.SortOrder;
import de.danoeh.antennapod.model.playback.Playable;
-import de.danoeh.antennapod.net.sync.model.EpisodeAction;
+import de.danoeh.antennapod.net.sync.serviceinterface.EpisodeAction;
/**
* Provides methods for writing data to AntennaPod's database.
@@ -114,8 +113,7 @@ public class DBWriter {
// Local feed
DocumentFile documentFile = DocumentFile.fromSingleUri(context, Uri.parse(media.getLocalFileUrl()));
if (documentFile == null || !documentFile.exists() || !documentFile.delete()) {
- EventBus.getDefault().post(new MessageEvent(context.getString(R.string.delete_local_failed)));
- return false;
+ Log.d(TAG, "Deletion of local file failed.");
}
media.setLocalFileUrl(null);
localDelete = true;
@@ -123,9 +121,7 @@ public class DBWriter {
// delete downloaded media file
File mediaFile = new File(media.getLocalFileUrl());
if (mediaFile.exists() && !mediaFile.delete()) {
- MessageEvent evt = new MessageEvent(context.getString(R.string.delete_failed));
- EventBus.getDefault().post(evt);
- return false;
+ Log.d(TAG, "Deletion of downloaded file failed.");
}
media.setDownloaded(false);
media.setLocalFileUrl(null);
diff --git a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/FeedDatabaseWriter.java b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/FeedDatabaseWriter.java
index 6429c3cb5..0a61007aa 100644
--- a/storage/database/src/main/java/de/danoeh/antennapod/storage/database/FeedDatabaseWriter.java
+++ b/storage/database/src/main/java/de/danoeh/antennapod/storage/database/FeedDatabaseWriter.java
@@ -11,7 +11,7 @@ import de.danoeh.antennapod.model.feed.FeedItem;
import de.danoeh.antennapod.model.feed.FeedItemFilter;
import de.danoeh.antennapod.model.feed.FeedPreferences;
import de.danoeh.antennapod.model.feed.SortOrder;
-import de.danoeh.antennapod.net.sync.model.EpisodeAction;
+import de.danoeh.antennapod.net.sync.serviceinterface.EpisodeAction;
import de.danoeh.antennapod.net.sync.serviceinterface.SynchronizationQueueSink;
import de.danoeh.antennapod.storage.preferences.UserPreferences;
import org.greenrobot.eventbus.EventBus;