diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2024-03-29 11:23:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-29 11:23:33 +0100 |
commit | 5ede21d676af8d879ec8f5d695255ccbf4398e76 (patch) | |
tree | e4f23895d32ff6946b57887880b084a6759bc5dc /net/discovery | |
parent | 13a985ca1e6fae65682c97ee523dec96b2fdeedf (diff) | |
download | AntennaPod-5ede21d676af8d879ec8f5d695255ccbf4398e76.zip |
Remove dependency of :net:discovery and :ui:echo on :core (#7036)
Moves the common icon files to :ui:common
Diffstat (limited to 'net/discovery')
4 files changed, 30 insertions, 4 deletions
diff --git a/net/discovery/build.gradle b/net/discovery/build.gradle index d071f1ba7..a20ddeb43 100644 --- a/net/discovery/build.gradle +++ b/net/discovery/build.gradle @@ -19,11 +19,12 @@ android { } dependencies { - implementation project(':core') implementation project(':model') implementation project(':net:common') implementation project(':net:sync:gpoddernet') implementation project(':net:sync:model') + implementation project(':storage:preferences') + implementation project(':ui:i18n') annotationProcessor "androidx.annotation:annotation:$annotationVersion" diff --git a/net/discovery/src/main/java/de/danoeh/antennapod/net/discovery/FeedUrlNotFoundException.java b/net/discovery/src/main/java/de/danoeh/antennapod/net/discovery/FeedUrlNotFoundException.java new file mode 100644 index 000000000..15ba3eb6f --- /dev/null +++ b/net/discovery/src/main/java/de/danoeh/antennapod/net/discovery/FeedUrlNotFoundException.java @@ -0,0 +1,26 @@ +package de.danoeh.antennapod.net.discovery; + +import java.io.IOException; + +public class FeedUrlNotFoundException extends IOException { + private final String artistName; + private final String trackName; + + public FeedUrlNotFoundException(String url, String trackName) { + this.artistName = url; + this.trackName = trackName; + } + + public String getArtistName() { + return artistName; + } + + public String getTrackName() { + return trackName; + } + + @Override + public String getMessage() { + return "Result does not specify a feed url"; + } +}
\ No newline at end of file diff --git a/net/discovery/src/main/java/de/danoeh/antennapod/net/discovery/GpodnetPodcastSearcher.java b/net/discovery/src/main/java/de/danoeh/antennapod/net/discovery/GpodnetPodcastSearcher.java index a3f2c648f..270aa7a0e 100644 --- a/net/discovery/src/main/java/de/danoeh/antennapod/net/discovery/GpodnetPodcastSearcher.java +++ b/net/discovery/src/main/java/de/danoeh/antennapod/net/discovery/GpodnetPodcastSearcher.java @@ -1,10 +1,10 @@ package de.danoeh.antennapod.net.discovery; -import de.danoeh.antennapod.core.sync.SynchronizationCredentials; import de.danoeh.antennapod.net.common.AntennapodHttpClient; import de.danoeh.antennapod.net.sync.gpoddernet.GpodnetService; import de.danoeh.antennapod.net.sync.gpoddernet.GpodnetServiceException; import de.danoeh.antennapod.net.sync.gpoddernet.model.GpodnetPodcast; +import de.danoeh.antennapod.storage.preferences.SynchronizationCredentials; import io.reactivex.Single; import io.reactivex.SingleOnSubscribe; import io.reactivex.android.schedulers.AndroidSchedulers; @@ -18,7 +18,7 @@ public class GpodnetPodcastSearcher implements PodcastSearcher { return Single.create((SingleOnSubscribe<List<PodcastSearchResult>>) subscriber -> { try { GpodnetService service = new GpodnetService(AntennapodHttpClient.getHttpClient(), - SynchronizationCredentials.getHosturl(), SynchronizationCredentials.getDeviceID(), + SynchronizationCredentials.getHosturl(), SynchronizationCredentials.getDeviceId(), SynchronizationCredentials.getUsername(), SynchronizationCredentials.getPassword()); List<GpodnetPodcast> gpodnetPodcasts = service.searchPodcasts(query, 0); List<PodcastSearchResult> results = new ArrayList<>(); diff --git a/net/discovery/src/main/java/de/danoeh/antennapod/net/discovery/ItunesPodcastSearcher.java b/net/discovery/src/main/java/de/danoeh/antennapod/net/discovery/ItunesPodcastSearcher.java index b9df9d185..a50a33452 100644 --- a/net/discovery/src/main/java/de/danoeh/antennapod/net/discovery/ItunesPodcastSearcher.java +++ b/net/discovery/src/main/java/de/danoeh/antennapod/net/discovery/ItunesPodcastSearcher.java @@ -1,6 +1,5 @@ package de.danoeh.antennapod.net.discovery; -import de.danoeh.antennapod.core.feed.FeedUrlNotFoundException; import de.danoeh.antennapod.net.common.AntennapodHttpClient; import io.reactivex.Single; import io.reactivex.SingleOnSubscribe; |